Description
Halton Huo
2008-12-29 19:27:43 UTC
Created attachment 21560 [details] [review] patch for bug #19333 This patch is for option #1, ConsoleKit part. ck-dynamic work likes old gdmdynamic in http://bugzilla.gnome.org/show_bug.cgi?id=536355#c5. Following options are supportted: -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://projects.gnome.org/gdm/docs/2.20/binaries.html#gdmdynamiccommandline, 'ck-dynamic -l' does not accept pattern anymore. It is mainly because xserver_command does not passed to ConsoleKit and I do not think it is very useful. If you think we need add pattern back, I can re-work on the patch. Created attachment 24683 [details] [review] 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://wiki.genunix.org/wiki/index.php/design_for_newgdm_consolekit_multiseat_multidisplay. This patch is part for ConsoleKit, based on 0.3.0 tarball release. Created attachment 26451 [details] [review] reworked patch after Ray's review on CK's patch There are multiple changes which are based on review by Ray Strode, http://mail.gnome.org/archives/gdm-list/2009-May/msg00007.html 1 Use separate .disp file for display type, remove display-types.conf install .disp files to /etc/ConsoleKit/displays.d/, each .disp file represent a display type. 2 Only use Command in .disp file, remove Arguments/UseAuth/Chooser/Priority 3 Remove priority code 4 When adding/removing displays, CK should emit signal instead of calling GDM method directly For org.freedesktop.ConsoleKit.Seat add signal SessionToAdd and SessionToRemove add method ManageSeat For org.freedesktop.ConsoleKit.Manager remove method CreateStaticSessions 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_type_new() 8 Remove method org.freedesktop.ConsoleKit.Manager.ListCreatedSessions. Let ck-dynamic do the GetSeats() and filtering dynamic displays itself 9 make ck_seat_add_display(), ck_seat_set_display_type() and ck_seat_get_displ return a gbooolean 10 Remove unused create_display_with_parameters() 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 25145f35ab527a2219604e1710eb65e2178f6978 Created attachment 29538 [details] [review] updated patch The latest patch. Created attachment 30167 [details] [review] updated patch Latest version of the patch. Created attachment 30977 [details] [review] updated patch Update patch based on git-master 01e8cbff0f4dc50f24611d3ede20b62343fac976. This patch also can be applied on 0.4.1 tarball. Created attachment 31124 [details] [review] Merge multi-seat branch into master This patch is reworked with git-master 48b4b2d1174db98ee87ea4e71f4a21221043ca3f. synced with multi-seat branch commit 56d275968f8d9c866a9b69b0dcf769aba0e619af. Created attachment 31332 [details] [review] Merge multi-seat branch into master This patch is reworked with git-master 48b4b2d1174db98ee87ea4e71f4a21221043ca3f. It is synced with multi-seat branch commit f1bbdd6526e6cbceae93be941930808bd1f90a69. Created attachment 32865 [details] Merge multi-seat branch into master This patch is reworked with git-master http://cgit.freedesktop.org/ConsoleKit/commit/?id=2418840248f07025ad0edc96ed17e03ce5e47f3e. It is synced with multi-seat branch commit http://cgit.freedesktop.org/ConsoleKit/commit/?h=multi-seat&id=65d70ecd4070c1e34be24f7b050b094c76bb614b Hello, any update on this? Created attachment 36782 [details] [review] Multi-seat branch patcn based on 0.4.1 tarball This patch is reworked with git-master http://cgit.freedesktop.org/ConsoleKit/commit/?id=c9f2292339540d4b9d8940bcef16b7485480c8d9. It is synced with multi-seat branch commit http://cgit.freedesktop.org/ConsoleKit/commit/?h=multi-seat&id=1795a7eb7b1ba2f43a918d2541bf0b5814b80671 Comment on attachment 36782 [details] [review] Multi-seat branch patcn based on 0.4.1 tarball The attachment #36782 [details] [review] is based on 0.4.1 tarball, not on git-master. Created attachment 36798 [details] [review] multi-seat branch based on git-master c9f2292339540d4b9d8940bcef16b7485480c8d9 This patch is reworked with git-master http://cgit.freedesktop.org/ConsoleKit/commit/?id=c9f2292339540d4b9d8940bcef16b7485480c8d9. It is synced with multi-seat branch commit http://cgit.freedesktop.org/ConsoleKit/commit/?h=multi-seat&id=1795a7eb7b1ba2f43a918d2541bf0b5814b80671 With this patch, this causes a crash: qdbus --system \ org.freedesktop.ConsoleKit /org/freedesktop/ConsoleKit/SessionStaticSeat1Local \ org.freedesktop.DBus.Introspectable.Introspect The problem seems to be that src/org.freedesktop.ConsoleKit.Session.xml contains definitions for the properties "session", "is-open" and "is-dynamic" but there's no corresponding code for them and so console-kit-daemon crashes when it tries to build the xml. There's some code for "is-open" but it looks as though it falls short of actually calling g_object_class_install_property(). 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.freedesktop.ConsoleKit.Session.xml. 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 attachment 38768 [details] [review] 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 attachment 38890 [details]
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.
Created attachment 43782 [details] [review] Updated ConsoleKit patch for 0.4.1 Updated patch for 0.4.1. This fixes the open-session-request and close-session-request signals in the ck-seat.c code is better defined which avoids warning messages like these going to the syslog. WARNING: signal "open_session_request" (from "OpenSessionRequest") exported but not found in object class "CkSeat" WARNING: signal "close_session_request" (from "CloseSessionRequest") exported but not found in object class "CkSeat" Created attachment 43783 [details] [review] Updated patch for ConsoleKit 0.4.2. Created attachment 49167 [details] [review] 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 [details] [review] Updated patch for ConsoleKit 0.4.5 Or this patch with ConsoleKit 0.4.5 Created attachment 49169 [details]
Sunray.display file
If you want to use this with Sun Ray, note you need to install this configuration file as /etc/ConsoleKit/displays.d/Sunray.display. This just simply configures the Xserver for Sun Ray to use.
Created attachment 54478 [details] [review] 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 [details] [review] 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://cgit.freedesktop.org/ConsoleKit/log/?h=wip/multi-seat Note that the latest code for this feature is now here in a branch in GIT. This makes more sense than updating the patches here. The patches are obsolete: http://cgit.freedesktop.org/ConsoleKit/log/?h=wip/multi-seat Hello! I'm Hello! I'm quite new in this topic. I'd like to know whether this new patch can help with kdm, or other display manager? I running two separate X server on my system (real multiseat with different input/outputs, started by systemd), and the second server didn't get any seat-id. I know the master branch of ConsoleKit can't handle it, and I had figured out that the ck-seat-tools program could handle this. If I try to start a new seat with the command: "ck-seat-tool -a --display-type Local" from the console then I get the next message: "Seat /org/freedesktop/ConsoleKit/Seat1 with session /org/freedesktop/ConsoleKit/Session1 has been added" but systemd-loginctl doesn't show up any new seat. Could you give some hint how/where ck-seat-tools can be used? Another problem: if I start the command: "ck-seat-tool -a --display-type Local --seat-id seatmon" from graphical console then I get an error: "** (ck-seat-tool:1637): WARNING **: Unable to add seat: Rejected send message, 2 matched rules; type="method_call", sender=":1.45" (uid=1000 pid=1637 comm="ck-seat-tool -a --display-type Local --seat-id sea") interface="org.freedesktop.ConsoleKit.Manager" member="AddSeatById" error name="(unset)" requested_reply="0" destination="org.freedesktop.ConsoleKit" (uid=0 pid=954 comm="/usr/sbin/console-kit-daemon --no-daemon ")" Note that to use this branch of ConsoleKit you also need to use the wip/multi-seat version of GDM. Refer here: http://bugzilla.gnome.org/show_bug.cgi?id=536355 The ck-seat-tool command runs the Xserver command in /etc/ConsoleKit/displays.d/(DISPLAY_TYPE).display where (DISPLAY_TYPE) cooresponds to the value passed in via ck-seat-tool. You should verify that the command being run is valid. If it isn't working, try running console-kit-daemon with the --debug option. I have attached the ck-seat-tool and console-kit-daemon man pages which explain how this works for reference. If this does not give you enough hints, contact me at brian.cameron@oracle.com and I am happy to trade emails with you rather than cluttering up this bug report. Created attachment 61244 [details]
ck-seat-tool man page
Created attachment 61245 [details]
console-kit-daemon man page
|
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.