shutdown button from XDM?

Nemo - earth native nemo at
Fri Mar 29 12:38:05 EST 2002

I was asked lastnight if you could easily have a shutdown/reboot/etc
type control app running with XDM...

Attached is a simple bash script - call it from XDM's Xsetup script (be
sure to put it into the background), and it should be fine. Remember
though that you need Advanced Cleverness (tm) to stop the program when
the user logs in... else they have that control available to them at all
times... (or just use xmessage's own -timeout option :)

-------------- next part --------------

xmessage "Choose your doom" -buttons "Close:0,Reboot:1,Shutdown:2,Restart XDM:3"


[ $CONTROL = 0 ] && echo "Close me"
[ $CONTROL = 1 ] && shutdown -r now
[ $CONTROL = 2 ] && shutdown -h now
[ $CONTROL = 3 ] && /etc/init.d/xdm restart


More information about the linux mailing list