Solved

xdm and sessreg

Posted on 1998-06-28
3
445 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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…
I promised to write further about my project, and here I am.  First, I needed to setup the Primary Server.  You can read how in this article: Setup FreeBSD Server with full HDD encryption (http://www.experts-exchange.com/OS/Unix/BSD/FreeBSD/A_3660-S…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In a previous video, we went over how to export a DynamoDB table into Amazon S3.  In this video, we show how to load the export from S3 into a DynamoDB table.

751 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