Non root Xorg

From Gentoo Wiki
Jump to: navigation, search

This page describes how user can run Xorg as unprivileged user without using suid.

Requisites

The logind provider

Currently there are two logind providers in Gentoo, systemd and elogind. Users of systemd profile and users of desktop profiles (both systemd and non-systemd one) will already have logind interface provided, users of OpenRC with default profile will be required to globally enable elogind USE flag and update system with emerge -N @world. It is also required to re-login after elogind has been enabled, to activate it. If either systemd or elogind USE flag is enabled on x11-base/xorg-server together with suid USE flag, instead of installing with suid enabled, x11-base/xorg-server will be installed with suid-wrapper, that will only preserve suid if the graphics driver that is in use really require root.

dbus service running

It is required to have dbus started so that pam_elogind can start or attach to already started elogind daemon.

Troubleshooting

Cannot start Xorg as regular user

Majority of problems with running Xorg without root after switching to elogind cames down to issues with PAM. One can confirm that elogind is working by running loginctl user-status. If it does not work, then one should check:

  • Has the configuration files in /etc being updated after updating system with new USE flags?
  • Is there any trace of pam_elogind.so in /etc/pam.d/system-auth?\
  • Is the dbus service running?

See also

References