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