How can I configure `anybody` to run X in a one-liner?
14,839
The solution I found was to run the following:
sudo sed -i \
's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config
Note, that in your situation, the console
may be root
or another, based on your particular initial configuration*
Author by
ljs.dev
Updated on September 18, 2022Comments
-
ljs.dev over 1 year
The common solution posted is to run
sudo dpkg-reconfigure x11-common
which gives a graphical prompt, however, I'm wanting to use this non-interactively.Scenario is that I'm SSH'd into a machine as root (during Vagrant provisioning) and need to run
startx
once as a regular user to generate some config files before proceeding to subsequent steps.I believe the reason I cannot simply
su otheruser startx
is due to Xauthority/me being connected via SSH as another user... -
Sebastian over 9 yearsconvincing X to drop root privileges is a rather new feature (
xorg 1.16.0
iirc). Details are found inman Xorg.wrap
. -
imsodin about 8 yearsOn debian the configuration file "Xwrapper.config" may be present, while the package xserver-xorg-legacy is not installed. In this case it has no effect, so the problems persist after changing the configuration.