Would everyone tolerate some top posting so the stall can be set up? :)

There are two issues here which I think are getting confused. The first
concerns the issue raised by the OP: using startx on vt1 gets vt1
replaced by Xorg. Background to this change in historical behaviour is
discussed in bug #747882

  https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=747882

The result was

   * 10-startx-Under-Linux-start-X-on-the-current-VT.patch,
     11-startx-Pass-vtX-as-long-as-the-user-did-not-specify-.patch: By
     default start the server on the current VT, this is necessary to
     avoid logind to see the startx session as inactive

Suppose startx is used to bring up Xfce. With the patches a user would
not need to provide the root password to suspend the machine. If the
user starts X on another vt the session is marked as 'Active=no' and the
password for root to suspend is asked for. This has nothing to do with
whether X runs SUID or as root or not.

The second issue is about Xorg running as an unprivileged user. This
also requires X to run on the virtual console it was started from.
Presumably this is because the same intermedaries (logind and
libpam-systemd) are nvolved. 


On Wed 25 Nov 2015 at 09:32:50 +0100, Vincent Lefevre wrote:

> On 2015-11-24 22:15:25 +0100, Michael Biebl wrote:
> > 
> > That Xorg can now run as unprivileged user is something new (at least in
> > Debian), and it's a very positive change.
> 
> I agree, but there's still a contradiction with the above: what Chris
> said (quote from developers) is that X no longer uses a different TTY
> so that X can run without root rights. If this is true, this means
> that if the user wants to run X on a different terminal, e.g. with
> "startx -- vt7", then X needs root rights, and since Xorg is no longer
> SUID, this would mean that the user would have to be root to start X
> in this way.

Untested, but I think the xserver-xorg-legacy (a setuid root Xorg server
wrapper) package would have to be installed in this circumstance.

> Said otherwise, if X does not need root rights with "startx -- vt7",
> why is "It is needed to make Xorg run without root rights" given as
> a reason for the change of behavior regarding the TTY?

This is where I think the confusion lies. Quoting

  https://patchwork.freedesktop.org/patch/23004/

again.

  There are 2 reasons for this change:

  1) It is needed to make Xorg run without root rights
  2) The old behavior creates a new session-id (as returned by getsid()),
     without registering it with PAM, this breaks session managers such
     as systemd-logind. 

Reason 2) is the one relevant to the first post in the thread.

Reply via email to