Brian Cameron wrote: > 4.1.1 Detail About ConsoleKit Database > # Device associated with Xserver running session (if any). > x11_display_device=/dev/console > 4.1.5 Environment Variables > CK_SESSION_X11_DISPLAY_DEVICE - The device associated with the Xserver.
As previously explained to the project team before ARC, in our current X server implementations, there may be anywhere from 0 to 16 device files in /dev representing the display devices on which X is displaying - and there is no guarantee of uniqueness, nor that the same device file represents the same physical device. It seems highly unlikely that any client is going to be able to do anything useful with this string, so I still don't understand what the point of reporting it is. > # Boolean. Set to "true" if the active session, "false otherwise" > is_active=false "the" active session? On a multi-seat or Sun Ray system, is it okay that there are multiple active sessions? > /var/svc/manifest/system/consolekit.xml Uncommitted SMF > integration > file. The SMF manifest (*.xml file) should be a Project Private implementation detail. The public interface you're missing here is the FMRI - that's the interface the rest of the system needs to use to control your service, and thus the one you need to include in your interface table. > /usr/lib/ck-collect-session-info Private See 4.1.2. > /usr/lib/ck-get-x11-display-device Volatile See 4.1.2. > /usr/lib/ck-get-x11-server-pid Private See 4.1.2. > /usr/lib/ConsoleKit/scripts/ck-system-restart Private See 4.1.6. > /usr/lib/ConsoleKit/scripts/ck-system-stop Private See 4.1.6. Why are the first three not in /usr/lib/ConsoleKit with the rest? > + /usr/lib/ck-collect-session-info --uid UID --pid PID > > This program is passed the UID and PID of a process, and it returns > the following information from the ConsoleKit database about that > process. > > + /usr/lib/ck-get-x11-server-pid > > Returns the PID of the Xserver process running on the current > $DISPLAY environment variable. What happens if the X server is running in a different zone/label than the client? (For instance, on a Trusted Extensions system, the X server runs in the global zone, labeled clients in non-global, per-label zones.) Is there a ConsoleKit daemon per zone? > GDM uses the ck-get-x11-display-device application to get the > x11-display-device value. When a display is running via graphical VT, > ConsoleKit uses the following mechanism to get the TTY value. This > mechanism works on other operating systems, such as Linux, and also > works on Solaris when VT is being used. When VT is used, these > programs make use of proc interfaces to collect some of this > information, as follows: > > The ConsoleKit ck-get-x11-display-device, ck-get-x11-server-pid, and > ck-collect-session-info programs call XOpenDisplay on a given > $DISPLAY, > and then calls ConnectionNumber to get the socket associated with > that display. getpeerucred is used to get the UID and PID of the > process. This still seems highly silly, given that gdm can get the pid of the Xserver by simply checking the variable into which it put the return value from the fork() call it made to start the X server. > ConsoleKit manages stopping and restarting the system. On Solaris, > when > the display manager informs ConsoleKit that such an action is > requested, > the chkauthattr function is called to see if the calling user has RBAC > permissions for the "solaris.system.shutdown" key. If yes, then the > /usr/lib/ConsoleKit/scripts/ck-system-restart script is run if a > restart > action was requested. If a shutdown action was requested, then the > /usr/lib/ConsoleKit/scripts/ck-system-stop script is run. > > On Solaris, the ck-system-stop script runs "/sbin/init 5" and the > ck-system-restart script runs "/sbin/init 6". Do provisions need to be made for choosing between fast reboot & slow reboot? -- -Alan Coopersmith- alan.coopersmith at sun.com Sun Microsystems, Inc. - X Window System Engineering