xdm shutdown

xdm shutdown

Post by Norbert Hach » Sun, 20 Jul 1997 04:00:00



I used to start my X window system from the command line using startx.
To shut down it was easy, all I did is quit X and then from the ASCII
terminal mode press ctl-alt-del.
I just switch to run level 4 (xdm at boot) and was wondering what is the
proper way to shutdown my system now? I could alway type ctl-R from the
login box after quitting the window manager to get into ASCII terminal
mode, but that would defeat the purpose of using xdm in the first place
(ie get directly into X and shutting down from X).

Any suggestions please.

 
 
 

xdm shutdown

Post by gippa » Wed, 30 Jul 1997 04:00:00



> I used to start my X window system from the command line using startx.
> To shut down it was easy, all I did is quit X and then from the ASCII
> terminal mode press ctl-alt-del.
> I just switch to run level 4 (xdm at boot) and was wondering what is the
> proper way to shutdown my system now? I could alway type ctl-R from the
> login box after quitting the window manager to get into ASCII terminal
> mode, but that would defeat the purpose of using xdm in the first place
> (ie get directly into X and shutting down from X).

Do /sbin/shutdown -R 0  (zero) as root.

 
 
 

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
/sbin/shutdown
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
work.

This was created to allow easy dual booting between Linux and Windows,
encouraging users to shut the machine down properly to avoid 10 minute
"fsck"ing.

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:
#!/bin/sh
# 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"
pack .b
#===== 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
exit
#===== End of File ==================================================

Then add the following line to the end of Xsetup_0:
/etc/X11/xdm/Xshutdown &

And finally, add this to GiveConsole:
/etc/X11/xdm/Xshutup

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.
Cheers,
Mike

         //\\___________________________________//\\
      "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?