> Date: Mon, 08 Aug 2011 12:57:45 -0700
> From: Alan Coopersmith <[email protected]>
> 
> On 08/08/11 12:45, Mark Kettenis wrote:
> >> From: =?UTF-8?q?Mat=C4=9Bj=20Cepl?= <[email protected]>
> >> Date: Mon,  8 Aug 2011 21:26:48 +0200
> >>
> >> I guess we should have corresponding sessreg -d call in config/TakeConsole
> >> as well, right?
> >>
> >> diff --git a/config/GiveConsole b/config/GiveConsole
> >> index f8a8c6d..d201a5c 100644
> >> --- a/config/GiveConsole
> >> +++ b/config/GiveConsole
> >> @@ -7,3 +7,5 @@
> >>  # causing serious grief.
> >>  #
> >>  chown $USER /dev/console
> >> +exec /usr/bin/sessreg  -a -w "/var/log/wtmp" -u "/var/run/utmp" \
> >> +        -x "/etc/X11/xdm/Xservers" -l $DISPLAY -h "" $USER
> > 
> > $ ls -l /usr/bin/sessreg
> > ls: /usr/bin/sessreg: No such file or directory
> > 
> > Guess that's a NACK.
> 
> config/Xstartup.cpp & config/Xreset.cpp already call BINDIR/sessreg
> so doing the same in another config file should be fine - but it
> shouldn't be hardcoded to /usr/bin as this patch does.

Yup, that would indeed work.  And it shouldn't hardcode the pathnames
for the utmp and wtmp files either.  I wonder though why it is
necessary to specify those pathnames at all.  Doesn't sessreg already
do the right thing if you don't specify them?

I'm also not sure if the writing to the utmp file is desired here.
For OpenBSD Matthieu Herb added the following line to GiveConsole:

/usr/X11R6/bin/sessreg -a -l $DISPLAY -u none -x 
/usr/X11R6/lib/X11/xdm/Xservers $USER

So he specifically chose to *not* log to the utmp file on OpenBSD.

Matthieu, do you remember why?
_______________________________________________
[email protected]: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: http://lists.x.org/mailman/listinfo/xorg-devel

Reply via email to