[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: Running 'xosview' with XDM
- From: Cameron Simpson <cs zip com au>
- To: redhat-list redhat com
- Subject: Re: Running 'xosview' with XDM
- Date: Mon, 1 Feb 1999 00:14:27 +0000
On 28 Jan 1999, in message <19990128121007 A27857 ststech com>
Steve Borho <sborho ststech com> wrote:
| > I have a question regarding the operation of XDM. I edited the
| > /etc/X11/xdm/Xsetup_0 file and commented out the line that starts
| > the console window, and replaced it with this:
| >
| > /usr/X11R6/bin/xosview -geometry 320x200-0-0 -int -title "System Load
| > Statistics" &
| >
| > This works great, in that I can see the state of the system without having
| > to log in, *but* I would prefer if the xosview would terminate as soon as
| > any user signs on (right now, the user gets the xosview window as well,
| > and if that wasn't bad enough, each time a session ends, XDM will start up
| > *another* copy of xosview).
| >
| > Is this possible? (I would rather avoid putting something like,
| > 'killall xosview' in /etc/profile if there is a better solution.)
|
| I believe the GiveConsole script is run when the user logs in, so placing
| the 'killall' there should do it.
Indeed. But _don't_ use killall - you can easily inadvertantly nail
things you didn't want nailed (especially running as root, but even as
an ordinary user if you have multiple sessions). Stuff the pid into a
file and kill just that pid later:
/usr/X11R6/bin/xosview -geometry 320x200-0-0 -int -title "System Load Statistics" &
echo $! >/var/run/xosvPid.$DISPLAY
and in GiveConsole
kill `cat /var/run/xosvPid.$DISPLAY`
rm /var/run/xosvPid.$DISPLAY
which scales to multiple DISPLAYs and kills very accurately.
_Always_ stash pids and kill only those when closing something down.
Killall is an overused hack. (And clean up the pid files after use, too
- otherwise when the pid gets reused the pid file will point at the
wrong thing).
Cheers,
--
Cameron Simpson, DoD#743 cs zip com au http://www.zip.com.au/~cs/
That's about as good as when one of my students left me a note signed
'anon.'--written on personalized stationery.
- Ayse Sercan <ayse netcom com>
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]