On Sat, 9 Jun 2018 13:52:06 -1000
Joel Roth <[email protected]> wrote:

> Colleagues!
> 
> Earlier in this thread, we learned that installing xserver-xorg-legacy
> allows you to run X the old way, as a setuid script. 
> 
> The default upgrade path from jessie -- in which X11 was
> setuid-only -- migrates to a new xserver-xorg in which the
> setuid mechanism is replaced. In order to run X with user
> permissions in the dist-upgrade'd environment one needs to
> pull in a stack of dependencies including dbus, polkit,
> libpam-elogind, and elogind. 

Hi Joel,

I've noted that suggested documentation already solved your problem and
the problem of the person whose X no longer opened on Ctrl+Alt+F7, so
my post is just for contemplation...

I don't know if the new method really runs X as a normal user, but the
setuid method ran it as root, but enabled a normal user to run it. I'd
imagine a line in /etc/sudoers would accomplish the same thing.

I imagine that if you boot to a Display Manager like slim, xdm, lxdm
and the like, this problem is already solved for you because the init
runs the Display Manager as root. I'd imagine the "run as root" problem
occurs only when you boot up in CLI and then run startx to go X.
Again, /etc/sudoers should cover the problem.

Or, perhaps,  have X be a service in the init, so it can be started by
root at boot (without a Display Manager). In runit the X directory can
have a file named "down" so it doesn't automatically run: You could run
it like:

sv up X

The preceding would need to be run as root, but again, /etc/sudoers. Or
you could have a setuid shellscript called "togglex" that would
alternate sv up X and sv down X: No /etc/sudoers, just run it.

In the preceding several paragraphs, runit doesn't need to be the init:
It can be run simply be a process supervisor like daemontools.

I haven't tried these ideas, but I *think* they should work.

 
SteveT

Steve Litt 
June 2018 featured book: Twenty Eight Tales of Troubleshooting
http://www.troubleshooters.com/28


_______________________________________________
Dng mailing list
[email protected]
https://mailinglists.dyne.org/cgi-bin/mailman/listinfo/dng

Reply via email to