3
#Workaround to disable rgba, because lxpanel in Lubuntu doesn't support it
6
#export XLIB_SKIP_ARGB_VISUALS=1
8
if [ -z "$XDG_CONFIG_HOME" ]; then
9
export XDG_CONFIG_HOME="$HOME/.config"
12
#Allow custom configuration files in /etc/xdg/lubuntu
13
#Patch stolen from Xubuntu
14
if test "x$XDG_CONFIG_DIRS" = "x"
16
XDG_CONFIG_DIRS="/etc/xdg/lubuntu:/etc/xdg"
18
XDG_CONFIG_DIRS="/etc/xdg/lubuntu/:$XDG_CONFIG_DIRS"
20
export XDG_CONFIG_DIRS
22
if test "x$XDG_DATA_DIRS" = "x"
24
XDG_DATA_DIRS="/etc/xdg/lubuntu:/usr/local/share:/usr/share:/usr/share/gdm:/var/lib/menu-xdg"
26
XDG_DATA_DIRS="/etc/xdg/lubuntu:$XDG_DATA_DIRS:/usr/share:/usr/share/gdm:/var/lib/menu-xdg"
30
# Ensure the existance of openbox config file
31
OPENBOX_CONF_DIR="$XDG_CONFIG_HOME/openbox"
32
if [ ! -f "$OPENBOX_CONF_DIR/lubuntu-rc.xml" ]; then
33
mkdir -p "$OPENBOX_CONF_DIR"
34
cp /usr/share/lubuntu/openbox/rc.xml "$OPENBOX_CONF_DIR/lubuntu-rc.xml"
37
# Install custom QT configuration if no one is already installed
38
if [ ! -f "$XDG_CONFIG_HOME/Trolltech.conf" ]; then
39
cp /usr/share/lubuntu/qt/Trolltech.conf "$XDG_CONFIG_HOME/Trolltech.conf"
42
# Install custom configuration for leafpad
43
LEAFPAD_CONF_DIR="$XDG_CONFIG_HOME/leafpad"
44
if [ ! -f "$LEAFPAD_CONF_DIR/leafpadrc" ]; then
45
mkdir -p "$LEAFPAD_CONF_DIR"
46
cp /usr/share/lubuntu/leafpad/leafpadrc "$LEAFPAD_CONF_DIR/leafpadrc"
49
# Install custom configuration for xscreensaver
50
if [ ! -f "$HOME/.xscreensaver" ]; then
51
cp /usr/share/lubuntu/xscreensaver/xscreensaver "$HOME/.xscreensaver"
54
# Install custom lxterminal configuration if no one is already installed
55
if [ ! -f "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf" ]; then
56
cp /etc/xdg/lubuntu/lxterminal/lxterminal.conf "$XDG_CONFIG_HOME/lxterminal/lxterminal.conf"
59
# Clean up after GDM (GDM sets the number of desktops to one)
60
xprop -root -remove _NET_NUMBER_OF_DESKTOPS -remove _NET_DESKTOP_NAMES -remove _NET_CURRENT_DESKTOP 2> /dev/null
62
#Ensure the menu prefix
63
export XDG_MENU_PREFIX="lxde-"
65
# Enable GTK+2 integration for OpenOffice.org, if available.
66
export SAL_USE_VCLPLUGIN=gtk
68
# Launch DBus if needed
69
if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
70
eval "$(dbus-launch --sh-syntax --exit-with-session)"
73
# Export Gnome-keyring variables if needed
75
if which gnome-keyring-daemon >/dev/null; then
76
export $(/usr/bin/gnome-keyring-daemon --start --components=ssh)
79
# Start SSH agent, require since 3.5
80
# (see https://wiki.archlinux.org/index.php/Openbox#SSH_agent_no_longer_starting)
81
SSHAGENT="/usr/bin/ssh-agent"
83
if [ -z "$SSH_AUTH_SOCK" -a -x "$SSHAGENT" ]; then
84
eval `$SSHAGENT $SSHAGENTARGS`
85
trap "kill $SSH_AGENT_PID" 0
88
# Start the LXDE session
89
exec /usr/bin/lxsession -s Lubuntu -e LXDE