Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Running Sway (Wayland) on Void Linux (without SystemD)

Running Sway on Void Linux (without SystemD)

elogind is the part of SystemD logind that can run as standalone. So we need it to run Sway without SystemD. To do that we need to build wlroots with elogind option. Then we can install and use Sway as normal from the current repo. There are other ways to achieve this without elogind here. But I tried with the elogind option and I was successful.

UPDATE: I tried again on a fresh install. The elogind option is set by default on the repo version. So you can skip the xbps-src command below and continue. wlroots should install as a dependency of sway if you follow the later commands.

git clone git://
cd void-packages
./xbps-src binary-bootstrap
./xbps-src pkg wlroots -o elogind
sudo xbps-install --repository=hostdir/binpkgs wlroots

Install things necessary and enable dbus also:

sudo xbps-install elogind sway dmenu rxvt-unicode sakura
sudo ln -s /etc/sv/dbus /var/services/

rxvt-unicode and sakura are optional. Sakura is Wayland supported, so it is good to have it handy.

You may also want to install swaylock and swayidle if you need.

Let's create the config directory for Sway: mkdir -p ~/.config/sway/

Now copy your i3config to ~/.config/sway/ or if you want to use the template config from Sway: cp /etc/sway/config ~/.config/sway/config

Now edit ~/.config/sway/config if necessary.

If you want to launch Sway directly after booting:

Run nano ~/.bashrc and add:

# If running from tty1, start sway
if [ "$(tty)" = "/dev/tty1" ]; then
	exec sway

If it says that XDG_RUNTIME_DIR is not found, then this to fix it:

mkdir -p /tmp/swaytmp
export XDG_RUNTIME_DIR=/tmp/swaytmp

To kill the Sway session, $mod+Shift+e. $mod is the Super or Windows key by default if you didn't change it on config.


Copy link

crocket commented Oct 18, 2021

Sway can run with seatd instead of logind. Sway even runs without seatd.

Copy link

PercyTheB commented Feb 17, 2022

followed these instructions, and it still doesn't work. Starting sway by typing 'sway' returns this error

[wlr] [libseat] [libseat/backend/logind.c:310] Could not activate session: Permission denied [wlr] [libseat] [libseat/libseat.c:79] No backend was able to open a seat [wlr] [backend/session/session.c:84] Unable to create seat: Function not implemented [wlr] [backend/session/session.c:218] Failed to load session backend [sway/server.c:53] Unable to create backend

Copy link

crocket commented Feb 17, 2022

You should look up the error messages on search engines. Don't use google. Use searx, duckduckgo, presearch, startpage, ...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment