]> Dogcows Code - chaz/openbox/blobdiff - data/xsession/openbox-session.in
Use test -r instead of test -e for solaris. Fixes bug #4253.
[chaz/openbox] / data / xsession / openbox-session.in
index e76d3203f8f74da81272ac61f2cebb6aa98ae201..7c3daa73ed78f0a55f06b2d23402d357d51048d9 100644 (file)
@@ -1,10 +1,21 @@
 #!/bin/sh
 
-AUTOSTART="$HOME/.config/openbox/autostart"
+if test -n "$1"; then
+    echo "Syntax: openbox-session"
+    echo
+    echo "See the openbox-session(1) manpage for help."
+  exit
+fi
+
+AUTOSTART="${XDG_CONFIG_HOME:-"$HOME/.config"}/openbox/autostart.sh"
+GLOBALAUTOSTART="@configdir@/openbox/autostart.sh"
 
-if test -e $AUTOSTART; then
-    # sleep for 1 second so Openbox is there before anything else
-    (sleep 1 && . $AUTOSTART) &
+if test -r $AUTOSTART; then
+    . $AUTOSTART
+else
+    if test -r $GLOBALAUTOSTART; then
+        . $GLOBALAUTOSTART
+    fi
 fi
 
 exec @bindir@/openbox "$@"
This page took 0.023323 seconds and 4 git commands to generate.