You are not logged in.

#1 2015-07-28 20:19:11

tvdbarch
Member
Registered: 2015-07-27
Posts: 18

[SOLVED]How to prompt in shell when pushing power-off?

I'm running arch linux on an asus c300m chromebook. The physical keyboard layout is a bit annoying, as the poweroff button is right above the backspace key and often I push the wrong button by accident.

For now I'm working solely through the cli, so I would like to now how I could let the shell give a prompt if I want to shutdown, reboot,.. after pushing the power-off button. A timer would be nice but not necessary.

This is standard in most GUI's in the traditional GNU/Linux distro's so I'm guessing this is already available in the official arch rep or in AUR. But I don't how to start looking for very specific packages.

Last edited by tvdbarch (2015-07-28 20:50:39)

Offline

#2 2015-07-28 20:27:02

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,804

Re: [SOLVED]How to prompt in shell when pushing power-off?

Use acpid and write a handler for it.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2015-07-28 20:32:03

tvdbarch
Member
Registered: 2015-07-27
Posts: 18

Re: [SOLVED]How to prompt in shell when pushing power-off?

Thanks!

Offline

Board footer

Powered by FluxBB