Hello,
the openbox-gnome-session script doesn't work with gnome3, specifically with gnome-session-3.0.2-1 that is shipped by archlinux/testing. The script fails because gnome-session doesn't accept the --default-session-key anymore. The new flag is gnome-session --session SESSION.
It works with a /usr/share/gnome-session/sessions/openbox-test.session file with the following content:
[GNOME Session]
Name=GNOME fallback with Openbox
RequiredComponents=gnome-panel;gnome-settings-daemon;
RequiredProviders=windowmanager;notifications;
DefaultProvider-windowmanager=openbox
DefaultProvider-notifications=notification-daemon
and the command gnome-session --session openbox-test.
Furthermore, gnome-session --version, which is used to determine how to launch, does return an empty line here, though it seems like this functionality should still be present upstream:line 308: http://git.gnome.org/browse/gnome-session/tree/gnome-session/main.c this is not fatal however, because it still triggers the else statement. Is this intended?
This is my first bug report. I would like to try fixing this bug, but I'm not entirely sure if can do so.
For me `gnome-session --version` prints "gnome-session 3.0.2" like it should.
I came here to note that after an upgrade from 3.4.11 to 3.5.0 the proposed method stopped to work fine (of course, after the upgrade I re-edited openbox-gnome-session script as needed). With 3.5.0 after logging in in GDM desktop background is shown and openbox starts (I can see its context menu after right-clicking the desktop), but for 10 seconds or so no other applications start (neither the panel nor applications from the saved session). After the delay GNOME shows the ugly "something went wrong" window which forses you to log out. If I run a program from the openbox context menu, the ugly window is shown right after the program's window appears.
I attached a piece of output of `gnome-session --debug`. There you can see "WARNING: Application 'openbox.desktop' failed to register before timeout" message, which is printed right after the 10-second delay ends. Seems that gnome-session wants openbox to do something, but openbox no longer does it in 3.5.0.
I intentionally didn't open a new bugreport, because I think it would be more convenient for developers if all gnome3-and-openbox stuff was in one place.
I wonder what it is expecting to be registered. I will have to dig into some gnome-session code I guess (urg).
Also will apply the change to use --session.
Oh word, I found a nice email from Eugene on the Mailing list about this. I will copy in here..
Question is... Does this fix the "registration" business with gs3?
---
Recently I figured out how to use Openbox in Gnome 3 Fallback Mode.
What you need to do:
- use Openbox/Gnome session
- modify /usr/bin/openbox-gnome-session script
- create openbox-gnome.desktop file
Details are given below. Ideally, the updated openbox-gnome-session
script and new openbox-gnome.desktop file could go to upstream, so that
everything works out of the box. Currently you can use the recipe by
editing the files by hand. As a result, after logging in into
Openbox/Gnome session you will have Openbox running, with correct
number of workspaces.
Openbox-gnome-session script should be modified to work
with gnome-session version 3, like this:
if test $MAJOR -lt 2 || (test $MAJOR = 2 && test $MINOR -le 22); then
# old gnome-session was easy to work with
export WINDOW_MANAGER="/usr/bin/openbox"
exec gnome-session --choose-session=openbox-session "$@"
elif test $MAJOR = 2; then
# new gnome-session requires openbox to be set in gconf and an
# openbox.desktop to be installed in the applications directory
exec gnome-session --default-session-key /desktop/gnome/session/openbox_session "$@"
else
# gnome-session 3 requires openbox.desktop in the applications directory
# and openbox-gnome.session file in gnome-session/sessions/
exec gnome-session --session openbox-gnome
fi
Use this code instead of the 'if' at the end of the existing code.
Ignore the modifications I made for myself in the second case of 'if'.
In case this chunk of code will loose formatting, <http://pastie.org/2288907>
The new openbox-gnome.session file should look like this:
[GNOME Session]
Name=GNOME/Openbox
RequiredComponents=openbox;gnome-settings-daemon
This file can be placed in ~/.config/gnome-session/sessions/ or globally
in /usr/share/gnome-session/sessions/ (where gnome.session file is).
More information: man gnome-session.
Created attachment 2952 [details] A piece of gnome-session --debug output