In this post I will show how to switch between
metacity window managers using shell commands as well as a GUI tool.
compiz is a window manager that uses 3D graphics acceleration via OpenGL.
compiz is quite popular because it has matured somewhat and it produces eye-candy desktops. However, they are situations where running a window manager other than
compiz is more desirable. One reason for this is the lack of OpenGL capabilities on older computers. Another reason is that some of the
compiz's visual effects can interfere with full-screen applications, such as games. For this reason, gamers often tend to switch off
compiz prior to starting games. The reason why I replace
compiz with another window manager, namely with
metacity (the default GNOME window manager) is that screenshots taken under
gnome-screenshot lack window decorations! I have experienced this under both Fedora and Ubuntu. Since screenshots without window decorations don't look quite as good as with the decorations, I use the a GUI tool called
desktop-effects to enable and disable
compiz when needed. Here are example screenshots of
desktop-effects tool without window decorations and with window decorations, respectively.
It is also possible to disable
compiz from the Linux shell. The following command is used to replace
compiz window manager with
metacity window manager.
metacity --replace &
While the following command can be used to restore the
compiz window manager.
compiz --replace &
The above commands can also come in handy if for whatever reason
compiz has crashed and the window decorations have disappeared. For instance, on my Fedora Core 6 box I often get the following error.
The program 'gtk-window-decorator' received an X Window System error. This probably reflects a bug in the program. The error was 'BadLength (poly request too large or internal Xlib length erro'. (Details: serial 104726 error_code 16 request_code 154 minor_code 35) (Note to programmers: normally, X errors are reported asynchronously; that is, you will receive the error a while after causing it. To debug your program, run it with the --sync command line option to change this behavior. You can then get a meaningful backtrace from your debugger if you break on the gdk_x_error() function.)
To get around this I replace the crashed window manager with
compiz as described previously.
Did you find the above information useful and interesting? If so, please support this site by using the blog directory links at the bottom of this page. Thanks for your support!
If you have any Linux related problems or questions then please feel free to post them on our Linux Forums: http://linux.dsplabs.com.au/forums.