View previous topic :: View next topic |
Author |
Message |
Plasticstraweater n00b
Joined: 19 Mar 2024 Posts: 10
|
Posted: Mon Jul 29, 2024 11:06 am Post subject: startx non root fail on systemd |
|
|
Hello.
Recently, after a recent gentoo install , I have been attempting to install kde plasma onto my system however I came to the issue of the server shutting down and not starting at all. When I try to do startx on my account , I get the output
Quote: | X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
Current Operating system: Linux gentwo 6.6.35-gentoo-dist #1 SMP PREEMPT_DYNAMIC Sun Jul 28 17:58:50 BST 2024 x86
Kernel command line: BOOT_IMAGE=/boot_kernel-6.6.35-gentoo-dist root=UUID=4daf31d6-928a-4fc5-8f13-cbc0941e826f ro
Current version of pixman: 0.43.4
Before reporting problems,check http://wiki.x.xorg
to make sure that you have the latest version.
Markers: (--) probed, (**) from config file, (==) default setting,
(++) from command line, (!!) notice=, (II) informational,
(WW) warning, (EE_ error, (NI) not implemented, (??) unknown.
(==) Log file: "/home/[myusername]/.local/share/xorg/Xorg.0.log", TIme: Mon JUl 29 11:48:14 2024
(==) Using system config directory "/usr/share/X11/xorg.conf.d"
waiting for X server to shut down (II) Server terminated successfully (0). Closing log file. |
However when I run it through root then my kde plasma will run everything using root like the terminal.
So far here's my assumption of the problem
I use systemd which doesn't use elogind (Which is what is used by openrc) and I need to get permission for me to run startx without this error. However, this can't be correct as this is an assumption. If any one has any solutions please let me know. Also just to note. The [myusername] part isn't my real username it's just a substitute for my real username. _________________ Life has no replay button |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1699 Location: South America
|
Posted: Mon Jul 29, 2024 12:41 pm Post subject: |
|
|
We need to see the logs (/var/log/Xorg.*) when Xorg fails to be able to help you.
A computer with systemd as the init system uses systemd-logind instead of elogind. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 520
|
Posted: Mon Jul 29, 2024 2:00 pm Post subject: |
|
|
GDH-gentoo wrote: |
A computer with systemd as the init system uses systemd-logind instead of elogind. |
Just out of curiosity: does system-logind (or elogind) actually work with startx? I've found that I've usually had to make Xorg setuid root to be able to use startx, and no display manager.
If there's a way to avoid doing that, I'd like to know it, too
BR, Lars. |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22648
|
Posted: Mon Jul 29, 2024 3:03 pm Post subject: |
|
|
If Xorg is built with USE=elogind or USE=systemd, then yes, Xorg will interact with logind and should not need to be suid. |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1699 Location: South America
|
Posted: Mon Jul 29, 2024 9:37 pm Post subject: |
|
|
lars_the_bear wrote: | Just out of curiosity: does system-logind (or elogind) actually work with startx? |
Elaborating on Hu's answer: yes it does, sort of. They actually work with Xorg, not startx (which is just a shell script) or xinit (which is called by startx and in turn starts both Xorg and a chosen X11 client).
Xorg uses them for performing privileged operations on its behalf. Including having them open files in /dev and getting the resulting file descriptors from them through D-Bus. The code responsible for that is here.
With neither systemd-logind nor elogind, Xorg must perform the privileged operations itself, hence the need of suid. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
lars_the_bear Guru
Joined: 05 Jun 2024 Posts: 520
|
Posted: Tue Jul 30, 2024 8:11 am Post subject: |
|
|
GDH-gentoo wrote: |
Xorg uses them for performing privileged operations on its behalf. Including having them open files in /dev and getting the resulting file descriptors from them through D-Bus. |
OK. That's quite clever. I guess elogind/systemd_logingd have to be running, before running startx, right? Or does startx start one these processes itself these days?
Whatever, it didn't work for me; but I didn't bother trying to find out why, because I have no objection to making Xorg setuid root.
BR, Lars. |
|
Back to top |
|
|
Plasticstraweater n00b
Joined: 19 Mar 2024 Posts: 10
|
Posted: Tue Jul 30, 2024 10:44 am Post subject: |
|
|
Hello all.
Thank you all for cooperating.
Here is the link to my /var/log/Xorg.*
https://bpa.st/NHJA after using wgetpaste _________________ Life has no replay button |
|
Back to top |
|
|
GDH-gentoo Veteran
Joined: 20 Jul 2019 Posts: 1699 Location: South America
|
Posted: Tue Jul 30, 2024 2:09 pm Post subject: |
|
|
lars_the_bear wrote: | I guess elogind/systemd_logingd have to be running, before running startx, right? |
Yes, it must be running, so the init system must start it when the computer boots.
Plasticstraweater wrote: | Here is the link to my /var/log/Xorg.*
https://bpa.st/NHJA after using wgetpaste |
I forgot that those are the logs when Xorg runs as root, check the ~/.local/share/xorg/Xorg.* ones. _________________
NeddySeagoon wrote: | I'm not a witch, I'm a retired electronics engineer |
Ionen wrote: | As a packager I just don't want things to get messier with weird build systems and multiple toolchains requirements though |
|
|
Back to top |
|
|
Plasticstraweater n00b
Joined: 19 Mar 2024 Posts: 10
|
Posted: Wed Jul 31, 2024 2:50 pm Post subject: My xorg pt2 |
|
|
Hello. Sorry for long reply but here is my link to my xorg
https://bpa.st/SUHA _________________ Life has no replay button |
|
Back to top |
|
|
|