It's been rumbling for some time in various scattered threads. I decided to consolidate this into one thread and announce it.
For some time, Artix has added turnstile on an
experimental basis, it (combined with other packages) can't replace elogind on a full-time basis, yet.
What is it?- a session/login tracker
- a service-manager-agnostic way to manage per-user service managers for user services
For more information, see: its GitHub page (https://github.com/chimera-linux/turnstile)
And what about seatd?turnstile itself is not (and will never be, since logind also handles more things than session tracking) a full-fledged
logind replacement, so you'll also need
seatd and
acpid if you want a true
elogind-less setup, and they work quite nicely together.
Can we run it in $init?Yes.
turnstiled is a daemon and can be run in any init you wish. For
runit and
s6 though you may want to create your own until their maintainers create packages for turnstile.
However, for the user services part, currently it only has support for
dinit and
runit backends. However, Artix currently has support only for
dinit backend, with user services such as
dbus,
pipewire (including
pipewire-pulse), and
wireplumber (more services will available under the
dinit-user-services group).
So for now, you can have OpenRC/s6/runit as your init and system service manager, but have dinit as your user service manager.
Support statusOpenRC as system init:
available, untestedrunit as system init:
N/As6 as system init:
N/Adinit as system init:
available, I'm using it dailyrunit as user services manager:
available, untesteds6 as user services manager:
N/A, no backend availabledinit as user services manager:
available, I'm using it dailyNOTE: Packaging-wise, only dinit is available as it can be separately installed as
dinit-base without conflicting to other inits.
To set your backend, edit
/etc/turnstile/turnstiled.conf.
InstallationPlease note that support is considered experimental.
See wiki page (https://wiki.artixlinux.org/Main/Turnstile).
Features- Session tracking
See /run/turnstiled/$(id-u)/session.* for example of how your session is tracked - User services management
turnstile will automatically provide user services management through its backends (https://github.com/chimera-linux/turnstile/tree/master/backend), you can use what is officially supported or even write your own (if you have something unsupported by default). Quite handy for graphical sessions.
I have provided some of the packages, such as mpd-dinit-user, dbus-dinit-user, and pipewire-dinit, as turnstile support for Artix matures I expect more dinit packages in mainline will be moved to user packages (such as syncthing) - Rundir management
turnstile also provides full replacement for pam_rundir, turnstile can manage user's $XDG_RUNTIME_DIR.
To make turnstile manage rundir, edit /etc/turnstile/turnstiled.conf and set manage_rundir to yes
WARNING: You will need to remove elogind by issuing pacman -Rdd elogind, otherwise elogind and turnstile will conflict.
Since elogind also provides seat management, you may want to install and enable seatd service. See seatd forum post (https://forum.artixlinux.org/index.php/topic,3050.0.html) for more information about seatd installation (particularly adding user to group).
Since elogind also handles ACPI, you may want to install and enable acpid.
- Automatic dbus session handling
I know some of you might hate dbus, but for those who don't mind, it can also handle $DBUS_SESSION_BUS_ADDRESS nicely because of how turnstile handles user services. See dbus-dinit-user package. At least your .xinitrc will be cleaner as a result.
Issuespolkit might not fully work, you'll need this patch (https://github.com/chimera-linux/cports/blob/master/main/polkit/patches/turnstile.patch) The patch should be included in Artix.- To make turnstile manage rundir while elogind is installed, you'll need this patch (https://github.com/chimera-linux/cports/blob/master/main/elogind/patches/no-runtime-dir.patch), full support lingering through turnstile is also managed this way (https://github.com/chimera-linux/cports/blob/master/main/elogind/patches/linger-path.patch).
- TBA
Report any issues regarding Artix turnstile implementation
here and
do not open an issue directly to turnstile's GitHub page before we can confirm it's a bug.
Enjoy testing, and happy hacking!
System init: dinit.
The problem that I have with turnstile is the DISPLAY variable.
Picom, pasystray and lisgd (for gestures) need it .
So I use a shell script instead that it is launched inside the session.
Committed a new file (https://gitea.artixlinux.org/artix/dinit-rc/commit/fe86ee00879a0060759765a909d51802c46bf8d2) to /etc/X11/xinit/xinitrc.d so dinit reads $DISPLAY and XAUTHORITY. Your script shouldn't be necessary anymore.
Update your dinit-rc to 0.3.6, or wait until it reaches your mirror.
I updated dinit-rc to 0.3.6 and rebooted.
Picom and pasystray services failed to start with display error.
No lisgd here.
E.g. picom error:
[ ... main FATAL ERROR ] Can't open display.
What's the content of your .xinitrc file?
I do not have it.
I use ~/.config/bspwm/bspwmrc.
and how do you start
bspwm from login?
startx?
I use a login manager and gui stuff starts fine now, they work for me, only things that are missing are the rest of the misc. qt variables for instance, they aren't passed even if added in /etc/environment (wondering why, that should override everything right?)
Which variables? Not a Qt user here.
Also,
dinit reads it from
/etc/dinit/environment according to the manpage (only for system instance though (https://github.com/davmac314/dinit/blob/213d3fb1bff820f9cbe981193ad06c103d787405/src/dinit.cc#L487), since we're talking user instance here, it won't be read).
I use tinydm (https://aur.archlinux.org/packages/tinydm).
tinydm-1.1.3-1
tinydm source (https://gitlab.com/postmarketOS/tinydm)
pacman -Ql tinydm
tinydm /etc/
tinydm /etc/tinydm.d/
tinydm /etc/tinydm.d/env-wayland.d/
tinydm /etc/tinydm.d/env-x11.d/
Try to copy
/etc/X11/xinit/xinitrc.d/01-dinit-env.sh to
/etc/tinydm.d/env-x11.d/.
It did not work.
Alright, I'll have to look into this later since
- tinydm is never a supported DM (it's essentially a glorified autologin which you can do it from /etc/dinit.d/config/agetty-${tty}.conf)
- I can't even get it to run
- I can't reproduce it by logging in through lxdm or lightdm (logging into openbox-session with picom enabled)
- I can, however, reproduce it when trying to startx directly upon login (without using any DMs, so tty only), I think a workaround can be done at this stage
1. tinydm starts also a GUI session and when that it is closed it restarts it.
Can you do that with /etc/dinit.d/config/agetty-${tty}.conf?
2. In case one doesn't know you need to set the session:
tinydm-set-session -f -s /usr/share/xsessions/bspwm.desktop
4. tinydm uses startx https://gitlab.com/postmarketOS/tinydm/-/blob/master/tinydm-run-session.sh?ref_type=heads#L63.
Nearly everything I have has trouble with DISPLAY since wayland integration
ssh -X is all but worthless for a few years now.
I can't get polkit to work and I'm not sure what I'm missing. User services and dbus session handling are both working, as well as multiple user sessions. Really only polkit isn't cooperating.
I tested turnstile again and it does not well.
When I log out the old (user) dinit process it's still there so no user services.
After disabling turnstile something kept spawning it so I rebooted.
I do not have elogind so I set in /etc/turnstile/turnstiled.conf
export_dbus_address = yes
I find a solution for the $DISPLAY error using env-file (man dinit-service):
type = process
command = picom
logfile = $HOME/.local/state/dinit/picom.log
env-file = environment
restart = true
"~" or "$HOME" do not work there while at least $HOME works in "command" so I used the relative path.
The file is in the service folder:
cat .config/dinit.d/environment
DISPLAY=:0
I don't like to be grammar nazi, but enviroment should be environment, so if that's the problem then oof, but if it's a simple mistake only in the post then idk.
It's a mistake, now edited.
It was not a problem of different names.
After reading this thread, I installed the dinit/lxqt version of Artix on an old laptop, installed turnstile and seatd, and then used pacman -Rdd to remove elogind. Once rebooted, the system did work. The only major problem is the inability to elevate to root permission in programs that require it. Shutting down, for example, has to be done via the command line -- "sudo shutdown." Clicking the power off button brings up the do-you-really-want-to message, but when "yes" is clicked, nothing happens. Programs that need to be run as root, like Gparted, won't load at all.
Also, a couple of times, when updating with pacman, elogind has been reinstalled as a requirement for other programs. Each time that happened, I removed elogind and the system still worked afterward.
For what it's worth, I also installed the "experimental" wayland version of lxqt along with wayfire and found that it works nicely. It looks like we're inching closer to a fully-functional version of Artix without elogind and with wayland.
Have you considered making an experimental ISO for Artix that has turnstile and seatd instead of elogind? That might make it easier for more users to tinker with it.
First part sounds like maybe polkit needs elogind. I don't know much about turnstile.
If you don't want to keep uninstalling elogind you could create a dummy package.
pkgname='elogind-dummy'
pkgver=999
pkgrel=1
arch=(any)
provides=('elogind')
conflicts=('elogind')
Also you could try just disabling the elogind service and leave it installed to see if things work better. Could be better , could be worse. As I'm fairly sure some programs can start elogind themselves.
I have no elogind/seatd I think that some package should allow you do that.
I had to overwrite /etc/dinit.d/logind manually https://forum.artixlinux.org/index.php/topic,7626.msg45766.html#msg45766.
For the login1 part - as in reboot/shutdown - indeed polkit needs elogind.
As an alternative sudo or doas can be used to run the respective command, and also to initiate a suspend with a direct write.
artist
Any prospect of turnstiled-s6? Not that it's super urgent, I can keep a 2-line execline script under adminsv just fine.
The recent upgrade that merged dbus-dinit-user and dbus-dinit made it less comfortable to use Turnstile + dinit on other init systems.
# pacman -Syu
:: Synchronizing package databases...
system is up to date
world is up to date
galaxy is up to date
lib32 is up to date
extra is up to date
multilib is up to date
:: Starting full system upgrade...
:: Replace dbus-dinit-user with system/dbus-dinit? [Y/n] n
resolving dependencies...
looking for conflicting packages...
:: dbus-dinit-20250815-3 and dbus-s6-20210918-1 are in conflict (init-dbus). Remove dbus-s6? [y/N] n
error: unresolvable package conflicts detected
error: failed to prepare transaction (conflicting dependencies)
:: dbus-dinit-20250815-3 and dbus-s6-20210918-1 are in conflict
Even if it's fairly easy to work around with a custom PKGBUILD, and Turnstile is non-default/experimental, I think splitting the packages still makes sense; dinit-user-spawn (which I think is the reason for this merger) seems easily portable to other inits and can also work as PID1-independent user services infrastructure, and it would make dinit-dbus more closely equivalent to the other dbus-init packages again.