Parent: Applications

Introduction

Metacity was the default GTK2 Window Manager for Ubuntu. Metacity compositing was introduced in Ubuntu 8.10 Jaunty. Some of the most familiar tasks handled by Metacity include window management, keyboard shortcuts, and themes.

Starting Metacity

Metacity is installed and enabled by default. The compositing feature must be enabled after installation. If compositing is enabled two features are evident: shadows will appear around window edges, and when using ALT-Tab to switch windows a thumbnail of each window, rather than a static icon, is seen. Refer to the Configuration section for instructions on how to turn on compositing.

Metacity runs by default unless the user has made a change to the system (for instance, running Compiz). If Metacity was turned off and the user wishes to restart it:

Configuring Metacity

The user's Metacity configuration settings are stored in .xml files in various subfolders of ~/.gconf/apps/metacity. There are five major components, discussed below.

General Settings

The general section contains settings which control the Titlebar fonts, compositing, window focus, and certain mouse click actions. This section also sets the some button layouts and themes, and enables/disables compositing.

There are three ways to change the general settings.

A. The Main Menu:

System > Preferences > Windows

metacity.windows.png

* A GUI Windows Preferences applet will open.

* A few basic options are available for change, such the action to be accomplished when the mouse is double-clicked.

* The Movement Key section allows the user to hold the specified key and use the mouse to drag a window when clicked anywhere on the window. If not enabled, the mouse will only drag the window if held on the titlebar.

System > Preferences > Keyboard Shortcuts

metacity.keyboard.png

* A GUI Keyboard Shortcuts applet will open.

* Options which can be changed in this area include minimize/maximize key combinations, windows workspace movement, and window switching.

* Changes in the Window Management section will update Metacity settings.

* To make a change, select the line and press the desired key combination. No typing is required.

* To remove an entry, highlight the line and press the backspace key.

B. Configuration Editor

This GUI editor is the primary method of investigating and controlling Metacity settings. All existing options are available for editing and new options can be created from within the Configuration Editor.

To open the Configuration Editor, navigate to Applications, System Tools > Configuration Editor or in terminal run:

C. Terminal

Metacity Compositing

Originally available in Compiz but not Metacity, compositing became a part of Metacity with Gnome 2.24 and was incorporated into Ubuntu 8.04 Hardy. Compositing permits advanced visual effects by using buffers and manipulating the images before they appear on the screen. In Metacity, these effects include window shadowing, smoother window movement, and thumbnail views when using ALT-Tab to switch between windows.

Global_keybindings

The Global keybindings section consists of default and user-configurable keybindings.

Keybinding_commands

Metacity provides blank command_N entries, with N being a numeral 1 through 12. These can be set by the user. The run_command_N key combination value in this section is combined with the corresponding global_keybindings command in the previous section to create a customized keyboard shortcut. An example is presented later in this section.

Practical Keybinding Example

A user wishes to use the <Control>G key combination to start the GNU Image Manipulation Program (Gimp). Refer to the previous screenshots for reference.

  1. Test the <Control>G key combination to ensure it is not already assigned.

    • You could also perform a search in the Configuration Editor with: Edit > Find > Search for: <Control>G and enable Search also in key values.

    • Repeat the search for <Control>g, <Ctrl>G, and <Ctrl>g

  2. Open the Configuration Editor from the Main Menu: System Tools > Configuration Editor.

  3. Select a run_command in apps/metacity/global_keybindings. In this example, we choose run_command_2.

    • Currently unassigned key combinations will have a value of disabled.

    • Double click the highlighted entry in the Value column or right click the highlighted entry in the Name column and select Edit Key....

      • Type <Control>G in the entry window. Press ENTER to store the value.

      • Letters are NOT case sensitive in key combinations. g is the same as G for the key combination only.

  4. Select apps/metacity/keybinding_commands in the left pane and command_2 in the right pane.

    • Double click the highlighted entry in the Value column or right click the highlighted entry in the Name column and select Edit Key....

    • Enter the run command for the desired action. In this case, gimp

      • Note: For some applications, it may be necessary to include the complete path to the run command of the application.
    • Press ENTER to store the entry.
  5. Test the command by simultaneously pressing <Control>G.

  6. Exit the Configuration Editor if you are done.

If you prefer the terminal, or would like a demonstration of it's power, you can do the same thing with:

  1. Open a terminal: Applications > Accessories >Terminal.

  2. Run the following two commands:
    gconftool-2 -s -t string /apps/metacity/global_keybindings/run_command_2 '<Control>G'
    gconftool-2 -s -t string /apps/metacity/keybinding_commands/command_2 'gimp' 

Window_keybindings

This section assigns key combinations for moving, closing, and sizing windows. Keys can also be assigned to move a window to specific workspaces.

Workspace_names

Metacity Themes

Themes control window frame options, colors, controls, icons, pointers and more. Ubuntu provides the ability to easily add, remove and customize a wide variety of themes. The default theme of an installation can be changed with just a few clicks of your mouse. Installed themes are normally stored in the /usr/share/themes folder. User installed themes are normally found in the ~/.themes folder.

Installing & Selecting Themes

Themes can be installed by a variety of methods.

Customizing Themes

Not only can users download or create their own themes, Ubuntu allows users to customize existing themes.

Creating Themes

Users can create their own themes by customizing existing themes as described earlier or build themes from scratch. There are many sites that describe the process. Here is the the gnome.org theme tutorial.

Removing Themes

Metacity & Compiz

Some users seeking advanced effects turn from Metacity to Compiz, while others switch from one to the other depending on what they are doing on their computers. Compiz is installed on the initial Ubuntu installation in Ubuntu 9.04 Jaunty, while Metacity now includes compositing.

For users who intend to switch to Compiz, or those who plan on using both, there are several applications which can make things simpler. While this page is not devoted to Compiz, Metacity users who occasionally use Compiz will also benefit from installing these applications.

Install fusion-icon and compizconfig-settings-manager via Synaptic or run the following command:

External Links


CategorySoftwareDefault CategorySoftware

Metacity (last edited 2016-08-28 03:04:35 by 104)