Todd Zullinger wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Chris Bradford wrote:
Is there a way I can get a message box to pop-up that has agree /
disagree on it and where I can display our IT policy?
If the users accepts they can continue, if the do not the system
will log them off.
You could do this by calling a small shell script in
/etc/X11/xinit/Xsession before the user session is started.
The script could use zenity to display the policy and check whether it
was agreed to or not. Then you would continue or abort depending on
the response of the user.
- --
Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
======================================================================
It's not denial. I'm just very selective about what I accept as
reality.
-- Calvin ("Calvin and Hobbes")
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.4 (GNU/Linux)
Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.
iG0EARECAC0FAkSqfBUmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt
ei5hc2MACgkQuv+09NZUB1rkTQCdGdMJA/JLPbRDgMgYze8/Njj+rWMAoLuHnyQj
GJodC0VvJ/GmZmkfpTsK
=eVL5
-----END PGP SIGNATURE-----
OK, it's taken me a while to try and put this into action but I am
basically there... :
#!/bin/sh
if zenity --question --title "IT Policy" --text "Blah Blah. Blah. Blah.
Blah. Blah.. If you do not accept this policy please select Cancel to
logoff, otherwise press OK to continue."
then
echo "Policy Accepted, thus continue to load gnome"
else
echo "Logoff"
/usr/bin/gnome-session-save --kill --silent
fi
The script works, but every time cancel is selected a dialog box is
displayed as if users had used the gnome-menu to logoff. As far as I can
see this box should only be displayed if the comamnd *
/usr/bin/gnome-session-save --kill --silent* is changed to
*/usr/bin/gnome-session-save --kill --gui*
Any ideas how I can force the logoff process to occur?
Many thanks,
-Chris
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com