Solved

xdm and sessreg

Posted on 1998-06-28
3
422 Views
Last Modified: 2010-05-18
I am trying to determin who is connected via an X Terminal
I have added lines into Xstartup and Xreset to use sessreg
to add an entry into utmp and wtmp. Last finds the entrys
by w or who do not. I need w or who to report the entrys.
my sessreg line is:
sessreg -a -l $DISPLAY -x /usr/bin/X11/lib/xdm/Xservers $USER
0
Comment
Question by:dksayers
3 Comments
 

Expert Comment

by:ury_segal
ID: 2008308
last uses /var/adm/wtmpx, and w and who looks in /var/adm/utmp.
That's on solaris. Try to tell sessreg ( I don't have it ) to update utmp.
0
 

Accepted Solution

by:
vkurland earned 150 total points
ID: 2008309
As ury_segal has said, "w" and "who" use utmp file. Usually sessreg expects utmp to be in /etc/ on SysV systems, but it could be in different place on yours. Check /var/run or /var/log for example. Try to use command line switch "-u utmp-file" to specify utmp file location on your system.

Actually it would be easier to answer if you'd tell us what kind of system you are on


0
 

Author Comment

by:dksayers
ID: 2008310
It seems the problem is to do with running the sessreg. I found
that under my Linux system sessreg needs to be run as the same
process (using exec) because sessreg would get the PPID of
the Xstartup which terminates on completion. exec'ing sessreg
gets the PPID of the Xserver itself....
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

In tuning file systems on the Solaris Operating System, changing some parameters of a file system usually destroys the data on it. For instance, changing the cache segment block size in the volume of a T3 requires that you delete the existing volu…
This tech tip describes how to install the Solaris Operating System from a tape backup that was created using the Solaris flash archive utility. I have used this procedure on the Solaris 8 and 9 OS, and it shoudl also work well on the Solaris 10 rel…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now