Sunday, July 20, 2014

How to change window manager for GNOME

If I ask a Linux user what desktop environment he is running, most likely he can tell me the correct answer - GNOME, KDE, Xfce, LXDE, etc. But if I ask him what window manager he is running, I won't be too surprised if he can't answer me. In fact, not long ago, I did not know that myself.

The Window Manager dictates how various visual elements - windows, panes, icons, etc - look, and how users may interact with these elements. There are many window manager choices: Metacity, Mutter, Compiz, Openbox, etc.

The key is that you are not locked in to any window manager. If you don't like your current window manager, change it. This post explains how to change the window manager, specifically for the GNOME desktop environment.

Before we change it, let's find out which window manager is currently running. To do that, you need to install and run a tool named wmctrl.

$ sudo apt-get install wmctrl $ wmctrl -m Name: Metacity Class: N/A PID: N/A Window manager's "showing the desktop" mode: N/A

The above output tells us that Metacity is the current window manager.

The procedure to change the window manager is:

  1. Choose a new window manager, say Mutter.
  2. Install the new window manager.
    $ sudo apt-get install mutter
  3. Change window manager.

    If you just want to try out the window manager, then execute the following command in your desktop environment:

    $ mutter --replace &

    The window manager is switched on-the-fly. However, Mutter does not persist after logging out. When you login to X, the window manager is reverted back to Metacity.

    To make Mutter your new default, create the file ~/.gnomerc like this:

    $ cat >> ~/.gnomerc export WINDOW_MANAGER=mutter

No comments: