Re: How to trap ctrl-alt-del?

From: Jean Louis <bugs_at_gnu.support>
Date: Thu, 1 Dec 2016 14:48:52 +0300

OK that is correct, I need to configure acpid, for power off.

And I will leave defaults of reboot with ctrl-alt-del

The s6-poweroff is for root user, and I have users who wish to
poweroff, and I don't want to give them sudo rights to power off the
computer. That is why I am searching for simple solution.

Jean

On Thu, Dec 01, 2016 at 07:33:16PM +0800, Casper Ti. Vector wrote:
> Setting `kernel.ctrl-alt-del' to 0 just makes C-A-D send SIGINT to PID 1
> (instead of triggering a hard reboot). If you want to make SIGINT
> trigger a grace shutdown, you can modify the SIGINT handler in the
> `service/.s6-svscan' directory.
>
> But I personally do not think changing signal semantics (which is
> already a mess [1]) is the way to go; instead, I recommend using
> s6-poweroff(8) from s6-linux-init if you are already using that package.
>
> If you machine is ACPI-enabled, you can also configure acpid to spawn
> s6-poweroff(8) when the power button is pressed, so you may push the
> button to power off your machine.
>
> [1] <http://skarnet.org/cgi-bin/archive.cgi?
> 2:mss:1377:201608:hiocpcghpahbaiedeihc>.
>
> On Thu, Dec 01, 2016 at 02:06:50PM +0300, Jean Louis wrote:
> > What exactly should I change or do, that simply does power off?
>
> --
> My current OpenPGP key:
> RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19)
> 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C
>
Received on Thu Dec 01 2016 - 11:48:52 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC