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