Artix Linux Forum

Init systems => dinit => Topic started by: hys on 18 August 2025, 02:04:50

Title: rootless SDDM?
Post by: hys on 18 August 2025, 02:04:50
Is there a way to run rootless SDDM on a dinit system, like the method described on the Arch Wiki?

https://wiki.archlinux.org/title/SDDM#Rootless

I followed the steps with my current KWin installation, but it seems the greeter crashes with the wiki's configuration.

Has anyone tried this before?
Title: Re: rootless SDDM?
Post by: Shoun2137 on 18 August 2025, 23:31:43
There are some quirks and bugs with how SDDM works on Arch-like distros. Namely, SDDM can't change the VTs on itself (due to X not having proper permissions even if you configure everything correctly), so when running rootlessly it'll spawn and work properly only on VT1. I'm running i3wm+XLibre+OpenRC and X11 works fine rootlessly. Here's how I configured it:

# /etc/X11/Xwrapper.config
Code: [Select]
needs_root_rights=no
allowed_users=anybody
# /etc/sddm.conf
Code: [Select]
[General]
DisplayServer=x11-user
[X11]
ServerArguments=-nolisten tcp
DisplayCommand=/usr/share/sddm/scripts/Xsetup
DisplayStopCommand=/usr/share/sddm/scripts/Xstop
EnableHiDPI=true
SessionCommand=/usr/share/sddm/scripts/Xsession
SessionDir=/usr/share/xsessions
SessionLogFile=
UserAuthFile=.Xauthority
XauthPath=/usr/bin/xauth
XephyrPath=/usr/bin/Xephyr
ServerPath=/usr/lib/Xorg
# /etc/X11/xinit/xserverrc
Code: [Select]
#!/bin/sh
# default:
# exec /usr/bin/X -nolisten tcp "$@"
# new rootless:
/usr/bin/X -nolisten tcp "$@" -keeptty vt$XDG_VTNR

- If your init has agetty plugged to tty1, you need to remove it entirely from running as a service, because this takes over VT1's priority, For OpenRC, I recommend replacing /etc/init.d/agetty.tty1 with empty file (or /bin/true) and then setting the file attribute as immutable (chattr +i), because pacman will replace this file when OpenRC (or your init) is updated.
- If you're running proprietary novideo driver, you'll need to preload your driver modules (early KMS) Look here: https://github.com/korvahannu/arch-nvidia-drivers-installation-guide < I recommend running nvidia-dkms over nvidia