-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