How to avoid the power button menu in ubuntu 14.04 and go straight to hibernate

Asked by MarianoAbsatz

I see that Trusty Thar is starting to use systemd (which I don't know much about) and, specifically, the power button in the notebook is handled by it.

Whenever I press the power button I get a graphical menu like the one in https://drive.google.com/file/d/0B2SULlYgDhZbaDJwMDZXOVA2WlU/view (sorry for the crappy phone photo, but can't screenshot when the menu is displayed).

I'd like the power button to go straight to hibernate without asking for other options or permission. Googling around, I found about /etc/systemd/logind.conf and changed a few options (see below), but the behavior stays the same.

My current /etc/systemd/longd.conf says:

[Login]
#NAutoVTs=6
#ReserveVT=6
#KillUserProcesses=no
#KillOnlyUsers=
#KillExcludeUsers=root
Controllers=blkio cpu cpuacct cpuset devices freezer hugetlb memory perf_event net_cls net_prio
ResetControllers=
#InhibitDelayMaxSec=5
HandlePowerKey=hibernate
HandleSuspendKey=suspend
HandleHibernateKey=hibernate
#HandleLidSwitch=suspend
PowerKeyIgnoreInhibited=yes
SuspendKeyIgnoreInhibited=yes
HibernateKeyIgnoreInhibited=yes
#LidSwitchIgnoreInhibited=yes
#IdleAction=ignore
#IdleActionSec=30min

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
actionparsnip
Solved:
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1

Isn't it a setting under power? The "when I press power button" action....

Revision history for this message
MarianoAbsatz (el-baby) said :
#2
Revision history for this message
Best actionparsnip (andrew-woodhead666) said :
#3
Revision history for this message
MarianoAbsatz (el-baby) said :
#4

Installing Gnome Tweak Tool (from andrew's link) and going to the "power" tab was the answer.

Thanks for the help.

Revision history for this message
MarianoAbsatz (el-baby) said :
#5

Thanks actionparsnip, that solved my question.