2

I'm trying to use Openbox with an autostart script as well as a separate copy of "rc.xml" (this is to be able to have multiple configurations on the same computer, but that's not relevant). Let's say this file is called "custom-rc.xml". How do I make Openbox use that one instead of "rc.xml"? By doing some browsing through my filesystem I found that the script "openbox-session" contained this code:

exec /usr/bin/openbox --startup "/usr/lib/x86_64-linux-gnu/openbox-autostart OPENBOX" "$@"

The above code launches openbox and makes it run a script that will run autostart. I also found the script "openbox-lxde" (I have lxde installed), and it contained this:

exec openbox --config-file $XDG_CONFIG_HOME/openbox/lxde-rc.xml $@

Is there a way to combine these operations when running openbox? This would allow me to make a script that launches openbox with aan autostart script and my own configuration file.

2
  • I've been looking for something similar, so that you can start openbox sessions with a concrete configuration file, replacing the previous one, but it seems that --config-file cannot be combined with others like --reconfigure or --restart. If you find a way, please report here, there seems to be very little documentation about this.
    – nightcod3r
    Jun 20, 2017 at 18:52
  • Actually, --config-file and --replace can be combined, although the result doesn't seem to be precisely what we expect. So openbox --config-file .config/openbox/myfile.xml --replace does reload openbox with a different configuration file.
    – nightcod3r
    Jun 20, 2017 at 19:02

2 Answers 2

0

You may do this:
in "openbox-session" script in exec line after openbox add --config-file FILE
change FILE to the way to your "custom-rc.xml"

0

Combine --config-file and --replace like this:

openbox --config-file pathto/myfile.xml --replace &

which does reload openbox with a different configuration file, even if some weird messages might appear, like:

Openbox-Message: Requested key "XF86Terminal" does not exist on the display
Openbox-Message: Invalid action "PgUp" requested. No such action exists.
Openbox-Message: Requested key "XF86Terminal" does not exist on the display

while openbox was perfectly fine with these keys and actions in the original configuration file (in a Lubuntu 16.04).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .