Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 16 Aug 2000 11:06:27 -0400 (EDT)
From:      Vivek Khera <khera@kciLink.com>
To:        stable@FreeBSD.ORG
Subject:   Re: how should one use the "/usr/X11R6/bin/sessreg" program in 4.x?
Message-ID:  <14746.44531.954791.2868@onceler.kciLink.com>
In-Reply-To: <7l9ikkpl.fsf@gits.dyndns.org>
References:  <14744.25638.954559.165195@onceler.kciLink.com> <7l9ikkpl.fsf@gits.dyndns.org>

next in thread | previous in thread | raw e-mail | index | archive | help
>>>>> "CL" == Cyrille Lefevre <clefevre@cybercable.fr> writes:

CL> did you read the manual page ? there are samples inside.
CL> also, the man page says you don't need to use -h as a usual way.

Yes, I read the manual when I set it all up last December.  The
behavior around the program seems to have changed.

CL> your problem comes from -u. should be -u /var/log/lastlog.
CL> in fact, you don't need to overwrite any default options since
CL> they already point to the right files.

CL> # strings /usr/X11R6/bin/sessreg | grep /
CL> ...
CL> /var/log/wtmp           -> -w
CL> /var/log/lastlog        -> -u
CL> /etc/ttys               -> -s

Contrary to the man page it seems, or I wouldn't have manually
specified them.

CL> so, the proper way to use sessreg is :
CL> sessreg [-a or -d] -l $DISPLAY -x /usr/X11R6/lib/X11/xdm/Xservers $LOGNAME


Ok... using your method here's what I get:

[root@onceler]# sessreg -a -x "/usr/local/etc/kdm/Xservers" -l $DISPLAY khera
[root@onceler]# last -1
khera            :0.0     console          Wed Aug 16 10:55   still logged in
[root@onceler]# who
khera            ttyp0   Aug 16 10:10   (:0.0)
khera            ttyp1   Aug 16 10:10   (:0.0)
khera            ttyp3   Aug 16 10:48   (:0.0)
khera            :0.0    Aug 16 10:55   (console)
[root@onceler]# w
w: /dev/:0.0: No such file or directory
10:55AM  up 19:23, 3 users, load averages: 1.01, 1.03, 1.00
USER             TTY      FROM              LOGIN@  IDLE WHAT
khera            p0       :0.0             10:10AM     1 tcsh
khera            p1       :0.0             10:10AM    43 rlogin kci
khera            p3       :0.0             10:48AM     - w

notice the warning from "w" still.

I tried recompiling sessreg from ports but that still gives the same
issue in updating utmp, since it is already hard coded the path.  My
specifying it on the command line makes not one bit of difference.

The only "hack" I came up with is to "touch /dev/$DISPLAY" after the
sessreg -a, and "rm /dev/$DISPLAY" after sessreg -d.  This seems to
make "w" happy.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Vivek Khera, Ph.D.                Khera Communications, Inc.
Internet: khera@kciLink.com       Rockville, MD       +1-301-545-6996
GPG & MIME spoken here            http://www.khera.org/~vivek/


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-stable" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?14746.44531.954791.2868>