[K12OSN] I need an automatic relogin script
Shahms King
shahms at shahms.com
Fri Aug 27 22:51:23 UTC 2004
On Fri, 2004-08-27 at 17:36 -0500, Tim Litwiller wrote:
> I need some king of monitoring script for mozilla/firefox that if the
> user closes the program the terminal will logout.
>
> Is this possible?
This has been addressed before, I believe (check the archives linked at
the bottom), but the short answer is "yes". The long answer (how to
accomplish it) depends on a lot of other variables like whether you want
the users to be able to run other applications, etc.
The quick-and-dirty answer is: X will exit (and gdm will respawn) when
the script that launched the session does. If you look in
/etc/X11/gdm/Sessions you'll see a bunch of executable scripts. These
are the files that gdm launches when a user logs in. When that script
"returns", the terminal is logged out.
Most of those files simply "exec /etc/X11/xdm/Xsession <sessionname>".
Most of the actual session logic is in that script so you can, without
changing anything, make any of the sessions "mozilla-dependent" by
changing them to:
/etc/X11/xdm/Xsession <sessionname>&
exec /usr/bin/mozilla
When the user exits mozilla, the session exits and they are logged out.
Not the most elegant solution, but it will work.
--
Shahms E. King <shahms at shahms.com>
Multnomah ESD
Public Key:
http://shahms.mesd.k12.or.us/~sking/shahms.asc
Fingerprint:
1612 054B CE92 8770 F1EA AB1B FEAB 3636 45B2 D75B
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/k12osn/attachments/20040827/c297e046/attachment.sig>
More information about the K12OSN
mailing list