[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Ctrl-Alt-Del doesn't work under X?



In article <[🔎] Pine.3.03.9610071353.A5693-b100000@sdss>,
Syrus Nemat-Nasser  <syrus@ucsd.edu> wrote:
>> From: Arrigo Triulzi <a.triulzi@ic.ac.uk>
>> > Hello,
>> > 
>> > 	sorry for writing to you direct but this is urgent: it seems
>> > that under the Debian X11 installation it is impossible to reboot the
>> > machine at the Xlogin prompt under xdm. I know this is a Good Idea
>> > (tm) but we are running dual-boot systems and this is a requirement so
>> > that students can switch back to DOS when then need.
>
>Hi.  It may not be possible to do this, but here is a way to work
>around the problem:
>
>>From the xlogin prompt, you can switch to a virtual console by C-A-F2 (or
>C-A-F3, etc.).  From a console login prompt, C-A-DEL works.  All you have
>to do is make sure you have not disallowed this in your X configuration.

If you check /etc/X11/xdm/Xresources, you'll see a couple of keys
defined:

xlogin*login.translations: #override\
        Ctrl<Key>R: abort-display()\n\
        <Key>F1: set-session-argument(failsafe) finish-field()\n\
        Ctrl<Key>Return: set-session-argument(failsafe) finish-field()\n\
        <Key>Return: set-session-argument() finish-field()

As you can see Ctrl-R is abort-display, which kills the xdm server. If
you then set up things so that after that xdm terminates a shutdown -r now
is executed, you're set.

It would also be possible to define Ctrl-Alt-Del for this, ofcourse. Only
I don't know what the definition of that would look like, probably something
like Ctrl<Mod>Meta<Key>Delete: abort-display or so.

The easiest way is then to create a script in /usr/local/bin called say lxdm,
that looks like this:

#! /bin/sh
/usr/bin/X11/xdm --nodaemon
/sbin/shutdown -r now
sleep 10

And then you call this from /etc/inittab in runlevel 5:

x5:5:respawn:/usr/local/bin/lxdm

Instead of the standard xdm, so turn off the standard xdm first.

All this results in Ctrl-R at the xdm prompt rebooting the machine!

Mike.
-- 
|  Miquel van Smoorenburg  \ The answer to Life, the Universe and Everything \
| miquels@drinkel.cistron.nl \ Just reinstall windows and try again, sir.     \

--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-REQUEST@lists.debian.org . Trouble? e-mail to Bruce@Pixar.com


Reply to: