Change the behaviour of Alt Control Backspace to shutdown machine

Posted on 2004-11-25
Last Modified: 2010-04-20
Hi I am seting up a web kiosk, that uses a kiosk user to start a cut down web browser. The only shortcut keys that work are the Control + Alt + Back space which logs the user out and brings back the machine to a log in screen. Actually what I would like is for the machine to shut down instead of going back to the log in screen.
Any ideas?

The kiosk is started by automatically logging in the kiosk user, and having a xsession script in their home folder that starts firefox...

while true ; do
   /firefox/firefox -fullscreen

I dont fully understand what it is doing but it works!! Seems to start a System default session (its not gnome so i guess it may be twm), and when i hit alt contol back space it finishes that session and go's back to the log in screen. I would rather that users didnt get that screen and it would just shutdown.
Question by:uuccu
    1 Comment
    LVL 1

    Accepted Solution

    In X's config file  ( usually /etc/X11/XF86Config, /etc/X11/XF86Config-4 or /etc/X11/xorg.conf ).

    Look for a section named ServerLayout, ie mine reads:

    Section "ServerLayout"
            Identifier     "XFree86 Configured"
            Screen      0  "Screen0" 0 0
            InputDevice    "Mouse1" "CorePointer"
            InputDevice    "Keyboard0" "CoreKeyboard"

    To this, add the line:
            Option "DontZap" "true"

    (anywhere between the Section and EndSection lines.)

    This will prevent X from dying on ctrl+alt+backspace .. I'm not however sure how to handle the next step, of having a client catch ctrl+alt+backspace and call a shutdown from it.

    My advice, would be to enable DontZap so they're not returned to the login screen, then handle shutdown requests from /etc/inittab:

    # What to do when CTRL-ALT-DEL is pressed.
    ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now

    .. appears to be the default.  Replacing -r with -h  will cause it to shutdown (to halt) rather than reboot.


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Free Trending Threat Insights Every Day

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    This is the error message I got (CODE) Error caused by incompatible libmp3lame 3.98-2 with ffmpeg I've googled this error message and found out sometimes it attaches this note "can be treated with downgrade libmp3lame to version 3.97 or 3.98" …
    Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
    Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
    Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    11 Experts available now in Live!

    Get 1:1 Help Now