Login problem after patching

? You’re saying you can’t switch to TTY with Ctrl+Alt+F2 for example?


There is some ugly workaround to get it working by delaying the startup of sway with lightdm.
(I had to use this nasty trick to get external keyboard and mouse working properly: https://github.com/canonical/lightdm/issues/63#issuecomment-671046962).

Apparently it also helps for the “fallback to lightdm login screen issue”

  1. Create bash script (e.g. /usr/local/bin/start-sway)
Content
#!/bin/sh

# btw, here is also a good place if you also use other DE/WM's next to sway
# and you want to set specific env vars that are only needed for sway / wayland sessions
# e.g. "export MOZ_ENABLE_WAYLAND=1" and things like that...

sleep 2
exec /usr/bin/sway
  1. Make it executable: sudo chmod +x /usr/local/bin/start-sway
  2. Create another wayland session file pointing to the script: /usr/share/wayland-sessions/sway-fix.desktop
Content
[Desktop Entry]
Name=Sway (start-fix)
Comment=An i3-compatible Wayland compositor
Exec=/usr/local/bin/start-sway
Type=Application

That’ll give you an additional option in lightdm:

image

3 Likes