Is sway compatible with gdm?
yes
Does gdm support wayland or only Xorg?
gdm3 itself runs on wayland. It supports both wayland and Xorg sessions.
How to configure gdm for sway?
You are missing an entry in /usr/share/wayland-sessions
. This folder contains wayland desktop session entries for display managers in general. (Respectivly, X desktop session entries are located in /usr/share/xsessions
).
Create a file /usr/share/wayland-sessions/sway.desktop
with this content:
[Desktop Entry]
Version=1.0
Name=Sway
Comment=Sway - i3 on Wayland
# Please choose matching path
Exec=/usr/bin/sway
#Exec=/usr/local/bin/sway
Type=Application
This entry was missing on my system, too. I've compiled sway from source; wayland-session/xsession entries are rather part of ready-to-use packages. Please make sure the Exec
line matches your path to executeable sway
.
Note that gdm3 does not show entries in /usr/share/wayland-sessions
if your host runs with a proprietary NVIDIA driver. The proprietary NVIDIA driver does not support Wayland. However, the free nouveau
driver does.