Autor: Andreas Messer Fecha: A: dng Asunto: Re: [DNG] [ASCII][PATCH] startx to a new tty
Hi Dario,
On Sun, Sep 16, 2018 at 09:35:52PM +0200, Dario Niedermann wrote: > Il 16/09/2018 alle 18:43, Andreas Messer ha scritto:
ddd>
> I see. Anyway I strongly doubt that any DE relies on startx internally:
> it's a shell script that's intended to provide a convenient user
> interface to console users who want to spawn an X session.
Yes a DE does not care how the X-server was started - by startx, by a
display manager or something else. But startx can of course start a DE
like KDE. And KDE depends on session management - at least some of its
functionality. And for that to work properly, the session associated with
KDE needs to be "active".
> Also note that startx will *always* run X as root, even the stock Devuan
> version. My patch doesn't change that. The 'needs_root_rights' variable
As far as I understand this only happens when xserver-xorg-legacy package
is installed. If this package is not installed, X will never run as root.
> I add to 'Xwrapper.config' is only there for Xwrapper (a short lived
> program called by startx) to be able to allocate a new tty. After which
> it spawns X and quits.
Manualpage of Xorg.wrap says something different. My understanding
is, that for example using DRI - which actually means using a modern
graphics card at all - either requires root permissions of the x server or
a working session management. (Session management daemon will adjust
permissions such that DRI is available to non-root)
> With the stock RedHat-derived version, instead, a new tty is not
> allocated: the current tty is taken over by X when you issue startx.
> After X quits, the current tty is released, but is now owned by root
> (no longer by your user). Which is not the way the XFree86 / Xorg
> devs intended startx to work.
I dont know much about that.
My feeling about this is, that it is something which can not really
be solved to fit all needs. From my point, there are two ways:
Either have a working session management with running X without
root permission or having no session management and running X as root.
In the later case, X should have its own tty allocated indeed.
So the decision if a new tty shall be allocated actually corellates
to if X is running as root or not. Since only Xorg.wrap knows
finally if it will run X with root permission or not, its the first
place for me were modifications need to be made. Maybe the whole
combination of startx/xinit/Xorg.wrap needs adjustments.
Both affected packets (xinit, xserver-xorg-legacy) are currently
taken unchanged from Debian. So if we were to modify them,
forks of these packages have to be created in Devuan
package git repos. There we can put the modifications for test
and possible future integration. Decision on that is not mine.
@Dario: If you want to see this changed, I'd like to encourage
you to create an account on Devuan git and just start to work
on this topic.