Solved

xdm and sessreg

Posted on 1998-06-28
3
440 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Java performance on Solaris - Managing CPUs There are various resource controls in operating system which directly/indirectly influence the performance of application. one of the most important resource controls is "CPU".   In a multithreaded…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

749 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