1 |
On Sat, Jan 16, 2016 at 1:34 PM, lukash <lukkash@×××××.cz> wrote: |
2 |
> Hi all, |
3 |
> |
4 |
> I'm reading on the internet that systemctl poweroff should work for |
5 |
> normal user if he is the only one logged in, he is logged in locally |
6 |
> and his session is active. I seem to be meeting these conditions: |
7 |
> |
8 |
> # loginctl |
9 |
> SESSION UID USER SEAT |
10 |
> 2 1000 lukash seat0 |
11 |
> |
12 |
> $ loginctl show-session 2 |
13 |
> Id=2 |
14 |
> User=1000 |
15 |
> Name=lu |
16 |
> Timestamp=Sat 2016-01-16 17:27:30 CET |
17 |
> TimestampMonotonic=9614418 |
18 |
> VTNr=7 |
19 |
> Seat=seat0 |
20 |
> Display=:0 |
21 |
> Remote=no |
22 |
> Service=lightdm |
23 |
> Desktop=awesome |
24 |
> Scope=session-2.scope |
25 |
> Leader=529 |
26 |
> Audit=2 |
27 |
> Type=x11 |
28 |
> Class=user |
29 |
> Active=yes |
30 |
> State=active |
31 |
> IdleHint=no |
32 |
> IdleSinceHint=0 |
33 |
> IdleSinceHintMonotonic=0 |
34 |
> |
35 |
> But invoking the command gives me: |
36 |
> |
37 |
> $ systemctl poweroff |
38 |
> Failed to set wall message, ignoring: Access denied |
39 |
> Failed to power off system via logind: Access denied |
40 |
> Failed to start poweroff.target: Access denied |
41 |
> |
42 |
> How is this supposed to work on Gentoo? |
43 |
|
44 |
Make sure you have USE=policykit set for sys-apps/systemd. |