Releasing debian version 0.99.2-3.
[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
5e882d20
AG
7if [ -z "$XDG_DATA_HOME" ]; then
8 export XDG_DATA_HOME="$HOME/.local/share"
9fi
10
097da666
DB
11# Ensure the existance of openbox config file
12OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
13if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
525d33ac 14 mkdir -p "$OPENBOX_CONF_DIR"
18d449f7 15 cp @sysconfdir@/xdg/openbox/LXDE/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
097da666
DB
16fi
17
525d33ac
DB
18# Ensure the existance of the 'Desktop' folder
19if [ -e "$XDG_CONFIG_HOME/user-dirs.dirs" ]; then
20 . "$XDG_CONFIG_HOME/user-dirs.dirs"
21else
22 XDG_DESKTOP_DIR="$HOME/Desktop"
23fi
24mkdir -p "$XDG_DESKTOP_DIR"
25
5e882d20
AG
26# Ensure the existance of the user applications folder
27USER_APPS_DIR="$XDG_DATA_HOME/applications"
28mkdir -p "$USER_APPS_DIR"
29
26d3dc88
DB
30# Clean up after GDM (GDM sets the number of desktops to one)
31xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
32
097da666
DB
33# Enable GTK+2 integration for OpenOffice.org, if available.
34export SAL_USE_VCLPLUGIN=gtk
35
525d33ac
DB
36# Launch DBus if needed
37if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
5e882d20
AG
38 if test -z "$XDG_RUNTIME_DIR" -o ! -S "$XDG_RUNTIME_DIR/bus" -o ! -O "$XDG_RUNTIME_DIR/bus"; then
39 eval "$(dbus-launch --sh-syntax --exit-with-session)"
40 fi
525d33ac
DB
41fi
42
43export XDG_MENU_PREFIX="lxde-"
10262927 44export XDG_CURRENT_DESKTOP="LXDE"
525d33ac 45
097da666 46# Start the LXDE session
525d33ac 47exec @prefix@/bin/lxsession -s LXDE -e LXDE