Moving desktop file to subdirectory desktop within the packaging files.
[debian/lxde-common.git] / startlxde.in
CommitLineData
097da666
DB
1#!/bin/sh
2
3if [ -z "$XDG_CONFIG_HOME" ]; then
525d33ac 4 export XDG_CONFIG_HOME="$HOME/.config"
097da666
DB
5fi
6
7# Ensure the existance of pcmanfm config file
525d33ac
DB
8PCMANFM_CONF_DIR="$XDG_CONFIG_HOME/pcmanfm/LXDE"
9if [ ! -f "$PCMANFM_CONF_DIR/pcmanfm.conf" ]; then
10 mkdir -p "$PCMANFM_CONF_DIR"
11 cp @prefix@/share/lxde/pcmanfm/pcmanfm.conf "$PCMANFM_CONF_DIR/pcmanfm.conf"
097da666
DB
12fi
13
14# Ensure the existance of openbox config file
15OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
16if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
525d33ac
DB
17 mkdir -p "$OPENBOX_CONF_DIR"
18 cp @prefix@/share/lxde/openbox/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
097da666
DB
19fi
20
525d33ac
DB
21# Ensure the existance of the 'Desktop' folder
22if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
23 . "$XDG_CONFIG_HOME/user-dirs.dirs"
24else
25 XDG_DESKTOP_DIR="$HOME/Desktop"
26fi
27mkdir -p "$XDG_DESKTOP_DIR"
28
26d3dc88
DB
29# Clean up after GDM (GDM sets the number of desktops to one)
30xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
31
097da666
DB
32# Enable GTK+2 integration for OpenOffice.org, if available.
33export SAL_USE_VCLPLUGIN=gtk
34
525d33ac
DB
35# Launch DBus if needed
36if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
37 eval "$(dbus-launch --sh-syntax --exit-with-session)"
38fi
39
40export XDG_MENU_PREFIX="lxde-"
41
097da666 42# Start the LXDE session
525d33ac 43exec @prefix@/bin/lxsession -s LXDE -e LXDE