[openbox] [Recipe] Using Openbox in Gnome 3 Fallback Mode

Eugene Arshinov earshinov at gmail.com
Fri Jul 29 05:43:20 EDT 2011


Hello.

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.

--
Best regards,
Eugene.


More information about the openbox mailing list