Hi guys,
Bit of ad odd question:
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.
Any thoughts?
Cheers,
-Chris
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
-----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 SIGNED MESSAGE----- Hash: SHA1
I wrote:
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.
On second thought, perhaps zenity isn't quite up to the task (check the man page and see if you can make it do what you need). But you could use the appease-lawyers.c code from the flash-plugin SRPM[1] to display the policy and check the return result. See the flash-plugin setup script for an example of how this is used.
[1] http://macromedia.mplug.org/rpmsource/
- -- Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp ====================================================================== I have to decide between two equally frightening options. If I wanted to do that, I'd vote. -- Duckman
Todd Zullinger wrote:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1
I wrote:
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.
On second thought, perhaps zenity isn't quite up to the task (check the man page and see if you can make it do what you need). But you could use the appease-lawyers.c code from the flash-plugin SRPM[1] to display the policy and check the return result. See the flash-plugin setup script for an example of how this is used.
[1] http://macromedia.mplug.org/rpmsource/
Todd OpenPGP -> KeyID: 0xD654075A | URL: www.pobox.com/~tmz/pgp
I have to decide between two equally frightening options. If I wanted to do that, I'd vote. -- Duckman
-----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.4 (GNU/Linux) Comment: When crypto is outlawed bayl bhgynjf jvyy unir cevinpl.
iG0EARECAC0FAkSqfzEmGGh0dHA6Ly93d3cucG9ib3guY29tL350bXovcGdwL3Rt ei5hc2MACgkQuv+09NZUB1qB8wCeLHVeC1Hi6bRABt44phL/y+H9JpgAn21NmhZj Bnh6AUqwADqjS2M677Ms =mUOW -----END PGP SIGNATURE-----
OK, I'll take a look at the flash plugin script, that is exactly the kind of window I want, so maybe I can hack it :)
Cheers,
-Chris
This message has been scanned for viruses by BlackSpider MailControl - www.blackspider.com
On Tue, 2006-07-04 at 10:32 -0400, Todd Zullinger wrote:
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.
Seems a bit of overkill. Clicking an agree button, or simply typing in your user-credentials proves little, either way. One's just as good, or bad, as the other. If you were being smart, you'd have your policy say that merely by logging on you agree to it.
You could just show the policy as a logon screen background (as an image, or text). GDM, at least, allows that sort of thing. And just leave them to log on.
This hop, skip, and a jump, process reminds me of those, "Do you really want to quit?", "Are you sure?" double-checks.
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