Shut down from desktop with ctrl-alt-delete

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
If I'm running the Raspbian GUI desktop but haven't got a monitor
connected, I'd like to be able to shut down with ctrl-alt-del.

With earlier versions of Raspbian, it was sufficient to change the
shutdown option in /etc/inittab from -r to -h like so:

ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now

Raspbian has got cleverer, however, and ctrl-alt-del now pops up a task
manager like other desktops.  How do I disable that?

Re: Shut down from desktop with ctrl-alt-delete
On Tue, 26 May 2015 17:35:51 +0100,
Quoted text here. Click to load it

Searching on: debian ctl-alt-del mapping to shutdown gives us this:

http://stackoverflow.com/questions/29955754/debian-jessie-shutdown-on-ctrlaltdel

  Just cd into /lib/systemd/system/ and change the symlink of
  ctrl-alt-del.target from reboot.target to poweroff.target.

  ln -s /lib/systemd/system/poweroff.target /etc/systemd/system/ctrl-alt-del.target

  then reset systemd daemon: systemctl daemon-reload

And lots of links to "how do I stop that sequence from rebooting my machine".
But the above is for systemd enabled systems, which you may not have.

An alternative would be:

ctl-alt-f1 (go to a terminal)
ctl-alt-del

I *think* if you put the above in your inittab as you describe, you'll
get a shutdown instead of a reboot.

Out of curiousity, why are you running a GUI on a headless device?

--  
Consulting Minister for Consultants, DNRC
I can please only one person per day. Today is not your day. Tomorrow
We've slightly trimmed the long signature. Click to see the full one.
Re: Shut down from desktop with ctrl-alt-delete

Quoted text here. Click to load it

I've just revisited this, and found a solution, so I'll post it here for
the record.

(I tend to run the Desktop on headless Pis because the desktop is easier
to use when a monitor _is_ attached, and I don't always know in advance
if I'll be plugging a given SD-card into a Pi without a monitor.)

edit /home/pi/.config/openbox/lxde-pi-rc.xml

find the line: <command>lxtask</command>

change it to: <command>sudo halt</command>

Site Timeline