installing compiz will make using metacity impossible (even after uninstalling)

Bug #87960 reported by Jeff Fortin Tam on 2007-02-26
4
Affects Status Importance Assigned to Milestone
gnome-session (Debian)
New
Undecided
Unassigned
gnome-session (Ubuntu)
Medium
Ubuntu Desktop Bugs

Bug Description

Binary package hint: gnome-session

It seems that debian & ubuntu include a patched /usr/bin/gnome-wm file, which is part of the gnome-session package.

The comment at the top says:
# The user can specify his prefered WM by setting the WINDOW_MANAGER
# environment variable or setting the
# /desktop/gnome/applications/window_manager/default gconf key.
#
# If this is not set, we search a list of known windowmanagers and use
# the first one that is found in the users's PATH

The big problem is this: it will prevent metacity from being used if compiz is not avaible. To reproduce:
1- install compiz
2- use compiz, a gconf key /desktop/gnome/applications/window_manager/default will be set to "/usr/bin/compiz"
3- uninstall/purge the compiz packages
4- logout and try loggin into gnome: metacity will never start no matter what you do with your session

Looking at .xsession_errors, you see the reason: gnome-wm tries to call compiz because it read the gconf key and did not check the binary actually existed. This is completely crazy. If the binary is not present, don't try running it, fallback to metacity! Actually, if *anything* goes wrong, fallback to metacity!

Note: this hack is not present in "vanilla" gnome it seems: http://svn.gnome.org/viewcvs/gnome-session/trunk/gnome-session/gnome-wm?revision=4186&view=markup

Users can be locked out of their sessions because of this. I was lucky to have nautilus-open-terminal and #gnome@gimpnet around.

Kees Cook (kees) wrote :

While this does leave people locked out of their session, this isn't a security bug, and have unflagged it.

Sebastien Bacher (seb128) wrote :

Thank you for your bug, confirmed on feisty

Changed in gnome-session:
assignee: nobody → desktop-bugs
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Daniel Holbach (dholbach) wrote :

Does this patch look acceptable?

Changed in gnome-session:
status: Confirmed → In Progress
Daniel Holbach (dholbach) wrote :

I updated the patch.

Daniel Holbach (dholbach) wrote :
Daniel Holbach (dholbach) wrote :

Final version:

+# If not exist, set to metacity.
+if [ ! -x "$DEFWM" ]; then
+ gconftool-2 -s /desktop/gnome/applications/window_manager/default /usr/bin/metacity --type string
+ DEFWM=/usr/bin/metacity
+fi

Changed in gnome-session:
status: In Progress → Fix Released

I am using Ubuntu 7.10 final and gnome-wm file is not patched as decribed here in the preceding post. Compiz is still the fall-back window manager. I had to manually change it to metacity in gnome-wm and gconf. I did a command line install, and when I started gnome, I had a window-manager I could not recognize (only one window at the time could be displayed).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments