Posts with the tag Sway:

Sway and Systemd Details

If you got linked to the toplevel of this file, something went wrong. The main post is Sway and systemd. This post is intended as technical details and the “why”. The main post has the motivation and for all of this. SDDM /etc/sddm.conf.d/autologin.conf is the only config file I have here. [Autologin] User=ongy Session=sway-systemd.desktop Sway stuff sway.desktop This is the .desktop file that should be used for our sway session. It’s placed into /usr/share/wayland-sessions/sway-systemd.desktop [Desktop Entry] Name=Sway Service Comment=Start sway via systemd Exec=sway-service.sh Type=Application It needs a secondary shell script, for me it’s at /usr/local/bin/sway-service.sh #!/bin/sh systemctl --user import-environment exec systemctl --wait --user start sway.

Sway and Systemd

For some reason, that I don’t even remember, I wanted to have my user daemons started by systemd. Partially as an exercise, partially to have them auto-restart and to get a bit more familiar with the concept. The first task to get this done, is to start sway (or whatever compositor you use) via systemd, so we don’t run into any timing problems. While logging into a tty and starting sway works fine, I decided I want to directly boot into sway. My boot queries for the disk encryption passphrase on boot either way. Start the user instance Most of what I wanted to use is done by the systemd --user instance started for every user on login.