Run mutter window manager standalone

7,782

exec mutter replaces the script by mutter, so nothing below that line runs. If you want to run xterm before mutter:

xterm -maximized &
exec mutter

If you want to run mutter before xterm:

mutter &
wm_pid=$!
xterm -maximized &
wait $wm_pid

Alternatively, configure mutter to run xterm -maximized when it starts. I don't know whether this is possible — mutter is designed not to be configurable.

As for finding the mutter executable, it's already on the search path (in /usr/bin) if you installed it through the package manager, you have nothing to do.

Share:
7,782

Related videos on Youtube

mulllhausen
Author by

mulllhausen

Updated on September 18, 2022

Comments

  • mulllhausen
    mulllhausen almost 2 years

    I'm trying to run my window manager standalone on Debian 7 (i.e. without Gnome 3, which is currently installed). Apparently Gnome is already running the mutter window manager:

    $ wmctrl -m
    Name: Mutter
    Class: N/A
    PID: N/A
    Window manager's "showing the desktop" mode: N/A
    

    I can't seem to find the mutter executable to run it, though. It's not on the $PATH and none of the results from locate mutter look like executables to me: (note that /usr/share/mutter/ and /usr/lib/mutter/ are both directories in the below output)

    $ sudo locate mutter
    /usr/lib/libmutter.so.0
    /usr/lib/libmutter.so.0.0.0
    /usr/lib/mutter
    /usr/lib/mutter/Meta-3.0.typelib
    /usr/share/mutter
    /usr/share/GConf/gsettings/mutter-schemas.convert
    /usr/share/app-install/desktop/mutter.desktop
    /usr/share/doc/gir1.2-mutter-3.0
    /usr/share/doc/libmutter0
    /usr/share/doc/mutter-common
    /usr/share/doc/gir1.2-mutter-3.0/AUTHORS
    /usr/share/doc/gir1.2-mutter-3.0/NEWS.gz
    /usr/share/doc/gir1.2-mutter-3.0/README.gz
    /usr/share/doc/gir1.2-mutter-3.0/changelog.Debian.gz
    /usr/share/doc/gir1.2-mutter-3.0/changelog.gz
    /usr/share/doc/gir1.2-mutter-3.0/copyright
    /usr/share/doc/libmutter0/AUTHORS
    /usr/share/doc/libmutter0/NEWS.gz
    /usr/share/doc/libmutter0/README.gz
    /usr/share/doc/libmutter0/changelog.Debian.gz
    /usr/share/doc/libmutter0/changelog.gz
    /usr/share/doc/libmutter0/copyright
    /usr/share/doc/mutter-common/AUTHORS
    /usr/share/doc/mutter-common/NEWS.gz
    /usr/share/doc/mutter-common/README.gz
    /usr/share/doc/mutter-common/changelog.Debian.gz
    /usr/share/doc/mutter-common/changelog.gz
    /usr/share/doc/mutter-common/copyright
    /usr/share/glib-2.0/schemas/org.gnome.mutter.gschema.xml
    /usr/share/gnome-control-center/keybindings/50-mutter-windows.xml
    /usr/share/locale/am/LC_MESSAGES/mutter.mo
    /usr/share/locale/ar/LC_MESSAGES/mutter.mo
    /usr/share/locale/as/LC_MESSAGES/mutter.mo
    /usr/share/locale/ast/LC_MESSAGES/mutter.mo
    /usr/share/locale/az/LC_MESSAGES/mutter.mo
    /usr/share/locale/be/LC_MESSAGES/mutter.mo
    /usr/share/locale/be@latin/LC_MESSAGES/mutter.mo
    /usr/share/locale/bg/LC_MESSAGES/mutter.mo
    /usr/share/locale/bn/LC_MESSAGES/mutter.mo
    /usr/share/locale/bn_IN/LC_MESSAGES/mutter.mo
    /usr/share/locale/br/LC_MESSAGES/mutter.mo
    /usr/share/locale/bs/LC_MESSAGES/mutter.mo
    /usr/share/locale/ca/LC_MESSAGES/mutter.mo
    /usr/share/locale/ca@valencia/LC_MESSAGES/mutter.mo
    /usr/share/locale/cs/LC_MESSAGES/mutter.mo
    /usr/share/locale/cy/LC_MESSAGES/mutter.mo
    /usr/share/locale/da/LC_MESSAGES/mutter.mo
    /usr/share/locale/de/LC_MESSAGES/mutter.mo
    /usr/share/locale/dz/LC_MESSAGES/mutter.mo
    /usr/share/locale/el/LC_MESSAGES/mutter.mo
    /usr/share/locale/en_CA/LC_MESSAGES/mutter.mo
    /usr/share/locale/en_GB/LC_MESSAGES/mutter.mo
    /usr/share/locale/eo/LC_MESSAGES/mutter.mo
    /usr/share/locale/es/LC_MESSAGES/mutter.mo
    /usr/share/locale/et/LC_MESSAGES/mutter.mo
    /usr/share/locale/eu/LC_MESSAGES/mutter.mo
    /usr/share/locale/fa/LC_MESSAGES/mutter.mo
    /usr/share/locale/fi/LC_MESSAGES/mutter.mo
    /usr/share/locale/fr/LC_MESSAGES/mutter.mo
    /usr/share/locale/ga/LC_MESSAGES/mutter.mo
    /usr/share/locale/gl/LC_MESSAGES/mutter.mo
    /usr/share/locale/gu/LC_MESSAGES/mutter.mo
    /usr/share/locale/ha/LC_MESSAGES/mutter.mo
    /usr/share/locale/he/LC_MESSAGES/mutter.mo
    /usr/share/locale/hi/LC_MESSAGES/mutter.mo
    /usr/share/locale/hr/LC_MESSAGES/mutter.mo
    /usr/share/locale/hu/LC_MESSAGES/mutter.mo
    /usr/share/locale/hy/LC_MESSAGES/mutter.mo
    /usr/share/locale/id/LC_MESSAGES/mutter.mo
    /usr/share/locale/ig/LC_MESSAGES/mutter.mo
    /usr/share/locale/is/LC_MESSAGES/mutter.mo
    /usr/share/locale/it/LC_MESSAGES/mutter.mo
    /usr/share/locale/ja/LC_MESSAGES/mutter.mo
    /usr/share/locale/ka/LC_MESSAGES/mutter.mo
    /usr/share/locale/kn/LC_MESSAGES/mutter.mo
    /usr/share/locale/ko/LC_MESSAGES/mutter.mo
    /usr/share/locale/ku/LC_MESSAGES/mutter.mo
    /usr/share/locale/la/LC_MESSAGES/mutter.mo
    /usr/share/locale/lt/LC_MESSAGES/mutter.mo
    /usr/share/locale/lv/LC_MESSAGES/mutter.mo
    /usr/share/locale/mai/LC_MESSAGES/mutter.mo
    /usr/share/locale/mg/LC_MESSAGES/mutter.mo
    /usr/share/locale/mk/LC_MESSAGES/mutter.mo
    /usr/share/locale/ml/LC_MESSAGES/mutter.mo
    /usr/share/locale/mn/LC_MESSAGES/mutter.mo
    /usr/share/locale/mr/LC_MESSAGES/mutter.mo
    /usr/share/locale/ms/LC_MESSAGES/mutter.mo
    /usr/share/locale/nb/LC_MESSAGES/mutter.mo
    /usr/share/locale/nds/LC_MESSAGES/mutter.mo
    /usr/share/locale/pa/LC_MESSAGES/mutter.mo
    /usr/share/locale/pl/LC_MESSAGES/mutter.mo
    /usr/share/locale/pt/LC_MESSAGES/mutter.mo
    /usr/share/locale/pt_BR/LC_MESSAGES/mutter.mo
    /usr/share/locale/ro/LC_MESSAGES/mutter.mo
    /usr/share/locale/ru/LC_MESSAGES/mutter.mo
    /usr/share/locale/rw/LC_MESSAGES/mutter.mo
    /usr/share/locale/si/LC_MESSAGES/mutter.mo
    /usr/share/locale/sk/LC_MESSAGES/mutter.mo
    /usr/share/locale/sl/LC_MESSAGES/mutter.mo
    /usr/share/locale/sq/LC_MESSAGES/mutter.mo
    /usr/share/locale/sr/LC_MESSAGES/mutter.mo
    /usr/share/locale/sr@latin/LC_MESSAGES/mutter.mo
    /usr/share/locale/sv/LC_MESSAGES/mutter.mo
    /usr/share/locale/ta/LC_MESSAGES/mutter.mo
    /usr/share/locale/te/LC_MESSAGES/mutter.mo
    /usr/share/locale/th/LC_MESSAGES/mutter.mo
    /usr/share/locale/tk/LC_MESSAGES/mutter.mo
    /usr/share/locale/tr/LC_MESSAGES/mutter.mo
    /usr/share/locale/ug/LC_MESSAGES/mutter.mo
    /usr/share/locale/uk/LC_MESSAGES/mutter.mo
    /usr/share/locale/vi/LC_MESSAGES/mutter.mo
    /usr/share/locale/wa/LC_MESSAGES/mutter.mo
    /usr/share/locale/xh/LC_MESSAGES/mutter.mo
    /usr/share/locale/yo/LC_MESSAGES/mutter.mo
    /usr/share/locale/zh_CN/LC_MESSAGES/mutter.mo
    /usr/share/locale/zh_HK/LC_MESSAGES/mutter.mo
    /usr/share/locale/zh_TW/LC_MESSAGES/mutter.mo
    /usr/share/man/man1/mutter-message.1.gz
    /usr/share/man/man1/mutter-theme-viewer.1.gz
    /usr/share/man/man1/mutter-window-demo.1.gz
    /usr/share/man/man1/mutter.1.gz
    /usr/share/mutter/icons
    /usr/share/mutter/icons/mutter-window-demo.png
    /var/lib/dpkg/info/gir1.2-mutter-3.0.list
    /var/lib/dpkg/info/gir1.2-mutter-3.0.md5sums
    /var/lib/dpkg/info/libmutter0.list
    /var/lib/dpkg/info/libmutter0.md5sums
    /var/lib/dpkg/info/libmutter0.postinst
    /var/lib/dpkg/info/libmutter0.postrm
    /var/lib/dpkg/info/libmutter0.shlibs
    /var/lib/dpkg/info/mutter-common.list
    /var/lib/dpkg/info/mutter-common.md5sums
    /var/lib/dpkg/info/mutter-common.preinst
    

    To get the window manager running my thinking was that I would just turn off the Gnome Desktop Manager and then run X from .xinitrc like so:

    $ /etc/init.d/gdm3 stop
    $ cat .xinitrc
    #!/bin/bash
    [[ -f ~/.Xresources ]] && xrdb -merge ~/.Xresources
    exec mutter
    exec xterm -maximized
    $ startx
    

    Is this the right way to go about starting an xterm with the window manager enabled? I think I remember reading somewhere that only one exec is allowed in .xinitrc, so maybe I am trying this the wrong way?

    • Rolf
      Rolf over 6 years
      When I try to run mutter standalone, it refuses and complains about "unsupported session". So I'm running kwin_wayland instead. It doesn't complain.
  • mulllhausen
    mulllhausen over 10 years
    very good :) any tips on finding where the mutter executable is?
  • mulllhausen
    mulllhausen over 10 years
    actually never mind. i just went sudo apt-get install mutter and now its on the $PATH. i will add this to your answer
  • mulllhausen
    mulllhausen over 10 years
    i just checked and even sudo locate ... does not look inside /usr/bin/ so mutter was probably there all along!
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 10 years
    @mulllhausen locate definitely looks inside /usr/bin. It looks like your locate database isn't up-to-date. Run sudo updatedb.
  • mulllhausen
    mulllhausen over 10 years
    i could have sworn i did that! haha well you are right - its looking in there now :P
  • mulllhausen
    mulllhausen over 10 years
    i like the second method you posted as it should work with the maximised flag. however it seems to be a race condition and sometimes the xterm is not maximised (i'm guessing because the window manager has not finished initialising by the time the xterm command runs). any tips on checking if it is loaded before running the xterm -maximized command? maybe using wmctrl?
  • Gilles 'SO- stop being evil'
    Gilles 'SO- stop being evil' over 10 years
    @mulllhausen xtoolwait xterm & (there's a Debian package). But if you're trying to do anything fancy, Mutter is probably not the window manager for you. There are dozens of window managers around, including some that are designed for configurability.
  • mulllhausen
    mulllhausen over 10 years
    its ok i like that mutter is minimal. i'm actually really pleased with my setup now! many thanks for all the help. xtoolwait looks like just the thing i'm after. i got it working with sleep 2 but that was pretty dodgy