Bug 3788 - openbox-gnome-session doesn't work with gnome-session 2.24
Status: RESOLVED FIXED
Alias: None
Product: Openbox
Classification: Unclassified
Component: general
Version: 3.4.7.2
Hardware: PC Linux
: P3 minor
Assignee: Dana Jansens
QA Contact:
URL:
: 4257
Depends on:
Blocks:
 
Reported: 2008-09-26 16:13 EDT by Ken VanDine
Modified: 2009-12-17 10:28:02 EST
4 users (show)

See Also:



Description Ken VanDine 2008-09-26 16:13:02 EDT
openbox-gnome-session uses the --choose-session argument to gnome-session, which no longer exists in gnome-session 2.24.0
Comment 1 Mikachu 2008-09-26 16:20:15 EDT
and what does exist? nice work of gnome to break * btw.
How do we check which version is installed? Why do we have to?
Comment 2 Ken VanDine 2008-09-26 16:30:44 EDT
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
Comment 3 Mikachu 2008-09-26 16:34:02 EDT
um, okay. that sounds really stupid. i'll just go on record here saying someone else gets to fix this :).
Comment 4 Ken VanDine 2008-10-07 10:44:28 EDT
I have submitted a GNOME bug on this, http://bugzilla.gnome.org/show_bug.cgi?id=555406
Comment 5 dynamotwain 2008-11-09 03:44:46 EST
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.
Comment 6 Ivan Virgili 2008-11-10 18:03:35 EST
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.
Comment 7 Johan Vromans 2008-12-01 05:02:26 EST
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
Comment 8 Miroslav Lichvar 2008-12-16 09:40:12 EST
The Fedora package now has this patch for the gnome session script:

http://cvs.fedoraproject.org/viewvc/rpms/openbox/devel/openbox-3.4.7.2-gnomesession.patch?revision=1.3

It's not nice, but at least it works.
Comment 9 wd 2009-01-01 05:14:54 EST
May be someone can update these information on wiki?
http://icculus.org/openbox/index.php/Help:GNOME/Openbox
Comment 10 Mikachu 2009-08-09 12:42:14 EDT
*** Bug 4257 has been marked as a duplicate of this bug. ***
Comment 11 Dana Jansens 2009-12-17 10:28:02 EST
This is fixed in commits 7e6ef2683f68d0b8cf75d4ebb6a778cd87288d7f and 5c01dc651a220ad1ccce9502da577d81f1877388