[SOLVED] Xorg starts from root user 09 November 2020, 12:59:18 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? Last Edit: 14 November 2020, 19:19:45 by nous
Re: Xorg starts from root user Reply #1 – 09 November 2020, 13:37:30 You can try read wiki https://wiki.archlinux.org/index.php/xorg#Rootless_Xorg
Re: Xorg starts from root user Reply #2 – 09 November 2020, 13:44:06 Quote from: alium – on 09 November 2020, 13:37:30You can try read wiki https://wiki.archlinux.org/index.php/xorg#Rootless_XorgDon't you think that xorg should start from regular user by default?
Re: Xorg starts from root user Reply #3 – 09 November 2020, 14:47:09 Quote from: fehigax145 – on 09 November 2020, 13:44:06Don'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.
Re: Xorg starts from root user Reply #4 – 09 November 2020, 14:54:43 Quote from: Dudemanguy – on 09 November 2020, 14:47:09It 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.
Re: Xorg starts from root user Reply #5 – 09 November 2020, 15:21:27 Quote from: fehigax145 – on 09 November 2020, 14:54:43Is there a boot runlevel in runit? By default elogind is in"default" runlevel.That's the one for runit. Did you enable it there?
Re: Xorg starts from root user Reply #6 – 09 November 2020, 15:26:59 Quote from: Dudemanguy – on 09 November 2020, 15:21:27That's the one for runit. Did you enable it there?Yeah, it was already enabled.
Re: Xorg starts from root user Reply #7 – 09 November 2020, 16:35:46 Is xorg-xwrapper installed in your system?
Re: Xorg starts from root user Reply #8 – 09 November 2020, 17:05:30 Quote from: nous – on 09 November 2020, 16:35:46Is xorg-xwrapper installed in your system?No, it isn't. Should I add needs_root_rights = no to it's config file?
Re: Xorg starts from root user Reply #9 – 14 November 2020, 15:13:37 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.
Re: Xorg starts from root user Reply #10 – 14 November 2020, 16:26:27 Quote from: nous – on 14 November 2020, 15:13:37If 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.
Re: Xorg starts from root user Reply #11 – 14 November 2020, 19:07:24 Good to know it works both ways.