Hey guys! I'm using xorg-xinit. startx runs xorg from root user. I have elogind-runit installed. Tried it on Arch virtual machine and xorg runs from regular user. How do I fix this security vulnerability?
You can try read wiki https://wiki.archlinux.org/index.php/xorg#Rootless_Xorg
Don't you think that xorg should start from regular user by default?
It does if you have elogind enabled and running. Make sure you enabled elogind at boot time.
Is there a boot runlevel in runit? By default elogind is in"default" runlevel.
That's the one for runit. Did you enable it there?
Yeah, it was already enabled.
Is xorg-xwrapper installed in your system?
No, it isn't. Should I add needs_root_rights = no to it's config file?
If you set up from base ISO, then your either missed something or added something; the DE ISOs start X rootless. If asked about xorg-xwrapper because it might be one reason your X is root-started. It doesn't hurt to try adding needs_root_rights=no and see how it goes.
I set up my system from the base ISO. I haven't done any configuration to neither nvidia driver or xorg. I found out that by default xorg starts by root if nvidia drivers are used. But if I add needs_root_rights = no to /etc/X11/Xwrapper.config everything goes fine and xorg starts from regular user.
Good to know it works both ways.