Fix a crash when moving into a menu on top of a separator and nothing is selected
[openbox.git] / data / autostart.sh.in
blob62a30e1c5e8ccbbb412e785cf11d57d5226137f3
1 # This shell script is run before Openbox launches.
2 # Environment variables set here are passed to the Openbox session.
4 # Set a background color
5 BG=""
6 if which hsetroot >/dev/null; then
7 BG=hsetroot
8 else
9 if which esetroot >/dev/null; then
10 BG=esetroot
11 else
12 if which xsetroot >/dev/null; then
13 BG=xsetroot
17 test -z $BG || $BG -solid "#303030"
19 # D-bus
20 if which dbus-launch >/dev/null && test -z "$DBUS_SESSION_BUS_ADDRESS"; then
21 eval `dbus-launch --sh-syntax --exit-with-session`
24 # Make GTK apps look and behave how they were set up in the gnome config tools
25 if test -x /usr/libexec/gnome-settings-daemon >/dev/null; then
26 /usr/libexec/gnome-settings-daemon &
27 elif which gnome-settings-daemon >/dev/null; then
28 gnome-settings-daemon &
29 # Make GTK apps look and behave how they were set up in the XFCE config tools
30 elif which xfce-mcs-manager >/dev/null; then
31 xfce-mcs-manager n &
34 # Preload stuff for KDE apps
35 if which start_kdeinit >/dev/null; then
36 LD_BIND_NOW=true start_kdeinit --new-startup +kcminit_startup &
39 # Run XDG autostart things. By default don't run anything desktop-specific
40 # See xdg-autostart --help more info
41 DESKTOP_ENV=""
42 if which @secretbindir@/xdg-autostart >/dev/null; then
43 @secretbindir@/xdg-autostart $DESKTOP_ENV