User environment - Sawangg/dotfiles GitHub Wiki

We need to configure our user environment to be able to run graphical apps and more. Because we're not using either systemd or logind, it will be harder but if you follow this guide, you'll have all the necessary tools to properly manager your sessions, seats and dbus!

Seat tracker

We previously installed seatd in the introduction, you just need to add your current user to those groups

doas usermod -aG seat,video,audio,input $(whoami)

You can check you groups using the groups command.

Enable the service as ROOT and start it if necessary

doas dinitctl enable seatd

We now have proper seat support. During your use of the system, you might install elogind as a dependency (especially when installing a package with polkit). You can forcefully remove it by running

doas pacman -Rdd elogind

Dinit user services

Now that we have a seat tracker, we need a login tracker, that's where. Execute the following commands

doas pacman -S turnstile turnstile-dinit pambase-turnstile

Make sure you have this line in /etc/pam.d/system-login if it wasn't added automatically at the end of the file

session    optional    pam_turnstile.so

Once you're sure that the line was added, open /etc/turnstile/turnstiled.conf and change the value of manage_rundir from no to yes

Next enable the service AS ROOT and start it if necessary

doas dinitctl enable turnstiled

Exit your current session and log back in. You can now use dinitctl list as a non-root user. If you want to add your user services, place them in ~/.config/dinit.d/ and symlink to ~/.config/dinit.d/boot.d if you want to start them when you log in.

Dbus as a user

Because we're not using elogind, we don't have proper user dbus support. We're going to install a package that does that for us

doas pacman -S dbus-dinit-user

This service will now start when another service like pipewire requires a dbus session.