1. FREE CODE: xdm Shutdown Button
For anyone who wants an easy way of shutting down / restarting their
machine from the xdm login screen (instead of Ctrl-Alt-F1 Ctrl-Alt-Del):
This is a set of two tcl/tk scripts- one which pops up the button, the
other to kill the button once a user has logged in.
All it requires is tcl/tk, and that the shutdown script is
Of course, this can be edited for your own needs.
The code itself is just one line, but it needs all the gunk to make it
This was created to allow easy dual booting between Linux and Windows,
encouraging users to shut the machine down properly to avoid 10 minute
It's been in operation in the Imperial College Computing Department for
the last three months without a problem (apart from the usual cretins
hitting reset instead of waiting for the machine to shutdown properly.
Bring back birching, I say ;-)
Anyway, here's the important bit. Everything happens in /etc/X11/xdm/
Create the text file Xshutdown containing the following:
# the next line restarts using 'wish'. Don't remove this: \
# This script starts a "Shutdown and Reboot" button
# This allows easier dual booting in RunLevel 5
# Created by Mike Wyer (unsung genius)
button .b -text "Shutdown\nand Reboot" -command "exec /sbin/shutdown -t3 -r now"
#===== Don't copy this- it's just the end of the file ================
Then the file Xshutup:
#!/bin/sh # the next line restarts using 'wish'. Don't remove this: \
# This kills the "Shutdown and Reboot" button in Xshutdown.
# If you run it from a prompt it will always produce an error message,
# but it does always produce the behaviour required:
# ie. After this has run, Xshutdown will not be running.
# Created by Mike Wyer, shamelessly stolen by: ___(your name here)___
send Xshutdown exit
#===== End of File ==================================================
Then add the following line to the end of Xsetup_0:
And finally, add this to GiveConsole:
NB: Make sure the two new files are set as executable:
chmod +x Xshut*
Have fun. If you *do* use it- send me an email ('cos it'll impress my
boss). Otherwise - copy, distribute, praise, deify, print, and make
paper aeroplanes from it (like you need telling).
I would GPL it, but it's really not worth it. I hope it helps.
"I want to die in my sleep like my grandfather....
...Not screaming and yelling like the passengers in his car."
2. running another X server on another display??
3. RE : XDM shutdown - getting a console
4. Need help with ftape 1.13b
5. Shutdown doesn't work from X/XDM
6. True Type Fonts For X-Windwos
7. HELP - want to shutdown from XDM !!
8. Why should I read this crap
9. Shutdown in Xdm?
10. Shutdown from xdm
11. How to setup xdm to have messages seen when shutdown?
12. xdm problems - can't shutdown
13. How to shutdown from XDM?