1 |
On Sun, Feb 9, 2014 at 4:43 PM, walt <w41ter@×××××.com> wrote: |
2 |
> Recent threads about consolekit vs logind(systemd) have made me curious, so |
3 |
> I've been studying... |
4 |
> |
5 |
> A few of us have had recent problems with things like plugging USB sticks, |
6 |
> which once worked transparently but now require root privileges. |
7 |
> |
8 |
> I've discovered that my own such problems are caused by this: |
9 |
> |
10 |
> $loginctl show-session 1 (I have only one session, cleverly named '1') |
11 |
> |
12 |
> Id=1 |
13 |
> Timestamp=Sun 2014-02-09 07:18:32 PST |
14 |
> TimestampMonotonic=389744251 |
15 |
> VTNr=1 |
16 |
> TTY=/dev/tty1 |
17 |
> Remote=no |
18 |
> Service=login |
19 |
> Scope=session-1.scope |
20 |
> Leader=426 |
21 |
> Audit=1 |
22 |
> Type=tty |
23 |
> Class=user |
24 |
> Active=no <========================= should be 'yes' |
25 |
> State=online <======================= should be 'active' |
26 |
> |
27 |
> Users of consolekit, don't feel neglected. You should try this instead: |
28 |
> |
29 |
> $ck-list-sessions |
30 |
> Session1: |
31 |
> unix-user = '1001' |
32 |
> realname = '(null)' |
33 |
> seat = 'Seat2' |
34 |
> session-type = '' |
35 |
> active = FALSE (correct because I'm ssh'd into a remote box) |
36 |
> x11-display = ':0' |
37 |
> x11-display-device = '/dev/tty2' |
38 |
> display-device = '/dev/tty1' |
39 |
> remote-host-name = '' |
40 |
> is-local = FALSE |
41 |
> on-since = '2014-02-09T22:00:10.750312Z' |
42 |
> login-session-id = '1' |
43 |
> |
44 |
> Canek explained that the reason my session is not 'active' is that I'm |
45 |
> not using a Display Manager (gdm kdm lightdm), which talks to logind or |
46 |
> consolekit and vouches for my physical presence at the local keyboard. |
47 |
> |
48 |
> However, when I do the same thing on arch linux (as a virtualbox guest) |
49 |
> I see that my session (running gnome) is 'active' and I have no trouble |
50 |
> powering off the virtual machine as an unprivileged user. |
51 |
|
52 |
Hi Walt; since I already have GNOME 3+systemd, I decided to install |
53 |
Xfce. Given that all the plumbing is essentially the same for both |
54 |
desktops, it took less than 15 minutes for portage to emerge it (13 |
55 |
small packages). |
56 |
|
57 |
I started it like you, with "exec startxcfe4" in my $HOME/.xinitrc. |
58 |
Boy, I had forgotten how desktops looked at the start of the century. |
59 |
|
60 |
Anyway, I had exactly the same problem as you; I needed my root |
61 |
password to mount USB sticks or shutdown the machine. My session was |
62 |
Active=no, State=online. |
63 |
|
64 |
As I suspected, if I started Xfce through gdm, everything worked |
65 |
without any issue; session was Active=yes, State=active, and my root |
66 |
password was not required for anything. So one workaround is to |
67 |
install gdm, but that is ugly (and unnecessary, see below). |
68 |
|
69 |
> Any ideas how I can fix it? |
70 |
|
71 |
Yeah, I found the solution on the net: |
72 |
|
73 |
http://blog.falconindy.com/articles/back-to-basics-with-x-and-systemd.html |
74 |
|
75 |
Basically, invoke startx passing Xorg the option of which VT you want |
76 |
to "transfer" for your X11 session: |
77 |
|
78 |
startx -- vt01 |
79 |
|
80 |
Obviously, that only works if you are in VT 1 (Alt-F1). |
81 |
|
82 |
> BTW, this helped me to understand some of the buzzwords I used above: |
83 |
> |
84 |
> http://www.freedesktop.org/wiki/Software/systemd/multiseat/ |
85 |
|
86 |
I owe you an apology Walter; I just assumed you had configured |
87 |
something wrong. I'm just getting used to the fact that with GNOME |
88 |
3+systemd everything kinda works immediately. Sorry. |
89 |
|
90 |
With the above solution, everything works with Xfce without asking for |
91 |
authentication... except adding printers, I suppose. |
92 |
|
93 |
Regards. |
94 |
|
95 |
PS: Inside Xfce (which looks surprisingly similar to GNOME 2), I kept |
96 |
doing the same thing I do on a Mac or Windows machine; pressing the |
97 |
windows key to bring up the shell overview. I really don't understand |
98 |
how could I get any work done before using GNOME Shell. |
99 |
-- |
100 |
Canek Peláez Valdés |
101 |
Posgrado en Ciencia e Ingeniería de la Computación |
102 |
Universidad Nacional Autónoma de México |