Skip to content

mate-desktop/mate-wayland-session

Repository files navigation

# mate-wayland-session
wayland session using wayfire for the MATE desktop
===

BUILDING MATE-WAYLAND-SESSION
===

You need wayfire installed to run this session, as the startup script and
configuration file are wayfire-specific.

Autotools or meson will install the files in the correct places

WAYFIRE FIREDECOR PLUGIN RECOMMENDED
===

It is recommended that the firedecor wayfire plugin be installed, as this
allows use of a window decorator theme similar to the Menta marco theme. If
this is not available however the session will still work, the first run
setup code wil not attempt to set a MATE specific window decoration
theme but do everything else the same way.

NOTES ON INSTALL DIRECTORIES FOR FIREDECOR THEME
===

Note that for the Menta style window control (min/max/close) buttons to be
used instead of Firedecor's default buttons, the data directory used in
installing mate-wayland-session must be the same as the data directory
used by firedecor, like this:

1: firedecor installed to /usr, mate-wayland-session installed to /usr: Menta window buttons on first run
This is what anyone installing wayfire, firedecor, and mate-wayland session all from their distro's packages will see

2: firedecor installed to /usr/local, mate-wayland-session installed to /usr/local: Menta window buttons on first run
This is what anyone installing both firedecor and mate-wayland-session from local builds to /usr/local will see

3: firedecor installed to /usr, mate-wayland-session installed to /usr/local: firedecor default window buttons used on first run
In this case, copying or symlinking the buttons in usr/local/firedecor/button-styles/mate/ to usr/firedecor/button-styles/mate/ 
will show the Menta buttons next time the compositor is started, but an install to /usr/local is not supposed to touch /usr

4: firedecor installed to /usr/local, mate-wayland-session installed to /usr: firedecor default window buttons used on first run
In this case, copying or symlinking the buttons in usr/firedecor/button-styles/mate/ to usr/local/firedecor/button-styles/mate/
Note that installs of binaries released by distros never touch /usr/local so if your distro does not offer firedecor and you
wish to install firedecor to /usr/local this will be necessary if the Menta style buttons are to be shown.


REPORTING BUGS AND SUBMITTING PATCHES
===
Report new bugs on https://github.com/mate-desktop/mate-wayland-session
Please check for duplicates, *especially* if you are reporting a feature
request.

DETAILS OF MATE-WAYLAND-SESSION
===

This is a simple and for now experimental MATE session using wayfire. Wayfire is a wayland compositor reimplementing much of the look and feel of compiz.

This has been tested and is known to work under SDDM, so it should work under any display manager that supports wayland. This session is shown in the greeter along with the MATE x11 session and all other installed sessions.

For now the session launcher is a script, and a second script (mate-wayland-components.sh) launches the mate programs inside wayfire.  We use the system message bus so this session cannot run simultaniously with an X11 session using dbus on another TTY. We can only launch anything running under wayland from inside the compositor and that is done by adding everything to be autostarted to ~/.config/wayfire.ini 
Note that several other compositors use a similar system. 

Therefore, at first startup find wayfire.ini if the user has copied it to their home directory, and find it in /usr/share/doc if it has not been installed in ~/config. Copy it to ~/.config/mate/wayfire.ini and edit it with sed to add mate-wayland-components.sh and disable starting the default wayfire shell by default. Once made, the session won't edit this file again, so the user can turn the default shell back on if they so desire.

This allows us to start mate-session components such as caja and mate-panel without interfering with any other part of a user's wayfire configuration and without breaking a wayland session run without MATE either. Wayfire-configuration-manager (WCM) will read from and write to the .ini file wayfire was opened with, so it will work. Caja, mate-panel, the notification daemon, and mate-polkit automatically restart if terminated or crashed.

Note that GNOME not MATE gsettings preferences are applied for such things as fonts and icon themes for applications running under wayland as this is the default for GTK under wayland. For applications running under XWayland we still need mate-settings-daemon to apply their theme so they don't default to Adwaita. This has the effect that we can theme wayland and xwayland apps consistantly, but must set both the org/gnome and the org/mate preferences for theme, icon theme, and font etc to do so.

Note that in Wayland GTK also hardcodes many options that are selectable in x11. One of these is headerbars on dialogs, which clashes with the MATE ui and can only be fixed by installing GTK 3 build with the gtk3-classic patches available at https://github.com/lah7/gtk3-classic .

You can re-set the GTK theme, the icon theme, and fonts with dconf-editor in org/gnome/desktop/interface. As
described above, this needs to be done under both the MATE and GNOME toplevels so as to theme wayland and xwayland apps respectively. Since mate-appearance-properties will run with GDK_BACKEND=x11 and connect to mate-settings-daemon also running under the same, this means we should only need to apply the chosen preferences to both MATE and GNOME if a wayland session is in use

A gsettings override file included with this package sets the MATE icon theme and Menta GTK theme and turns off overlay scrolling on a new or default install. Other DE's (other than GNOME) that use gsettings in wayland are also turning to override files to set up their defaults.

As stated above, we recommend that wayfire's "firedecor" plugin be installed. This is a window decorator plugin with more features that the default SSD decorator, including the ability to theme the window control buttons and change the font color. Both of these are necessary to allow setting a default window decorator theme similar to the Menta marco theme in x11. If the firedecor plugin is not installed, this code is simply ignored and the window decoration defaults to wayfire's default ssd decoration theme.

Another decorator is under development that can read marco themes at
https://github.com/marcof-nikogo/wf-external-decoration
but development has just started. This early there are many issues with it but once installed it can be turned on from wcm (wayfire configuration manager)

The session defaults to SSD (server-side decoration) rather than wayfire's default of CSD (client-side decoration) due to several issues with using CSD on MATE apps. If CSD is selected by the user, the window decorator theme set in the GTK theme for CSD apps is applied and will often be a good match for the marco theme (since we don't use headerbars in MATE), but caja navigation windows become difficult to move (cannot be dragged by the titlebar and require the keyboard "super" key amd left mouse button to move or the keyboard "super" key amd right mouse button to resize. On top of that, some windows such as mate-terminal get geometry issues. Thus we default to the traditional server-side decoration and windows work normally.

Obviously we don't use an xsettings manager as we are not running under Xorg. Wayland compositors control a lot more of the session than X11 window managers do, wayfire thus does in wayland all of what marco would do in x11 plus some of what mate-session-manager mate-settings-daemon would do.

Wayfire Configuration Manager (WCM) recommended
===

Wayfire Configuration Manager provides a gui very much like that of CCSM for compiz, and allows controlling many options that in a wayland session are managed by the compositor.