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 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.

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?

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 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 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.

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.