Yeah... it was a surprise to me to. Looking at the code, it looks like it relies on gconf keys you pass in the key to query for to get the session info.
[ken@foobar banshee]$ gnome-session --help
Usage:
gnome-session [OPTION...] - the GNOME session manager
Help Options:
-?, --help Show help options
--help-all Show all help options
--help-gtk Show GTK+ Options
Application Options:
-a, --autostart Override standard autostart directories
--default-session-key GConf key used to lookup default session
--debug Enable debugging code
-f, --failsafe Do not load user-specified applications
--version Version of this application
--display=DISPLAY X display to use
gnome-session-2.24 completely removed support for using an alternative window manager on a per-session basis. The WINDOW_MANAGER environment variable no longer has any effect whatsoever.
The --default-session-key option would let us tell specify a "session" to start, but by default gnome-session 2.24 always starts three programs, ones most openbox users might not want loaded by default: metacity, gnome-panel, and nautilus.
(These are loaded from /desktop/gnome/session/required_components/* based on the contents of the /desktop/gnome/session/required_components_list).
To force gnome-session to load Openbox, one could modify the value of /desktop/gnome/session/required_components/windowmanager to "openbox" and creating openbox.desktop in one of /usr{/,share/}applications/, but this makes the normal Gnome session always use Openbox which is potentially undesired, and may require disabling autostart of gnome-panel and the nautilus desktop from the Gnome session which is definitely undesired for users who wish to switch back & forth.
Currently, users thus have 2 options:
1. Modify GConf keys so that gnome-session always uses Openbox regardless of saved session, which require manual changes to
2. Avoid gnome-session (which still breaks logout and shutdown from gnome-panel), but autostart everything GNOME would using the environment option to xdg-autostart.
I have been using Gnome with Openbox for a while and I was very disappointed to find out that Gnome does not "support" other window managers apart from metacity.
I am using Fedora 10 (and openbox-3.4.7.2-6.fc10.i386) and I overcome the problem by loading "openbox --replace" in my personal sessions.
It works perfectly, therefore I am happy with the solution.
I also tried to modify the value of
/desktop/gnome/session/required_components/windowmanager to "openbox" but I have encountered the following problem.
If I do that, I only get 1 workspace on the panel instead of 4.
I then need to use obconf to change the number of Desktops (that correctly shows 4), change the value to 3 or 5, then back to 4, and all the workspaces will show up on the panel.
If I use my solution, then everything works fine (4 workspaces), presumably because Gnome loads metacity first and then replaces it.
I am not sure were the problem is and if you need more info please let me know.
I just wanted to make you aware of the problem.
I seem to get good results with the following lines in my WM startup script:
# Disable Nautilus desktop since we're not using the Gnome WM.
gconftool-2 -s -t bool /apps/nautilus/preferences/show_desktop false
# Do not set the background.
gconftool-2 -s -t bool /desktop/gnome/background/draw_background false
# Use alternative WM provider (Gnome 2.24 and later)
gconftool-2 -s -t string /desktop/gnome/session/required_components windowmanager openbox
exec /usr/bin/startx -- :0.0
gnome-session-2.24 completely removed support for using an alternative window manager on a per-session basis. The WINDOW_MANAGER environment variable no longer has any effect whatsoever. The --default-session-key option would let us tell specify a "session" to start, but by default gnome-session 2.24 always starts three programs, ones most openbox users might not want loaded by default: metacity, gnome-panel, and nautilus. (These are loaded from /desktop/gnome/session/required_components/* based on the contents of the /desktop/gnome/session/required_components_list). To force gnome-session to load Openbox, one could modify the value of /desktop/gnome/session/required_components/windowmanager to "openbox" and creating openbox.desktop in one of /usr{/,share/}applications/, but this makes the normal Gnome session always use Openbox which is potentially undesired, and may require disabling autostart of gnome-panel and the nautilus desktop from the Gnome session which is definitely undesired for users who wish to switch back & forth. Currently, users thus have 2 options: 1. Modify GConf keys so that gnome-session always uses Openbox regardless of saved session, which require manual changes to 2. Avoid gnome-session (which still breaks logout and shutdown from gnome-panel), but autostart everything GNOME would using the environment option to xdg-autostart.