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
Solved

xdm and sessreg

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
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…
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.:

829 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