Gentoo Archives: gentoo-user

From: lukash <lukkash@×××××.cz>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] Shutdown through systemctl as a normal user
Date: Fri, 29 Jan 2016 14:00:44
Message-Id: 1454076017.866.1.camel@email.cz
In Reply to: Re: [gentoo-user] Shutdown through systemctl as a normal user by Mike Gilbert
1 On Fri, 2016-01-22 at 19:47 -0500, Mike Gilbert wrote:
2 > On Sat, Jan 16, 2016 at 1:34 PM, lukash <lukkash@×××××.cz> wrote:
3 > > Hi all,
4 > >
5 > > I'm reading on the internet that systemctl poweroff should work for
6 > > normal user if he is the only one logged in, he is logged in
7 > > locally
8 > > and his session is active. I seem to be meeting these conditions:
9 > >
10 > > # loginctl
11 > >    SESSION        UID USER             SEAT
12 > >          2       1000 lukash           seat0
13 > >
14 > > $ loginctl show-session 2
15 > > Id=2
16 > > User=1000
17 > > Name=lu
18 > > Timestamp=Sat 2016-01-16 17:27:30 CET
19 > > TimestampMonotonic=9614418
20 > > VTNr=7
21 > > Seat=seat0
22 > > Display=:0
23 > > Remote=no
24 > > Service=lightdm
25 > > Desktop=awesome
26 > > Scope=session-2.scope
27 > > Leader=529
28 > > Audit=2
29 > > Type=x11
30 > > Class=user
31 > > Active=yes
32 > > State=active
33 > > IdleHint=no
34 > > IdleSinceHint=0
35 > > IdleSinceHintMonotonic=0
36 > >
37 > > But invoking the command gives me:
38 > >
39 > > $ systemctl poweroff
40 > > Failed to set wall message, ignoring: Access denied
41 > > Failed to power off system via logind: Access denied
42 > > Failed to start poweroff.target: Access denied
43 > >
44 > > How is this supposed to work on Gentoo?
45 >
46 > Make sure you have USE=policykit set for sys-apps/systemd.
47
48 That did it! Thanks! I feel kind of stupid now...
49
50 Lukas