xdm-config for :0 doesn't call Xstartup?

IL Ka kazakevichilya at gmail.com
Sun Oct 18 22:11:15 UTC 2020


Hello.
>xdm runs Xstartup on behalf of the user.
Hmm.. man page says: "After the user logs in, xdm runs the Xstartup script
as root.".
There is a $USER argument passed to this script, but the script itself runs
as root.

>. What does your Xstartup say?

exec /usr/bin/sessreg  -a -w /var/log/wtmp -u /var/run/utmp -x
/usr/lib64/X11/xdm/Xservers -l $DISPLAY -h "" $USER

I am pretty sure the problem is the following line in xdm-config:

DisplayManager*startup: /usr/lib64/X11/xdm/Xstartup
! The following three resources set up display :0 as the console.
DisplayManager._0.startup: /usr/lib64/X11/xdm/GiveConsole

GiveConsole is:
chown $USER /dev/console

So, sessreg is simply not called when xdm serves screen :0

I was able to fix it by copying sessreg line to the GiveConsole, but it
looks like a strange hack..
Ilya






On Sun, Oct 18, 2020 at 5:35 PM Chris Sorenson <csoren at isd.net> wrote:

> xdm runs Xstartup on behalf of the user. Or, at least it's supposed to.
> Xstartup should then call sessreg which should invoke wtmp and utmp.
> However, it's possible to bypass wtmp/utmp by passing "-w none" to
> sessreg, in which case "w" won't show the login. What does your Xstartup
> say?
>
>
> On 10/18/2020 07:00 AM, xorg-request at lists.x.org wrote:
> >
>
> >
> > Message: 1
> > Date: Sun, 18 Oct 2020 00:12:22 +0300
> > From: IL Ka <kazakevichilya at gmail.com>
> > To: xorg <xorg at lists.x.org>
> > Subject: xdm-config for :0 doesn't call Xstartup?
> > Message-ID:
> >       <CAHv=
> rM33zEZEML9qKEnphvKAzH+uPn+TDb7SbjjkL9qV8jed9Q at mail.gmail.com>
> > Content-Type: text/plain; charset="utf-8"
> >
> > Hello.
> >
> > I found that xdm-config has the following lines
> > DisplayManager*startup: /usr/lib64/X11/xdm/Xstartup
> > DisplayManager._0.startup: /usr/lib64/X11/xdm/GiveConsole
> >
> > As I understand, that means GiveConsole is run instead of Xstartup,
> > so sessreg is not called, and I do not see my login in "w" output.
> >
> > I am sure this is how it worked for decades, so it could be that I
> > misunderstand something.
> >
> > Is it a bug?
> >
> > Ilya.
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.x.org/archives/xorg/attachments/20201019/0f6d3898/attachment.htm>


More information about the xorg mailing list