ConsoleKit does not play nicely with multiseat configurations, resulting in failure to mount usb devices (pen drives)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
| ConsoleKit |
Confirmed
|
High
|
||
| consolekit (Debian) |
Fix Released
|
Unknown
|
||
| consolekit (Ubuntu) |
Low
|
Unassigned |
Bug Description
Binary package hint: hal
This is a machine that was upgraded (six months ago) from 7.04 to 7.10 and not to 8.04 beta.
When I plug in an USB device hal doesn't mount it. This happens with more than one device (tried
U3 MP3 player and a small card reader). The same devices work well in my laptop that is also running hardy.
Looking at the output of hald --daemon=no I get something like:
using action org.freedesktop
pid 8027: rc=1 signaled=0: /usr/lib/
Run started hald-probe-storage (10000) (0)
! full path is '/usr/lib/
woohoo
pid 8034: rc=2 signaled=0: /usr/lib/
In the laptop where everything works, I can see some extra lines just after the first above that says:
passed privilege
3563: XYA creating /media/.hal-mtab~
3563: XYA closing /media/.hal-mtab~
3563: XYA done renaming /media/.hal-mtab~ /media/.hal-mtab
3563: XYA released lock on /media/
I will attach the files described in https:/
The output of the id commands are:
pjssilva@leia:~$ id
uid=1000(pjssilva) gid=1000(pjssilva) grupos=
pjssilva@leia:~$ id hal
id: hal: Usuário inexistente
pjssilva@leia:~$ id haldaemon
uid=110(haldaemon) gid=110(haldaemon) grupos=
pjssilva@leia:~$ uname -a
Linux leia 2.6.24-16-generic #1 SMP Thu Apr 10 13:23:42 UTC 2008 i686 GNU/Linux
Paulo J. S. Silva (pjssilva) wrote : | #1 |
Paulo J. S. Silva (pjssilva) wrote : | #2 |
Paulo J. S. Silva (pjssilva) wrote : | #3 |
Paulo J. S. Silva (pjssilva) wrote : | #4 |
Paulo J. S. Silva (pjssilva) wrote : | #5 |
Paulo J. S. Silva (pjssilva) wrote : | #6 |
serrs (serrs) wrote : | #7 |
This was very useful, I had the same problem.
To be more clear, a person needs to remove "-novtswitch -sharevts" from ONLY one of the seat commands in gdm.conf. The Seat without those two switches will then get control over inserted USB media etc.
Changed in hal: | |
importance: | Undecided → Low |
status: | New → Confirmed |
|
#8 |
This is a feature requested by new GDM, which is to add gdmdynamic supporting in GDM. Refer to bug http://
There are two options to achieve this goal.
Option #1: Implement in ConsoleKit and GDM code. Add ck-dynamic in ConsoleKit,
Xserver
^
| STEP 4: Create/Kill a Xsession on ":101"
|
gdm-binary (Listern for event from ConsoleKit)
^
| STEP 3: Signal CreateDisplay/
| with display ":101"
_ _ _ _|
| ck-dynamic
| | ^
| __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ | |
| | |
| | STEP 2: Require to CreateSession/
| | with display ":101" |
| | |
| V STEP 1: Call ck-dynamic when a display, e.g. ":101", |
ConsoleKit is added/removed. |
1. gdm-binary to listen for CreateDynamicDi
2. console-kit-daemon to listen for CreateSession/
3. ListenCreatedSe
4. gdmdynamic is a script wrapper for ck-dynamic
Option #2: Implement inside GDM code.
Xserver
^
| STEP 4: Create/Kill Xserver regarding ":101"
|
gdm-binary (Listern for event from ConsoleKit)
^ ^
| |__ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __
| |
| STEP 3: Register/Unregister a X session |
| corresponding to ":101" |
| |
| STEP 2: Require GDM to start/terminate Xsession for ":101" |
| |
| gdmdynamic
| |
V STEP 1: Call gdmdyncmic when a display, e.g. ":101", |
ConsoleKit is added/removed. |
Option #2 is how patch in http://
|
#9 |
Created an attachment (id=21560)
patch for bug #19333
This patch is for option #1, ConsoleKit part.
ck-dynamic work likes old gdmdynamic in http://
-a, --add=display Add a new display
-d, --delete=display Delete a display
-l, --list List all attached displays
-r, --release Release (run) all displays waiting in the DISPLAY_CONFIG state
-v, --verbose Verbose mode
-V, --version Version of this application
-a, -d, -l, -V are supportted. -r and -v are no-op by now
Brian said ConsoleKit maintainer mccann think option #1 is better.
This patch is tested on Solaris + SunRay 4.1, so far so good.
Note, according http://
If you think we need add pattern back, I can re-work on the patch.
Created an attachment (id=24683)
multi-seat and multi-display patch for ConsoleKit
With discussion with gdm-list, we comes out a design for multi-seat and multi-display support. The design is located at http://
This patch is part for ConsoleKit, based on 0.3.0 tarball release.
Created an attachment (id=26451)
reworked patch after Ray's review on CK's patch
There are multiple changes which are based on review by Ray Strode,
http://
1 Use separate .disp file for display type, remove display-types.conf
install .disp files to /etc/ConsoleKit
each .disp file represent a display type.
2 Only use Command in .disp file, remove Arguments/
3 Remove priority code
4 When adding/removing displays, CK should emit signal instead of
calling GDM method directly
For org.freedesktop
add signal SessionToAdd and SessionToRemove
add method ManageSeat
For org.freedesktop
remove method CreateStaticSes
add method GetUnmanagedSeats
5 Use a{sv} for dbus method CreateDisplay, since
task #2 is done, there are only two parameters need to be send with
signal, this work is not necessary
6 Rewrite ck-dynamic to reflect change in task #4
7 Rewrite ck_display_
8 Remove method org.freedesktop
Let ck-dynamic do the GetSeats() and filtering dynamic displays itself
9 make ck_seat_
return a gbooolean
10 Remove unused create_
11 Comments should appear before the lines they're commenting on, not after.
12 Reverse Name and Version back
13 Figure out X11_DIR from pkg-config
This patch is reworked under branch multi-seat by commit 25145f35ab527a2
tags: | added: multiseat |
Richard Hansen (rhansen) wrote : Re: Default policykit configuration does not play nicely with multiseat configurations, resulting in failure to mount usb devices (pen drives) | #13 |
I believe this is a consolekit limitation and not a hal bug, so I'm switching it to consolekit. Please feel free to change it back if I'm wrong.
affects: | hal (Ubuntu) → consolekit (Ubuntu) |
Richard Hansen (rhansen) wrote : | #14 |
If you run ck-list-sessions, you'll see "active = FALSE" for each seat that has "-novtswitch -sharevts" in the X command line. I believe this is why you can't mount USB thumb drives from those seats (policykit sees the seat as inactive so it doesn't mount the drive for that seat).
Changed in hal: | |
status: | Unknown → Confirmed |
Created an attachment (id=29538)
updated patch
The latest patch.
Created an attachment (id=30167)
updated patch
Latest version of the patch.
Created an attachment (id=30977)
updated patch
Update patch based on git-master 01e8cbff0f4dc50
Created an attachment (id=31124)
Merge multi-seat branch into master
This patch is reworked with git-master 48b4b2d1174db98
Created an attachment (id=31332)
Merge multi-seat branch into master
This patch is reworked with git-master 48b4b2d1174db98
Created an attachment (id=32865)
Merge multi-seat branch into master
This patch is reworked with git-master http://
It is synced with multi-seat branch commit http://
Hello, any update on this?
Created an attachment (id=36782)
Merge multi-seat branch into master
This patch is reworked with git-master
http://
It is synced with multi-seat branch commit
http://
(From update of attachment 36782)
The attachment #36782 is based on 0.4.1 tarball, not on git-master.
Created an attachment (id=36798)
multi-seat branch based on git-master c9f2292339540d4
This patch is reworked with git-master
http://
It is synced with multi-seat branch commit
http://
Changed in hal: | |
importance: | Unknown → High |
With this patch, this causes a crash:
qdbus --system \
org.
/org/
org.
The problem seems to be that src/org.
There's some code for "is-open" but it looks as though it falls short of actually calling g_object_
There are other properties defined by the code (display-template, display-variables, ever-open and seat-id?) that are defined by the code but not in src/org.
I'm unsure what the best way forward is here: should the three undefined properties be simply removed from the xml or should there be code put in place to support them (even though they're not used). And should the extra properties be defined in the xml?
Created an attachment (id=38768)
updated patch
Here is the latest patch that we are using on Solaris which builds against ConsoleKit 0.4.2.
I think the is_dynamic code is unused and could likely be removed. Not sure about the best thing to do with the is_open code.
I just attached the latest patch that we use with Solaris. It doesn't address the issues you raised, but it does have a few minor bug fixes.
Created an attachment (id=38890)
This is the latest patch that we use with ConsoleKit 0.4.1
This is the latest patch we use with ConsoleKit 0.4.1 in case people are using the older version of ConsoleKit.
Changed in hal: | |
importance: | High → Unknown |
Changed in hal: | |
importance: | Unknown → High |
Created attachment 43782
Updated ConsoleKit patch for 0.4.1
Updated patch for 0.4.1. This fixes the open-session-
close-session-
avoids warning messages like these going to the syslog.
WARNING: signal "open_session_
WARNING: signal "close_
Created attachment 43783
Updated patch for ConsoleKit 0.4.2.
Created attachment 49167
Updated patch for ConsoleKit 0.4.1
I have done a lot of work improving the robustness of the MultiSeat patch and it is now working a lot better. I recommend using this patch with ConsoleKit 0.4.1.
Created attachment 49168
Updated patch for ConsoleKit 0.4.5
Or this patch with ConsoleKit 0.4.5
Created attachment 49169
Sunray.display file
If you want to use this with Sun Ray, note you need to install this configuration file as /etc/ConsoleKit
Created attachment 54478
Updated patch for ConsoleKit 0.4.1
This updated patch addresses some robustness issues, fixing the code so that it will not try to respawn displays when the Xserver fails.
Created attachment 54479
Updated patch for ConsoleKit 0.4.5
Updated patch for 0.4.5. Note that this code is now maintained upstream in the wip/multi-seat branch:
http://
affects: | hal → consolekit |
summary: |
- Default policykit configuration does not play nicely with multiseat - configurations, resulting in failure to mount usb devices (pen drives) + ConsoleKit does not play nicely with multiseat configurations, resulting + in failure to mount usb devices (pen drives) |
Changed in consolekit (Debian): | |
status: | Unknown → New |
Changed in consolekit (Debian): | |
status: | New → Fix Released |
I have found and solved the problem.
I am using a multiseat setup and the new authentication framework used in gnome, consolekit, don't play well with old multiseat configurations.
policykit+
Following the hints given in
http:// linux.derkeiler .com/Mailing- Lists/Fedora/ 2007-09/ msg03482. html
I was able to solve the problem by deleting the "-novtswitch -sharevts" options gdm.conf- custom.
from the calls to /usr/bin/X that are in my /etc/gdm/
(in this case you need to explicitly define the terminal you want to use for the multiple
sessions in the endo of the calls to /usr/bin/X).