Slackware-current: is possible to run loginctl hibernate as user?
by camerabambai from LinuxQuestions.org on (#5K7A1)
I'm on Slackware current usingd elogind, I can sleep and hibernate only using sudo from terminal.
With the old good pm-utils I had only to edit the 10-enable-suspend.rules, make init 3 && init 4 and I can hibernate as user.
Now I make those steps
a)copying the two polkit rules
Code: cp /usr/share/polkit-1/rules.d/10-enable-* /etc/polkit-1/rules.d/b)I add my user in power group
Code: usermod -aG power myuserc)in logind.conf I had those options enabled
Code: grep -v ^# /etc/elogind/logind.conf
[Login]
HandlePowerKey=poweroff
HandleHibernateKey=hibernate
HandleLidSwitch=hibernate
[Sleep]
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yesd) I reboot the system
Code: rebootAnd from xfce4-power-manager I cannot hibernate or sleep.
I tried also from cli
Code: $ loginctl hibernate
$ echo $?
1
With the old good pm-utils I had only to edit the 10-enable-suspend.rules, make init 3 && init 4 and I can hibernate as user.
Now I make those steps
a)copying the two polkit rules
Code: cp /usr/share/polkit-1/rules.d/10-enable-* /etc/polkit-1/rules.d/b)I add my user in power group
Code: usermod -aG power myuserc)in logind.conf I had those options enabled
Code: grep -v ^# /etc/elogind/logind.conf
[Login]
HandlePowerKey=poweroff
HandleHibernateKey=hibernate
HandleLidSwitch=hibernate
[Sleep]
AllowSuspend=yes
AllowHibernation=yes
AllowSuspendThenHibernate=yes
AllowHybridSleep=yesd) I reboot the system
Code: rebootAnd from xfce4-power-manager I cannot hibernate or sleep.
I tried also from cli
Code: $ loginctl hibernate
$ echo $?
1