#### Beyond Linux® From Scratch (systemd Edition) - Version r13.0-491

### Chapter 33. GNOME Libraries and Desktop

- Prev

  gnome-control-center-50.1

- Next

  gnome-shell-50.1

- Up
- Home

# Mutter-50.1

## Introduction to Mutter

Mutter is the window manager for GNOME. It is not invoked directly, but from GNOME Session (on a machine with a hardware accelerated video driver).

### Note

Development versions of BLFS may not build or run some packages properly if LFS or dependencies have been updated since the most recent stable versions of the books.

### Package Information

- Download (HTTP): https://download.gnome.org/sources/mutter/50/mutter-50.1.tar.xz

- Download MD5 sum: 5e4147170db223878e2845c2ae695640

- Download size: 8.1 MB

- Estimated disk space required: 90 MB

- Estimated build time: 0.4 SBU (Using parallelism=4; add 1.4 SBU for tests)

### Mutter Dependencies

#### Required

at-spi2-core-2.60.3, docutils-0.22.4, gnome-settings-daemon-50.1, graphene-1.10.8, GTK-4.22.4, libei-1.5.0, libxcvt-0.1.3, libxkbcommon-1.13.1, and pipewire-1.6.4

#### Recommended

desktop-file-utils-0.28, GLib-2.88.0 (with GObject Introspection), libdisplay-info-0.3.0, and startup-notification-0.12

#### Recommended (Required to build the Wayland compositor)

libinput-1.31.1, Wayland-1.24.0, wayland-protocols-1.48, and Xwayland-24.1.11

#### Optional

dbusmock-0.38.1 and GTK-3.24.52 (both required for tests), libadwaita-1.9.0, Xorg-Server-21.1.22 (for X11 sessions, deprecated), bash-completion, sysprof, Xvfb (from Xorg-Server-21.1.22 or Xwayland-24.1.11), xvfb-run, and zenity (the X11 tests would only run with all of the last three)

## Installation of Mutter

Fix an issue with the tests that would otherwise require the package to be built with debugging information:

    sed "/tests_c_args =/s/$/ + ['-U', 'G_DISABLE_ASSERT']/" -i src/tests/meson.build &&
    sed "/c_args:/a '-U', 'G_DISABLE_ASSERT'," -i src/tests/cogl/unit/meson.build

Install Mutter by running the following commands:

    mkdir build &&
    cd    build &&

    meson setup --prefix=/usr            \
                --buildtype=release      \
                -D tests=disabled        \
                -D profiler=false        \
                -D bash_completion=false \
                ..                       &&
    ninja

If you want to run the test suite, ensure both dbusmock-0.38.1 and GTK-3.24.52 are installed and issue:

    meson configure -D tests=enabled &&
    ninja test

The tests require an active Wayland session. Some tests are flaky (especially if your system is under a high load), so if a test fails you can try to run a specific test again by using the meson test `<test name>` command. A few tests may fail depending on some system configuration. Don't make any mouse or keyboard input while the test suite is running or some tests may fail. You can also test basic functions of Mutter following the section called “Starting Mutter” after installing this package.

Now, as the `root` user:

    ninja install

## Command Explanations

`--buildtype=release`: Specify a buildtype suitable for stable releases of the package, as the default may produce unoptimized binaries.

`-D bash_completion=false`: Allows building this package without the bash-completion package installed.

`-D tests=disabled`: Allows building this package without dbusmock-0.38.1 installed. It'll be overridden with meson configure if running the test suite.

`-D profiler=false`: Allows building this package without Sysprof. Remove this option if you've installed Sysprof and want to analyze the rendering performance of Mutter.

`-D x11=true`: Allows building this package with X11 support. X11 support is deprecated and will be removed in GNOME 50.

## Starting Mutter

Mutter is normally used as a component of gnome-shell, but it can be used as a standalone Wayland compositor too. To run Mutter as a Wayland compositor, in a virtual console, issue:

    mutter --wayland -- vte-2.91

Replace vte-2.91 with the command line for the first application you want in the Wayland session. Note that once this application exits, the Wayland session will be terminated.

Mutter can also function as a nested compositor in another Wayland session. In a terminal emulator, issue:

    MUTTER_DEBUG_DUMMY_MODE_SPECS=1920x1080 \
    dbus-run-session mutter --wayland --devkit -- vte-2.91

There will be a 20-second delay before the nested compositor starts up because of a known bug. Replace `1920x1080` with the size you want for the nested Wayland session.

## Contents

Installed Programs: gdctl, gnome-service-client, and mutter
Installed Libraries: libmutter-17.so and libmutter-test-17.so (optional)
Installed Directories: /usr/{lib,include,libexec/installed-tests,share/{,installed-tests}}/mutter-17

### Short Descriptions

gdctl | controls the current monitor configuration on sessions that use Mutter as a window manager
gnome-service-client | launches a Wayland client with an optional tag
mutter | is a Clutter based compositing GTK+ Window Manager
`libmutter-16.so` | contains the Mutter API functions
`libmutter-test-16.so` | contains the Mutter test suite API functions; this library is only installed if the test suite of this package is run and it is needed by the gnome-shell test suite

- Prev

  gnome-control-center-50.1

- Next

  gnome-shell-50.1

- Up
- Home