1 |
Recent threads about consolekit vs logind(systemd) have made me curious, so |
2 |
I've been studying... |
3 |
|
4 |
A few of us have had recent problems with things like plugging USB sticks, |
5 |
which once worked transparently but now require root privileges. |
6 |
|
7 |
I've discovered that my own such problems are caused by this: |
8 |
|
9 |
$loginctl show-session 1 (I have only one session, cleverly named '1') |
10 |
|
11 |
Id=1 |
12 |
Timestamp=Sun 2014-02-09 07:18:32 PST |
13 |
TimestampMonotonic=389744251 |
14 |
VTNr=1 |
15 |
TTY=/dev/tty1 |
16 |
Remote=no |
17 |
Service=login |
18 |
Scope=session-1.scope |
19 |
Leader=426 |
20 |
Audit=1 |
21 |
Type=tty |
22 |
Class=user |
23 |
Active=no <========================= should be 'yes' |
24 |
State=online <======================= should be 'active' |
25 |
|
26 |
Users of consolekit, don't feel neglected. You should try this instead: |
27 |
|
28 |
$ck-list-sessions |
29 |
Session1: |
30 |
unix-user = '1001' |
31 |
realname = '(null)' |
32 |
seat = 'Seat2' |
33 |
session-type = '' |
34 |
active = FALSE (correct because I'm ssh'd into a remote box) |
35 |
x11-display = ':0' |
36 |
x11-display-device = '/dev/tty2' |
37 |
display-device = '/dev/tty1' |
38 |
remote-host-name = '' |
39 |
is-local = FALSE |
40 |
on-since = '2014-02-09T22:00:10.750312Z' |
41 |
login-session-id = '1' |
42 |
|
43 |
Canek explained that the reason my session is not 'active' is that I'm |
44 |
not using a Display Manager (gdm kdm lightdm), which talks to logind or |
45 |
consolekit and vouches for my physical presence at the local keyboard. |
46 |
|
47 |
However, when I do the same thing on arch linux (as a virtualbox guest) |
48 |
I see that my session (running gnome) is 'active' and I have no trouble |
49 |
powering off the virtual machine as an unprivileged user. |
50 |
|
51 |
Any ideas how I can fix it? |
52 |
|
53 |
BTW, this helped me to understand some of the buzzwords I used above: |
54 |
|
55 |
http://www.freedesktop.org/wiki/Software/systemd/multiseat/ |