X-Git-Url: https://git.ucc.asn.au/?p=progcomp2013.git;a=blobdiff_plain;f=qchess_login.sh;h=428dc1d8a85fb72454d3ffbba911d6a999fcb53f;hp=5cb8e4f832ad2372a71800c52d77ddfd5fad04ed;hb=573931ea67fa99135eca781ff814933e04df4308;hpb=885bbd068df051d7b920d6a8a9faa2f74c48db57 diff --git a/qchess_login.sh b/qchess_login.sh index 5cb8e4f..428dc1d 100755 --- a/qchess_login.sh +++ b/qchess_login.sh @@ -1,8 +1,13 @@ #!/bin/bash # Qchess login script +# Forces people to play Quantum Chess in order to login to a UCC clubroom machine +# (unless they work out that they can just press 'Q') + # Only works with GDM # WARNING: Don't use on systems without GDM, because it will probably break everything +# NOTE: If you have users that never log out (ie: lock the screen instead), this won't be very effective + # Add to root's crontab to run every minute # Check qchess isn't already running @@ -31,7 +36,10 @@ win="black" #espeak "I challenge you to a duel!" while [ "$win" == "black" ]; do - win=$(./qchess.py @human @internal:AgentBishop) + # The game prevents the screen from sleeping automatically... + # The blackout option makes the game screen go black if no events happen + # It works on clownfish (OpenSUSE); the game is fullscreen. But not cabellera (Scientific Linux); the game isn't fullscreen + win=$(./qchess.py --blackout=600 @human @internal:AgentBishop) done #if [ "$win" == "white" ]; then