Reply To: What is turnstiled?

Forum › Forums › Official Releases › antiX-26 “Stephen Kapos” › What is turnstiled? › Reply To: What is turnstiled?

#206718
anticapitalX
Member

    Thanks @anti-apXos for the clean summary — those two functions you listed (launching a user-owned service-manager instance, and creating XDG_RUNTIME_DIR) are exactly the practical bits I ended up dealing with myself, but from the opposite direction: a build that has neither turnstiled nor desktop-session installed at all.

    A bit of context on the setup, since it’s relevant here: I purged slimski entirely, and disabled seatd (couldn’t purge it without losing xorg-server). The graphical session starts with startx directly from tty1, triggered by a script in ‘/etc/dinit.d/boot.d/tty1’, with IceWM as the window manager. No display manager, no desktop-session, no turnstiled.

    That’s about as minimal as it gets, and it ran straight into the exact gap @anti-apXos described. With turnstiled gone and desktop-session never in the picture, nothing ever sets ‘XDG_RUNTIME_DIR’. I only noticed because ‘app-select’ crashed outright with an unhandled ‘KeyError’ on that variable, since the script assumes it always exists.

    My first fix was a workaround rather than a real solution: a small dinit service to recreate ‘/run/user/1000’ on boot (since ‘/run’ is tmpfs and won’t survive a reboot), plus an export line in ‘~/.bash_profile’. It worked, but it felt like patching around the gap rather than closing it properly.

    @Dave’s pointer to the ‘desktop-session-xdg-dirs.sh’ script in the desktop-session-antix repo turned out to be the cleaner answer. I stripped out the ‘echo_variable’, ‘say’ and ‘warn’ calls (which depend on the rest of desktop-session and would fail standalone), saved the result as ‘/usr/local/lib/desktop-session-xdg-dirs.sh’, and source it from ‘~/.xinitrc’ right before ‘exec icewm-session’. That sets all the XDG variables in one consistent place, exactly when the session needs them, instead of splitting the logic between a dinit service and bash_profile.

    So from where I sit, this thread’s conclusion matches what I found in practice. Turnstiled is genuinely not essential — @anticapitalista is right that nothing breaks without it — but it is doing real, useful work for anyone who isn’t also running desktop-session. Without either one, ‘XDG_RUNTIME_DIR’ has to be set explicitly by hand, and at least one application (‘app-select’) will hard-fail with an unhandled exception rather than degrading gracefully when it’s missing.

    For what it’s worth, none of the other services @anti-apXos mentioned disabling caused me any issues either. Alongside turnstiled, I’m currently running with all of the following turned off:

    • seatd
    • sshd
    • saned
    • cupsd
    • dhcpcd
    • gpm
    • cron
    • smartd
    • acpid
    • bluetoothd

    The init-diversity approach really does hold up under this kind of stress-testing: each of these pieces is narrow enough in scope that you can pull it out and patch the one specific gap it leaves (in this case, just the runtime dir), rather than losing a whole stack of functionality at once.

    Let's accept antiX as it is
    Pure and Elegant by its nature