Debian Stretch: How do I make Wayland the default?

I am running Debian Stretch 9.1 with GNOME 3 as the desktop environment and GDM for session management. I tried GNOME on Wayland from GDM (gear icon) and it works very well. I would now like to configure an autologin to GNOME on Wayland.

I am able to log into GNOME on Wayland by default without autologin. I am able to autologin but only on GNOME on X. The latter is my current configuration.

Any pointers would be very much appreciated.

What didn’t work

After reading Q&As from other distros I tried adding the following to /etc/gdm3/daemon.conf in the daemon section (one at a time). None of these options works. DefaultSessions does not appear to be an option in /usr/share/gdm/gdm.schemas.


System info

$ cat /var/lib/AccountsService/users/marc

$ ls /usr/share/xsessions/
gnome-classic.desktop  gnome.desktop

$ ls /usr/share/wayland-sessions/

$ cat /etc/gdm3/daemon.conf 
AutomaticLoginEnable = true
AutomaticLogin = marc

The contents of /usr/share/xsessions/gnome.desktop and /usr/share/wayland-sessions/gnome-wayland.desktop only differ in the Name parameter. The other parameters (except Comment) are as follows.

Asked By: marcv81


The configuration is correct. Autologin should log a user into their previous session, it is not a parameter. However there is a bug in gdm3 which prevents it from working as expected.

The bug is fixed upstream: It is released in GNOME 3.25.3, but Stretch is at 3.22.3. Fortunately the patch applies cleanly on 3.22.3.

I built a patched gdm3.

The patched packages do fix the bug indeed. I can autologin with GNOME on Wayland without any configuration change.

Answered By: marcv81
Categories: Answers Tags: , , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.