modular session management daemon
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234<?xml version="1.0" encoding="UTF-8"?><protocol name="session_core_v1" version="1"> <object name="session_core_manager" version="1"> <description summary="session observer"> Unprivileged read-only interface for observing active sessions. </description> <s2c name="sessions"> <description summary="all active session IDs"> Sent once when the manager is first created. May be an empty array. </description> <arg name="session_ids" type="array uint" summary="active session IDs"/> </s2c> <s2c name="session_added"> <description summary="a new session was created"> Broadcast to all connected clients when any session is created. </description> <arg name="session_id" type="uint" summary="new session identifier"/> </s2c> <s2c name="session_removed"> <description summary="a session was destroyed"> Broadcast to all connected clients when any session is destroyed. </description> <arg name="session_id" type="uint" summary="destroyed session identifier"/> </s2c> <s2c name="done"> <description summary="initial field dump complete"/> </s2c> <s2c name="error"> <description summary="last operation failed"/> <arg name="code" type="enum" interface="error_code" summary="error kind"/> <arg name="message" type="varchar" summary="human-readable error detail"/> </s2c> <c2s name="get_session"> <description summary="create a per-session info object"> Creates a `session_core_session` object for the given session_id. The daemon immediately pushes all fields, followed by done. If the session does not exist, destroyed is sent instead. </description> <arg name="session_id" type="uint" summary="session to query"/> <returns iface="session_core_session"/> </c2s> <c2s name="get_session_by_pid"> <description summary="create a per-session info object by leader PID"> Creates a session_core_session object for the session whose leader PID matches the given pid. The daemon immediately pushes all fields, followed by done. If no matching session exists, destroyed is sent instead. </description> <arg name="pid" type="uint" summary="leader PID of the session to query"/> <returns iface="session_core_session"/> </c2s> <c2s name="get_session_by_uid"> <description summary="create a per-session info object by user ID"> Creates a session_core_session object for the session whose user ID matches the given uid. The daemon immediately pushes all fields, followed by done. If no matching session exists, destroyed is sent instead. </description> <arg name="uid" type="uint" summary="user ID of the session to query"/> <returns iface="session_core_session"/> </c2s> <c2s name="get_user"> <description summary="create a per-user info object"> Creates a session_core_user object for the given uid. The daemon immediately pushes all fields, followed by done. If uid does not correspond to a known user, not_found is sent instead. </description> <arg name="uid" type="uint" summary="user ID to query"/> <returns iface="session_core_user"/> </c2s> <c2s name="reboot"> <description summary="reboot the system"/> </c2s> <c2s name="poweroff"> <description summary="power off the system"/> </c2s> <c2s name="suspend"> <description summary="suspend the system"/> </c2s> <c2s name="hibernate"> <description summary="hibernate the system"/> </c2s> <c2s name="destroy" destructor="true"> <description summary="destroy this object"/> </c2s> </object> <object name="session_core_session" version="1"> <description summary="per-session information"> Provides information about a single session. All fields are pushed immediately on creation and re-sent if they change. </description> <s2c name="session_id"> <arg name="session_id" type="uint" summary="session identifier"/> </s2c> <s2c name="uid"> <arg name="uid" type="uint" summary="user id"/> </s2c> <s2c name="username"> <arg name="username" type="varchar" summary="username"/> </s2c> <s2c name="vt"> <arg name="vt" type="uint" summary="virtual terminal number"/> </s2c> <s2c name="seat"> <arg name="seat" type="varchar" summary="seat name"/> </s2c> <s2c name="leader"> <arg name="leader" type="uint" summary="PID of the session-creating process"/> </s2c> <s2c name="timestamp"> <arg name="timestamp" type="uint" summary="session start time (seconds since Unix epoch)"/> </s2c> <s2c name="is_local"> <arg name="is_local" type="uint" summary="non-zero if the session originates from the local machine, zero if remote"/> </s2c> <s2c name="remote_host"> <arg name="remote_host" type="varchar" summary="remote host name, empty for local sessions"/> </s2c> <s2c name="active"> <description summary="session active state"/> <arg name="state" type="enum" interface="active_state" summary="session active state"/> </s2c> <s2c name="locked"> <description summary="session is locked"/> </s2c> <s2c name="unlocked"> <description summary="session is unlocked"/> </s2c> <s2c name="done"> <description summary="initial field dump complete"/> </s2c> <s2c name="destroyed"> <description summary="session has ended or did not exist"> Sent when the session is destroyed or if the `session_id` passed to `get_session` was not found. The client should release this object. </description> </s2c> <s2c name="ok"> <description summary="last operation completed successfully"/> </s2c> <s2c name="error"> <description summary="last operation failed"/> <arg name="code" type="enum" interface="error_code" summary="error kind"/> <arg name="message" type="varchar" summary="human-readable error detail"/> </s2c> <c2s name="lock"> <description summary="lock the session"/> </c2s> <c2s name="unlock"> <description summary="unlock the session"/> </c2s> <c2s name="terminate"> <description summary="send SIGTERM to all processes in the session"/> </c2s> <c2s name="kill"> <description summary="forcibly kill all processes in the session via cgroup.kill"/> </c2s> <c2s name="destroy" destructor="true"> <description summary="destroy this object"/> </c2s> </object>
<object name="session_core_user" version="1"> <description summary="per-user information"> Provides information about a single user, identified by uid. All fields are pushed immediately on creation, followed by done. </description> <s2c name="uid"> <arg name="uid" type="uint" summary="user id"/> </s2c> <s2c name="username"> <arg name="username" type="varchar" summary="username"/> </s2c> <s2c name="lingering"> <arg name="lingering" type="uint" summary="non-zero if the user has lingering enabled"/> </s2c> <s2c name="state"> <description summary="aggregate user state"> Reflects whether the user currently has sessions and whether any of them is in the foreground, combined with the lingering flag. Re-sent whenever it changes. </description> <arg name="state" type="enum" interface="user_state" summary="user state"/> </s2c> <s2c name="done"> <description summary="initial field dump complete"/> </s2c> <s2c name="not_found"> <description summary="no such user"> Sent when the uid passed to get_user does not correspond to a known user. The client should release this object. </description> </s2c> <s2c name="ok"> <description summary="last operation completed successfully"/> </s2c> <s2c name="error"> <description summary="last operation failed"/> <arg name="code" type="enum" interface="error_code" summary="error kind"/> <arg name="message" type="varchar" summary="human-readable error detail"/> </s2c> <c2s name="set_lingering"> <description summary="enable or disable lingering for this user"> Persists the lingering flag so it survives across sessions. Requires root, or that the caller's uid matches this user's uid. </description> <arg name="lingering" type="uint" summary="non-zero to enable, zero to disable"/> </c2s> <c2s name="destroy" destructor="true"> <description summary="destroy this object"/> </c2s> </object>
<enum name="user_state"> <value idx="0" name="offline" summary="no sessions and lingering disabled"/> <value idx="1" name="lingering" summary="no sessions but lingering enabled"/> <value idx="2" name="online" summary="has a session, none in the foreground"/> <value idx="3" name="active" summary="has a session in the foreground"/> <value idx="4" name="closing" summary="has sessions, all of them closing"/> </enum>
<enum name="active_state"> <value idx="0" name="online" summary="session is logged in but not in the foreground"/> <value idx="1" name="active" summary="session is in the foreground"/> <value idx="2" name="closing" summary="session is being destroyed"/> <value idx="3" name="opening" summary="session is being created"/> </enum>
<enum name="error_code"> <value idx="0" name="not_found" summary="session or cgroup not found"/> <value idx="1" name="permission_denied" summary="insufficient permissions to signal processes"/> <value idx="2" name="io" summary="generic I/O error"/> <value idx="3" name="active_sessions" summary="other sessions are active"/> </enum></protocol>