Re: How to trap ctrl-alt-del?

2016-12-05 Thread Jean Louis
Thank you. How could I forget simple permissions? Now I am using it that way. On Thu, Dec 01, 2016 at 06:15:48PM +, Laurent Bercot wrote: > > 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. Th

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
On Thu, Dec 01, 2016 at 06:15:48PM +, Laurent Bercot wrote: > > 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. > > Create a "poweroff" group.

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Laurent Bercot
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. Create a "poweroff" group. Add all the users you want to that group. chown root:poweroff /bin/s6-powero

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
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 s

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Casper Ti. Vector
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 (wh

Re: How to trap ctrl-alt-del?

2016-12-01 Thread Jean Louis
Thank you much. I have figured out that I had to change kernel parameter to be: kernel.ctrl-alt-del = 0 and now I see that ctrl-alt-del reboots, it is by default. What exactly should I change or do, that is simply does power off? On Sat, Nov 26, 2016 at 10:36:22PM +0800, Casper Ti. Vector wro

Re: How to trap ctrl-alt-del?

2016-11-29 Thread Casper Ti. Vector
Yes, now it works :) On Tue, Nov 29, 2016 at 10:05:14AM +, Laurent Bercot wrote: > Should be fixed now. -- My current OpenPGP key: RSA4096/0x227E8CAAB7AA186C (expires: 2020.10.19) 7077 7781 B859 5166 AE07 0286 227E 8CAA B7AA 186C

Re: How to trap ctrl-alt-del?

2016-11-29 Thread Laurent Bercot
The mail archive (archive.cgi) seems to be still down. Sorry, misconfiguration on my part after I updated the system. Should be fixed now. -- Laurent

Re: How to trap ctrl-alt-del?

2016-11-28 Thread Casper Ti. Vector
The mail archive (archive.cgi) seems to be still down. The git interface (cgit.cgi) is working though... On Fri, Nov 25, 2016 at 04:26:55PM +0800, Casper Ti. Vector wrote: > The second is an alternative link in case the server returns an empty > reply, which is happening to me: > > > % curl -vsS

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Guillermo
2016-11-25 6:28 GMT-03:00 Colin Booth: > > On Nov 25, 2016 3:53 AM, "Casper Ti. Vector" wrote: >> >> On Fri, Nov 25, 2016 at 11:07:15AM +0300, Jean Louis wrote: >>> >>> How may I trap ctrl-alt-del, >> >> $ sysctl kernel.ctrl-alt-del=0 > > This is a bit misleading since most (all?) default builds of

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Casper Ti. Vector
Try s6-linux-init [1]; you can modify the scripts in the `.s6-svscan' directory according to your requirements. [1] . On Sat, Nov 26, 2016 at 03:10:32PM +0300, Jean Louis wrote: > Now I wonder how to practically implement the -s option, should I just >

Re: How to trap ctrl-alt-del?

2016-11-26 Thread Jean Louis
Now I wonder how to practically implement the -s option, should I just give it something like "sudo s6-poweroff"? On Fri, Nov 25, 2016 at 12:17:24PM +0300, Jean Louis wrote: > Now I found a solution > http://www.mail-archive.com/supervision@list.skarnet.org/msg01038.html > > Thank you

Re: How to trap ctrl-alt-del?

2016-11-25 Thread Colin Booth
On Nov 25, 2016 3:53 AM, "Casper Ti. Vector" wrote: > > On Fri, Nov 25, 2016 at 11:07:15AM +0300, Jean Louis wrote: > > How may I trap ctrl-alt-del, > > $ sysctl kernel.ctrl-alt-del=0 This is a bit misleading since most (all?) default builds of linux already have kernel.ctrl-alt-del set to zero. >

Re: How to trap ctrl-alt-del?

2016-11-25 Thread Jean Louis
Now I found a solution http://www.mail-archive.com/supervision@list.skarnet.org/msg01038.html Thank you

Re: How to trap ctrl-alt-del?

2016-11-25 Thread Casper Ti. Vector
On Fri, Nov 25, 2016 at 11:07:15AM +0300, Jean Louis wrote: > How may I trap ctrl-alt-del, $ sysctl kernel.ctrl-alt-del=0 > and assign a function to it, so that system nicely shuts down?

How to trap ctrl-alt-del?

2016-11-25 Thread Jean Louis
While previously the ctrl-alt-del was trapped by SysV (or whatever), so that system runs "halt", now when I have switched to s6-rc an s6-tools, it is not. In fact, system immediately reboots, which is not desired. How may I trap ctrl-alt-del, and assign a function to it, so that system nicely shut