You are not logged in.

#1 2026-02-21 03:13:10

ArchEr9
Member
Registered: 2025-03-18
Posts: 39

How to run the SDDM display manager rootless to start KDE

I have followed the steps given in the Arch Wiki SDDM article  to run sddm rootless. The result is that the wayland compositor runs rootless but not SDDM. SDDM still runs with root privileges. Please see the output given below

$ sudo ps -o user=,pid=,ppid=,cmd= -C sddm-helper,sddm,startplasma-wayland,kwin_wayland_wrapper,kwin_wayland,Xwayland,"systemd --user"
root           1       0 /usr/lib/systemd/systemd --switched-root --system --deserialize=44
root        1121       1 /usr/bin/sddm
root        1341    1121 /usr/lib/sddm/sddm-helper --socket /tmp/sddm-auth-xxxxx --id 1 --start /usr/lib/plasma-
usera       1346       1 /usr/lib/systemd/systemd --user
usera       1373    1341 /usr/bin/startplasma-wayland
usera       1381    1346 /usr/bin/kwin_wayland_wrapper --xwayland
usera       1393    1381 /usr/bin/kwin_wayland --wayland-fd 7 --socket wayland-0 --xwayland-fd 8 --xwayland-fd 9 --xwayland-display :0 --xwayla
usera       1412    1393 /usr/bin/Xwayland :0 -auth /run/user/1001/xauth_AItnKm -listenfd 8 -listenfd 9 -displayfd 66 -wm 68 -rootless -enable-

I checked in the /etc/passwd file and there is a sddm user. But it is not being used to launch any process or do anything.

So my question is that if I want to run the display manager, i.e. sddm, as a non-root user, then how can it be done? Also if SDDM is run with a non-root user, for example using the sddm user, then will it have issues in spawning and launching the various Wayland compositors?

Last edited by ArchEr9 (2026-02-21 12:30:47)

Offline

#2 2026-02-21 15:41:08

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,064

Re: How to run the SDDM display manager rootless to start KDE

The process of the display manager is launched by systemd and as root. The snippet you link is about running the display server i.e. xorg or the wayland compositor that sddm uses to show you the login window as a normal user. If you wanted to enforce the login manager process itself to not run as root you are probably going to run into issues spawning stuff, yes.

This is mostly about having the root owned process be something small and lean and not tied to huge amounts of GUI code. You need some process in that chain that is allowed to invoke root level operations because you are spawning a session for a different (the to be logged in) user).

If you are just using the normal shell, the underlying process is no different. The getty service that will get used in that case will be root launched as well.

Last edited by V1del (2026-02-21 15:45:11)

Offline

#3 2026-02-23 01:57:23

ArchEr9
Member
Registered: 2025-03-18
Posts: 39

Re: How to run the SDDM display manager rootless to start KDE

So if a Display manager, i.e. login manager, is not used but rather user logs in via the shell in Virtual Terminal / TTY session then also the getty service will run as root? In such cases if we execute startx or startplasma-wayland then will the X11 session or Wayland session run as root?

Offline

#4 2026-02-23 08:35:22

seth
Member
From: Don't DM me only for attention
Registered: 2012-09-03
Posts: 73,418

Re: How to run the SDDM display manager rootless to start KDE

the getty service will run as root?

Yes.

if we execute startx or startplasma-wayland then will the X11 session or Wayland session run as root?

No.
You change UID when you log in and your login shell (bash, zsh…) starts form where you run whatever (in this case a display server) as your user.

Offline

Board footer

Powered by FluxBB