startx
as an unprivileged user and never noticed it running as root. I wouldn't think this could happen because sudo
wasn't used. If the target binary (X) is setuid, and in this case it is, the binary will run with the permissions of the owner which is the root user. If you unset the setuid bit from the binary (X) and invoke it as a regular user it will fail to initialize.Interesting. Not sure why that would happen. I invoke startx as an unprivileged user
Interesting. Not sure why that would happen. I invokestartx
as an unprivileged user and never noticed it running as root. I wouldn't think this could happen becausesudo
wasn't used.
Are you using a display manager (xdm, sddm, gdm, lightdm)?
If the target binary (X) is setuid, and in this case it is, the binary will run with the permissions of the owner which is the root user. If you unset the setuid bit from the binary (X) and invoke it as a regular user it will fail to initialize.
Normally, to run the server itself as an unprivileged user you need session management in the form of (e)logind that tracks authenticated logins and grants the required permissions.
Yes.So it is expected to run as root in default install?
Xorg clients (GUIs) including urxvt should run as your own (unprivileged) user.What about URxvt?
Yes.
Xorg clients (GUIs) including urxvt should run as your own (unprivileged) user.