I'm running Arch with Gnome3 and GDM 3.30.2. I'm in the process of switching to Sway, and am running into some configuration headaches:

  1. Sway sometimes fails to appear in the GDM session list.
  2. How to set Sway as the default session?

Question 1: Why is Sway sometimes omitted from the login session list?

As I understand it, GDM is native Wayland, and Wayland sessions are described in

ls /usr/share/wayland-sessions
> gnome.desktop
> sway.desktop 

To the best of my knowledge, these files are configured correctly. For example, sway.desktop reads:

[Desktop Entry]
Comment=SirCmpwn's Wayland window manager

So why doesn't Sway always appear in the GDM session list? I can't see any clear pattern as to when it does/doesn't appear, it just occasionally (1/3-4 times) doesn't appear. Is there anywhere else GDM looks when populating this list? I'm aware that there's also /etc/usr/xsessions, but it seems odd to put Sway here when it's a wayland session. Any tips for diagonising this very welcome!

Question 2: Setting Sway as the default session.

At the moment Gnome is the default session. A lot of googling has not turned up a clear answer for how I might set this. I found info on /.dmrc (no longer used in Gnome3), and instructions to modify settings in /etc/usr/xsessions... although this seems really backwards, as I'm entirely running Wayland.

How do I do this?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.