GNOME Mutter Merges XDG Session Management Wayland Protocol

Written by Michael Larabel in GNOME on 14 September 2024 at 10:33 AM EDT. 23 Comments
GNOME
As a very last minute change ahead of tagging GNOME Mutter 47, merged this morning to Mutter is support for the XDG session management Wayland protocol. This protocol is useful for letting clients request support from the compositor for saving the window state for use on future executions. However, it's currently disabled by default and won't be entirely baked until GNOME 48.

The two-month old merge request by Carlos Garnacho for plumbing XDG session management protocol support into Mutter has been merged ahead of next week's GNOME 47.

As explained by Carlos in the merge request:
"Implement the XDG session management protocol, in order to allow clients to ask the compositor to save window state for them. This works via creating a xdg_session_v1 object that lets the client obtain a session ID to persistently identify the client's session on future executions. This object may also be used to register xdg_toplevels with a specific name, so that their state is tracked and remembered.

Underneath this is implemented as a Gvdb file at ~/.local/share to store the state of all client sessions, and allowing reasonably fast access to each of them, even though there is no support for X11 applications, the per-window details that are saved are specified in a windowing-specific manner."

While this was merged minutes ago and will be found in GNOME 47, it's disabled by default. The hope is for GNOME 48 to be able to expose this feature by default within both Mutter and the GTK toolkit.

Mutter session


For the upstream Wayland Protocols around xdg-session-management, it's been open the past four years. The upstream description is:
"For a variety of cases it's desirable to have a method for negotiating the restoration of previously-used states for a client's windows. This helps for e.g., a compositor/client crashing (definitely not due to bugs) or a backgrounded client deciding to temporarily destroy its surfaces in order to conserve resources.

This protocol adds a method for managing such negotiation and is loosely based on the Enlightenment "session recovery" protocol which has been implemented and functional for roughly two years."

Here's to hoping that the XDG Session Management protocol support gets all ironed out in time for the spring 2025 Linux distribution releases with GNOME 48 and other desktops.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week