console-kit-daemon(1m)
β¨ NAME β¨
okay bestie, gather round π this is console-kit-daemon β literally the ConsoleKit daemon, the main character of session tracking. that's the whole name. slay.
π¦ SYNOPSIS π¦
πΈ DESCRIPTION πΈ
so console-kit-daemon is the service for defining and tracking users, login sessions and seats. it hands out the interfaces you need for switching sessions and for session migration when you're using mechanisms like Virtual Terminals (VT). ConsoleKit gives you a whole bunch of interfaces to say which displays are managed by the display manager, and how. no cap.
ConsoleKit keeps a database of which users are logged into the system, and it groups sessions by seats β a seat being a set of hardware (usually a keyboard and a mouse). other processes talk to ConsoleKit over D-Bus. that's the whole relationship, it's giving long-distance. π
one session leader process is the one responsible for asking console-kit-daemon to open a new session. in the typical case that session leader is a ConsoleKit-enabled display manager, like GDM. this leader connects to the D-Bus system bus and asks console-kit-daemon to open a session whenever it's needed.
if the operation succeeds, console-kit-daemon returns a cookie to the session leader. the session leader should store this variable in the environment as XDG_SESSION_COOKIE so it can be shared with its child processes. that environment variable holds the UUID used to tie processes to a session. iconic behavior tbh.
at this point the session is registered with ConsoleKit, and a particular set of information about the session gets stored along with it.
the Session stays open until the Session Leader disconnects from the D-Bus system bus. then the session is removed from its seat, and deregistered. it's giving β¨closureβ¨.
various other programs need to know info about running user sessions β think the Fast User Switch Applet and other mechanisms for switching the console to a different VT display. those programs use ConsoleKit interfaces to figure out if user switching is even supported, and to manage the switching of different sessions on the same seat.
ConsoleKit also provides a pam_ck_connector so that non-graphical logins (e.g. telnet, ssh, etc.) get registered with ConsoleKit. this works if that PAM module is enabled in the pam.conf(4) configuration. so ConsoleKit can be used as a utmp/wtmp replacement, because it stores a superset of the information found in the utmp/wtmp database. glow-up fr.
the ConsoleKit database is stored in the file /run/ConsoleKit/database. it stores information about active Seats, Sessions, and the current SessionLeader. π
π OPTIONS π
the following options are supported:
--debugβ turn on debug output. yes, more talking. we love that.-h,--helpβ show the detailed usage message.--no-daemonβ don't startconsole-kit-daemonas a daemon. lowkey perfect for debugging.--timed-exitβ exit after 30 seconds. also super useful for debugging.
π ENVIRONMENT VARIABLES π
see environ(5) for the descriptions of environment variables, bestie.
DISPLAYβ this one corresponds to the Xserver display value associated with the ConsoleKit session.XDG_SESSION_COOKIEβ ConsoleKit provides this environment variable to the session leader. the session leader is expected to make sure it's set for the session process that gets started. it contains a UUID used to tie the processes to the session. this is what supports user switching on displays that support it (currently only graphical VT displays on the console).XDG_RUNTIME_DIRβ this defines the base directory where user-specific files and objects should be stored. theXDG_RUNTIME_DIRis the same for all sessions of the same user, and it gets automatically removed once the last session of that user is closed. bye bestie π«Ά
the following environment variables get set when console-kit-daemon runs the run-seat.d scripts. these values correspond to the values returned by the ck-list-session(1) utility.
CK_SESSION_SEAT_IDβ the seat ID associated with the session.CK_SESSION_SEAT_UIDβ the user id associated with the sessionCK_SESSION_DISPLAY_DEVICEβ the display device associated with the session.CK_SESSION_X11_DISPLAY_DEVICEβ the value of the display device that the X11 display for the session is connected to. if there's nox11-displayset, then this value is undefined.CK_SESSION_X11_DISPLAYβ the value of the X11DISPLAYenvironment variable for this session, if one is present.CK_SESSION_REMOTE_HOST_NAMEβ if the session isn't local, the value is the host name associated with the session. if the session is local, the value is empty.CK_SESSION_IS_ACTIVEβ the value is"TRUE"if the session is active on the seat it's attached to, and"FALSE"otherwise.CK_SESSION_IS_LOCALβ the value is"TRUE"if the session is local, and"FALSE"if it's remote.CK_SESSION_IS_DYNAMICβ the value is"TRUE"if the session was started withck-seat-tool, and"FALSE"otherwise.
π§ EXTENDED DESCRIPTION π§
π ConsoleKit Seat Configuration π
ConsoleKit seat configuration files live in the /etc/ConsoleKit/seats.d directory. every seat configuration file ends with the .seat suffix. ConsoleKit ships a default seat file named 00-primary.seat, and you can add more seat configuration files on top of that. these files are in standard INI format.
the settings below are in "group/key=default_value" format, and they show the default values of the 00-primary.seat file. so for example, if you wanted to specify a different "Seat Entry/Name" value, you'd modify this file so it contains these lines:
[Seat Entry]
[...]
Name=Customized seat name
the following keys are supported for configuring ConsoleKit seats:
Seat Entry/Version=1.0β version number of the seat file. this specifies the version number of the configuration file format being used. currently only the value"1.0"is supported.Seat Entry/Name=Primary seatβ name of the seat.Seat Entry/ID=StaticSeatβ specifies the unique ID of the seat. if the value isNULL, thenconsole-kit-daemonwill provide a value. the ID may only contain the ASCII characters[A-Z][a=z][0-9]_".Seat Entry/Hidden=falseβ if this value is set to"false", then ConsoleKit will create this seat. otherwise, the seat will not be created.Seat Entry/Devicesβ this value is not currently supported. in the future it's planned that ConsoleKit will provide the ability to manage how device permissions are managed, and this key is a placeholder for that.Seat Entry/Sessions=Localβ list of sessions to start on the seat, separated by the";"character. each session must be defined in a ConsoleKit session configuration file named/etc/ConsoleKit/sessions.d/sessions.session, where sessions is the value of this key.
π¦ ConsoleKit Session Configuration π¦
ConsoleKit session configuration files live in the /etc/ConsoleKit/sessions.d directory. each session configuration file ends with the .session suffix. additional seat configuration files may be added. these files are in standard INI format.
the settings below are in "group/key" format, so to specify the "Session Entry/Name" value, the file should contain these lines:
[Session Entry]
[...]
Name=Customized Session
the following keys are supported for configuring ConsoleKit sessions:
Session Entry/Nameβ unique name of the session.Session Entry/Typeβ type of the sessionSession Entry/Descriptionβ description of the session.Session Entry/DisplayTemplateβ this specifies the display type to be used with the session. it corresponds to the file/etc/ConsoleKit/displays.d/display_template.display, where display_template is the value of this key.Local/variable β the ConsoleKit display configuration file associated with the"Entry/DisplayTemplate"key specifies the command to run to launch the display. that command is defined in the ConsoleKit display configuration file under the key"X11/Exec". this command can include variables that begin with the"$"character, such as"$display". the values to be used for those variables can be defined in this section. so if the session configuration file contains the value"Local/display=:0", this will cause the variable used when launching the command to be replaced with the value"0". cute, right? variable substitution but make it β¨fashionβ¨.
π ConsoleKit System Restart and Stop π
console-kit-daemon provides D-Bus interfaces that will restart or stop the system. when console-kit-daemon receives a D-Bus request to restart the system, it will run the /usr/lib/ConsoleKit/scripts/ck-system-restart script β but only if the user has privilege to do this operation. when console-kit-daemon receives a D-Bus request to stop the system, it will run the /usr/lib/ConsoleKit/scripts/ck-system-stop script β again, only if the user has privilege to do this operation.
bestie this is the part where you check your privileges before you poke the system. permissions are not a suggestion. π
β EXAMPLES β
Example 1: To start the ConsoleKit daemon
example% console-kit-daemon
Example 2: To configure ConsoleKit to start multiple sessions on a single seat
to start two local displays β DISPLAY ":0" on vt7 and DISPLAY ":1" on "vt8" β edit the 00-primary.seat file as follows:
[Seat Entry]
Version=1.0
Name=Primary seat
Description=start static displays :0 on vt7 and :1 on vt8
Hidden=false
Devices=
Sessions=Local;Local2;
then, in addition to the original /etc/ConsoleKit/sessions.d/Local.session file, add the following /etc/ConsoleKit/sessions.d/Local2.session file:
[Session Entry]
Name=Local
Type=LoginWindow
Description=Local Login Screen
DisplayTemplate=Local
[Local]
display=:1
vt=/dev/vt/8
π SEE ALSO π
more information can be found at:
https://github.com/ConsoleKit2/ConsoleKit2
ck-history(1), ck-launch-session(1), ck-list-sessions(1), svcadm(1m), environ(5), smf(5), console(4)
π NOTES π
Brian Cameron, Sun Microsystems Inc., 2009. Copyright (c) 2009 by Sun Microsystems, Inc.
some of the documentation in this manpage is from the ConsoleKit documentation written by William Jon McCann.
and that's the whole page, bestie π«Ά this was the console-kit-daemon maintenance-commands manual, straight outta SunOS 5.11, dated 24 Oct 2009 β yes it's a whole throwback era, but it still ate. periodt. πβ¨π
π¦ where this page comes from
- debian trixie: consolekit 1.2.6-4+b1 Β· GPL-2.0-or-later
- ubuntu questing: consolekit 1.2.6-4
- ubuntu resolute: consolekit 1.2.6-5 Β· GPL-2.0-or-later
- ubuntu stonking: consolekit 1.2.6-5 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms