Automatic translation update from Pootle
[lxde/lxde-common.git] / startlxde.in
CommitLineData
2c453b37 1#!/bin/sh
9b8d9fdb 2
16d76acb 3if [ -z "$XDG_CONFIG_HOME" ]; then
847a8e73 4 export XDG_CONFIG_HOME="$HOME/.config"
16d76acb
HJYP
5fi
6
9b2782cb
AG
7if [ -z "$XDG_DATA_HOME" ]; then
8 export XDG_DATA_HOME="$HOME/.local/share"
9fi
10
9b8d9fdb 11# Ensure the existance of openbox config file
16d76acb 12OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
9b8d9fdb 13if [ ! -f "$OPENBOX_CONF_DIR/lxde-rc.xml" ]; then
847a8e73 14 mkdir -p "$OPENBOX_CONF_DIR"
ebc89290 15 cp @sysconfdir@/xdg/openbox/LXDE/rc.xml "$OPENBOX_CONF_DIR/lxde-rc.xml"
9b8d9fdb
HJYP
16fi
17
28309e59
CW
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
9b2782cb
AG
26# Ensure the existance of the user applications folder
27USER_APPS_DIR="$XDG_DATA_HOME/applications"
28mkdir -p "$USER_APPS_DIR"
29
5ff1b93c
CW
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
9bf8adf4
HJYP
33# Enable GTK+2 integration for OpenOffice.org, if available.
34export SAL_USE_VCLPLUGIN=gtk
35
847a8e73
HJYP
36# Launch DBus if needed
37if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
1569eab7
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
847a8e73
HJYP
41fi
42
fcefd17a 43export XDG_MENU_PREFIX="lxde-"
4ab3bfe7 44export XDG_CURRENT_DESKTOP="LXDE"
fcefd17a 45
16d76acb 46# Start the LXDE session
0792937e 47exec @prefix@/bin/lxsession -s LXDE -e LXDE