Skip to content

Port to Wayland

Gaël Bonithon requested to merge Tamaranch/xfce4-session:port-to-wayland into master

Once again, porting to Wayland is a big word: it's more a question of protecting X11 code paths without being able to provide a Wayland counterpart. That said, it does allow us to get back the D-Bus session management interface and the ability to set apps to be run on login, logout, etc.

As we don't yet have our own compositor, and it's therefore unclear exactly how we'll launch the Xfce session when the time comes, I've made do with minimal adaptations, which can/should be considered temporary. This applies in particular to the failsafe session (loaded from the xfconf channel), and to startxfce4.

In the latter case, I've added a --wayland option, which uses labwc by default. As indicated in the help, it is possible to specify an alternative compositor - in fact, an alternative command - which will then be passed xfce4-session as an argument. Not sure many compositors have an option equivalent to labwc's --startup though, so to use another compositor you'll probably have to add xfce4-session somewhere in its configuration.

To use wayfire, for example, you'll need to add this to ~/.config/wayfire.ini:

[autostart]
session = xfce4-session

To launch the Xfce session, just do startxfce4 --wayland from a tty, or use a display manager, where it should normally be displayed as "Xfce Session (Wayland)" (I tested with LightDM).

Merge request reports