ck-list-sessions [--all] [--sid=sid] [--format=format] [--help] [--version]
ck-list-sessions is a utility that displays information from the ConsoleKit database. By default, only open sessions are shown. The --all option can be used to display all existing sessions on the system. ck-list-sessions returns information about each ConsoleKit session. Users can specify which properties to display via the --format option.
The following properties can be displayed for each session:
The following options are supported:
20 -a, --all Show all ConsoleKit sessions. If this option is not provided, only open sessions are shown.
20 -s, --sid=sid Show one ConsoleKit session with session id sid.
20 -f, --format=format Display information using the specified format. The format value is a list of properties to display separated by commas.
20 -h, --help Display detailed usage message.
20 -V, --version Display the version of the ck-list-sessions application.
For each session, the following session properties are displayed:
20 unix-user The user id value associated with the session.
20 realname The name of the user associated with the session.
20 seat The ID for the ConsoleKit Seat associated with the session.
20 session-type The ConsoleKit session type. This value is specified by the "Type" key in the ConsoleKit session configuration file associated with this session.
20 display-type The ConsoleKit display type. This value is specified by the "DisplayTemplate" key in the ConsoleKit session configuration file associated with this session.
20 open The value is "TRUE" if the session is open, and "FALSE" otherwise.
20 active The value is "TRUE" if the session is active on the seat to which it is attached, and "FALSE" otherwise.
20 x11-display The value of the X11 DISPLAY environment variable for this session if one is present.
20 x11-display-device The value of the display device that the X11 display for the session is connected to. If there is no x11-display set, then this value is undefined.
20 display-device The display device associated with the session.
20 remote-host If the session is not local, the value is the host name associated with the session. If the session is local, the value is empty.
20 is-local The value is "TRUE" if the session is local, and "FALSE" if remote.
20 on-since An ISO 8601 date-time string that corresponds to the time the session started.
20 login-session-id The value of the login session ID that the underlying system uses to enforce session boundaries. If there is no login session ID set then this value is an empty string.
20 idle-since-hint An ISO 8601 date-time string that corresponds to the time of the last change of the idle-hint. This is a hint used to indicate that the session may be idle. For sessions with a x11-display set (ie. graphical sessions), it is up to each session to delegate the responsibility for updating this value. Typically, the screensaver will set this. However, for non-graphical sessions with a display-device set the Session object itself will periodically update this value based on the activity detected on the display-device itself. This should not be considered authoritative.
Example 1: Show running sessions.
example% ck-list-sessions
This command would generate output like the following for each session:
SessionSeat1Local: unix-user = '50' realname = 'GDM Reserved UID' seat = 'Seat1' session-type = 'LoginWindow' display-type = 'Local' open = 'TRUE' active = 'TRUE' x11-display = ':0' x11-display-device = '/dev/console' display-device = '/dev/console' remote-host-name = '' is-local = 'TRUE' on-since = '2009-08-11T06:46:42.941134Z' login-session-id = '' idle-since-hint = ''
Example 2: Show only the session-id, unix-user, and display-type properties.
example% ck-list-sessions --format="session-id,unix-user,display-type"
This command would generate output like the following for each session:
SessionSeat1Local 50 Local
The following files are used by this application:
20 /usr/bin/ck-list-sessions Executable for Show ConsoleKit Session Information.
20 /etc/ConsoleKit/session.d ConsoleKit session configuration files.
ck-history(1), ck-launch-session(1), ck-seat-tool(8), console-kit-daemon(8), gdm(8), attributes(7)