summaryrefslogtreecommitdiff
path: root/data/xsession
diff options
context:
space:
mode:
authorDana Jansens <danakj@orodu.net>2010-02-17 16:11:36 -0500
committerDana Jansens <danakj@orodu.net>2010-02-17 16:11:36 -0500
commitbcc31faf7ecd8b0ad3b66a75fc72145e93e6c35a (patch)
treede901ca02d357392d35e88ce42db60e8adca841f /data/xsession
parent7d71fb8a77ba9e2ea4938e793410f029265507a8 (diff)
revamp the autostart functionality, so autostart apps launch after openbox.
add /usr/libexec/openbox-autostart which runs the global/user scripts and launches /usr/libexec/openbox-xdg-autostart (which runs .desktop autostart stuff) make openbox-session call openbox with --startup option, to make openbox launch /usr/libexec/openbox-autostart *after* it is initialized. add /etc/xdg/openbox/environment and ~/.config/openbox/environment files to let user change environment variables (locale) for their Openbox session, which openbox-session loads before running openbox.
Diffstat (limited to 'data/xsession')
-rw-r--r--data/xsession/openbox-session.in18
1 files changed, 7 insertions, 11 deletions
diff --git a/data/xsession/openbox-session.in b/data/xsession/openbox-session.in
index fa1bb996..3cf3571f 100644
--- a/data/xsession/openbox-session.in
+++ b/data/xsession/openbox-session.in
@@ -12,15 +12,11 @@ xprop -root -remove _NET_NUMBER_OF_DESKTOPS \
-remove _NET_DESKTOP_NAMES \
-remove _NET_CURRENT_DESKTOP 2> /dev/null
-AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh"
-GLOBALAUTOSTART="@configdir@/openbox/autostart.sh"
+# Set up the environment
+A="@configdir@/openbox/environment"
+test -r $A && . $A
+A="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/environment"
+test -r $A && . $A
-if test -r $AUTOSTART; then
- . $AUTOSTART
-else
- if test -r $GLOBALAUTOSTART; then
- . $GLOBALAUTOSTART
- fi
-fi
-
-exec @bindir@/openbox "$@"
+# Run Openbox, and have it run the autostart stuff
+exec @bindir@/openbox --startup "@libexecdir@/openbox-autostart OPENBOX" "$@"