Talk:Non root Xorg

From Gentoo Wiki
Jump to:navigation Jump to:search
Note
This is a talk page. Please add newer comments below older ones, and sign your comments using four tildes (~~~~). When adding a new section (at the bottom of the page), please mark it as "open for discussion" by using {{talk|open}} so it will show up in the list of open discussions.

Instructions not working?

Talk status
This discussion is done as of 30 November 2015.

I spent some time on this but was unable to get it working. My best explanation is that my user lacks the (root) rights necessary to become the DRM master (for /dev/dri/card0). My understanding is that systemd and D-Bus will provision these rights to users who wish to run Xorg. Since my Gentoo deployment lacks these systems, I observed Xorg failed to start as a regular user with the log entry, "no primary bus or device found". Note that Xorg would still run without issue when run as root.

If someone gets Xorg working without suid set and without systemd/D-Bus, please remove the warning box I posted on this page (and add the additional necessary steps).

Ennui (talk) 19:17, 10 June 2015 (UTC)

It seems the key step you missed was adding your user to the video group. As with using direct rendering, the user needs permissions to access the video hardware. If this is done, it certainly works for Intel without systemd, ConsoleKit, or anything other than standard UNIX user/group permissions. --JJS (talk) 21:32, 30 November 2015 (UTC)

Handling of DRM IOctls

Talk status
This discussion is done as of July 30th, 2020.

Hello,

Please do not edit Non_root_Xorg#Handling_of_DRM_ioctls, as I am currently working out a draft on my user page. I want to persist the diff files and provide preciser instructions.

Thank you!

Keks24 (talk) 04:26, 27 July 2020 (UTC)

Too late, Piotr Karbowski (Slashbeast) , doesn't want that content in the article, apparently. Old content is available as part of the article's history, as usual. — GuillermoDH (talk) 00:56, 31 July 2020 (UTC)
Wow! This is outright vandalism, it just destroyed a year of work by the community and graffiti'd over it with poorly formatted mechanical instructions for one dude's pet project that could've gone in a pkg_postinst instead. Someone please rein this loose cannon in already, their open contempt toward Gentoo as a whole is unacceptable. Ant P. (talk) 12:06, 31 July 2020 (UTC)
Just mentioning it: Everything is licensed under CC-BY-SA-3.0, so be bold as the Editing_pages article says. :) By the way: equery files xorg-server does not output me any wrapper Piotr Karbowski (Slashbeast) is mentioning or does he mean drm_master_util, which he has deleted? Keks24 (talk) 19:28, 31 July 2020 (UTC)
He means the /usr/libexec/Xorg.wrap program. It will be there if xorg-base/xorg-server is installed with both the elogind and suid flags set, or both the systemd and suid flags set. — GuillermoDH (talk) 00:53, 1 August 2020 (UTC)

Non root Xorg as service

Talk status
This discussion is still ongoing.

It seems that recent Xorg versions require elogind, as indicated in this manual, but that elogind requires user to be logged in. I have a kodi service running as user kodi which cannot start anymore because of that. I now have to modify it to be run as root. I think that this should be indicated in this page for other user searching why such service does not work anymore. — The preceding unsigned comment was added by Sveyret (talkcontribs)

I'm running into that same problem.
Maybe an alternative would be to perform what the header warning suggests: "Users who wish to start X remotely will need to take extra steps to ensure that a seat is given to the user from which they start X"
Unfortunately I have no idea what or how to do this...
Samb (talk) 08:08, 13 October 2020 (UTC)

Insufficient detail

Talk status
This discussion is still ongoing.

The troubleshooting section says

One can confirm that elogind is working by running loginctl user-status. If it does not work...

What does "does not work" mean in this context? What is the expected result of this command if it "works," and what is the different result if it "does not work"? (This same shortcoming is, frustratingly, also in the official Gentoo news item xorg-server dropping default suid, added by Piotr Karbowski (Slashbeast) on 2020-06-24.) As a neophyte to elogind, I've never encountered this command before, so I don't know what its usual output (if any) is, thus don't know if the output I'm seeing constitutes a "working" or "not working" status. Median (talk) 21:47, 26 September 2020 (UTC)

I believe what it means is if loginctl user-status outputs an error of any kind. IIRC, when I first switched to the elogind USE flag I got something like this:
user $loginctl user-status
Failed to create bus connection: No such file or directory
If everything is working correctly, the output should look something like this:
user $loginctl user-status
user (1000)
         Since: Tue 2020-10-13 12:03:02 CDT; 2h 16min ago
         State: active
      Sessions: *1
        Linger: no
          Unit: user-1000.slice
xxc3nsoredxx (talk) 19:40, 13 October 2020 (UTC)
Thank you, I have incorporated your advice in this edit.
However, this section still needs some work. For instance, it says:

(systemd users) Is there any trace of pam_elogind.so in /etc/pam.d/system-auth?

This does not tell the reader whether this string should appear in this file, or whether this answer is different for non-systemd users. Median (talk) 11:23, 20 November 2020 (UTC)
I'm running elogind with openrc and see no mention of pam_elogind.so in /etc/pam.d/system-auth and everything seems to work for me. However, equery f elogind does say that it installed it into /lib64/security/pam_elogind.so. Maybe Piotr Karbowski (Slashbeast) can provide more input as to whether it should or shouldn't show up in the PAM config.
I also copied the full output into the main page. xxc3nsoredxx (talk) 07:52, 24 November 2020 (UTC)

A logind provider is not required

Talk status
This discussion is still ongoing.

It is possible to run non root (rootless) Xorg without a logind provider. All that is needed for rootless Xorg to work is a DRM kernel driver that also supports KMS, and a DDX driver that uses it. The only issue is that Xorg will try to open /dev/tty0 and fail to run, but that can be fixed by adjusting the permissions on /dev/tty0 or specifying the VT Xorg should use with the vtXX parameter.

EDIT: I've just noticed that in an older revision of this page, this alternative method was mentioned. Why did it get removed? It is still valuable information in my opinion, even if it's a method that isn't officially supported.

Nket (talk) 03:30, 11 July 2021 (UTC)


Running i3

Talk status
This discussion is still ongoing.

starting X with:

user $startx /usr/bin/i3

(EE) xf86OpenConsole: Cannot open virtual console 7 (Permission denied)

Solution :

user $startx /usr/bin/i3 -- vt1

where 1 is number terminal where I'm logged, if not 1, adjust the command

Cacoch (talk) 01:53, 20 September 2021 (UTC)