On Sat, Jan 16, 2016 at 1:34 PM, lukash <lukk...@email.cz> wrote: > Hi all, > > I'm reading on the internet that systemctl poweroff should work for > normal user if he is the only one logged in, he is logged in locally > and his session is active. I seem to be meeting these conditions: > > # loginctl > SESSION UID USER SEAT > 2 1000 lukash seat0 > > $ loginctl show-session 2 > Id=2 > User=1000 > Name=lu > Timestamp=Sat 2016-01-16 17:27:30 CET > TimestampMonotonic=9614418 > VTNr=7 > Seat=seat0 > Display=:0 > Remote=no > Service=lightdm > Desktop=awesome > Scope=session-2.scope > Leader=529 > Audit=2 > Type=x11 > Class=user > Active=yes > State=active > IdleHint=no > IdleSinceHint=0 > IdleSinceHintMonotonic=0 > > But invoking the command gives me: > > $ systemctl poweroff > Failed to set wall message, ignoring: Access denied > Failed to power off system via logind: Access denied > Failed to start poweroff.target: Access denied > > How is this supposed to work on Gentoo?
Make sure you have USE=policykit set for sys-apps/systemd.