HALF ECHO LEARN / REFERENCE COLLECTION
v262.2man/org.freedesktop.login1.xml
Git blob: 9362f7d8732f1fc787b8e7e79a36ee844e5919e3
Lines 1001–1708 of 1,708
<refsect2>
<title>Methods</title>
<para><function>Terminate()</function> and <function>ActivateSession()</function> work similarly to
<function>TerminateSeat()</function> and <function>ActivationSessionOnSeat()</function> on the Manager
object.</para>
<para><function>SwitchTo()</function> switches to the session on the virtual terminal
<varname>vtnr</varname>. <function>SwitchToNext()</function> and
<function>SwitchToPrevious()</function> switch to, respectively, the next and previous sessions on the
seat in the order of virtual terminals. If there is no active session, they switch to, respectively,
the first and last session on the seat.</para>
</refsect2>
<refsect2>
<title>Signals</title>
<para>Whenever <function>ActiveSession</function>, <function>Sessions</function>,
<function>CanGraphical</function>, <function>CanTTY</function>,
or the idle state changes, <function>PropertyChanged</function> signals are sent out to clients which
have subscribed.</para>
<para>Signals are only emitted on objects referencing a specific seat ID, not on the
<literal>/org/freedesktop/login1/seat/self</literal> or
<literal>/org/freedesktop/login1/seat/auto</literal> convenience objects, as they can only be
dereferenced relative to a method caller.</para>
</refsect2>
<refsect2>
<title>Properties</title>
<para>The <varname>Id</varname> property encodes the ID of the seat.</para>
<para><varname>ActiveSession</varname> encodes the currently active session if there is one. It is a
structure consisting of the session id and the object path.</para>
<para><varname>CanTTY</varname> encodes whether the session is suitable for text logins, and
<varname>CanGraphical</varname> whether it is suitable for graphical sessions.</para>
<para>The <varname>Sessions</varname> property is an array of all current sessions of this seat, each
encoded in a structure consisting of the ID and the object path.</para>
<para>The <varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
<varname>IdleSinceHintMonotonic</varname> properties encode the idle state, similarly to the ones
exposed on the <interfacename>Manager</interfacename> object, but specific for this seat.</para>
</refsect2>
</refsect1>
<refsect1>
<title>User Objects</title>
<programlisting executable="systemd-logind" node="/org/freedesktop/login1/user/_1000" interface="org.freedesktop.login1.User">
node /org/freedesktop/login1/user/_1000 {
interface org.freedesktop.login1.User {
methods:
Terminate();
Kill(in i signal_number);
properties:
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly u UID = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly u GID = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Name = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t Timestamp = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t TimestampMonotonic = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s RuntimePath = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Service = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Slice = '...';
readonly (so) Display = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly s State = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("false")
readonly a(so) Sessions = [...];
readonly b IdleHint = ...;
readonly t IdleSinceHint = ...;
readonly t IdleSinceHintMonotonic = ...;
readonly b Linger = ...;
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.User"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.User"/>
<variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Kill()"/>
<variablelist class="dbus-property" generated="True" extra-ref="UID"/>
<variablelist class="dbus-property" generated="True" extra-ref="GID"/>
<variablelist class="dbus-property" generated="True" extra-ref="Name"/>
<variablelist class="dbus-property" generated="True" extra-ref="Timestamp"/>
<variablelist class="dbus-property" generated="True" extra-ref="TimestampMonotonic"/>
<variablelist class="dbus-property" generated="True" extra-ref="RuntimePath"/>
<variablelist class="dbus-property" generated="True" extra-ref="Service"/>
<variablelist class="dbus-property" generated="True" extra-ref="Slice"/>
<variablelist class="dbus-property" generated="True" extra-ref="Display"/>
<variablelist class="dbus-property" generated="True" extra-ref="State"/>
<variablelist class="dbus-property" generated="True" extra-ref="Sessions"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
<variablelist class="dbus-property" generated="True" extra-ref="Linger"/>
<!--End of Autogenerated section-->
<refsect2>
<title>Methods</title>
<para><function>Terminate()</function> and <function>Kill()</function> work similarly to the
<function>TerminateUser()</function> and <function>KillUser()</function> methods on the manager
object.</para>
</refsect2>
<refsect2>
<title>Signals</title>
<para>Whenever <varname>Sessions</varname> or the idle state changes,
<function>PropertyChanged</function> signals are sent out to clients which have subscribed.</para>
<para>Signals are only emitted on objects referencing a specific UID, not on the
<literal>/org/freedesktop/login1/user/self</literal> convenience object, as <varname>self</varname>
can only be dereferenced relative to a method caller.</para>
</refsect2>
<refsect2>
<title>Properties</title>
<para>The <varname>UID</varname> and <varname>GID</varname> properties encode the Unix UID and primary
GID of the user.</para>
<para>The <varname>Name</varname> property encodes the user name.</para>
<para><varname>Timestamp</varname> and <varname>TimestampMonotonic</varname> encode the login time of
the user in microseconds since the epoch, in the <constant>CLOCK_REALTIME</constant> and
<constant>CLOCK_MONOTONIC</constant> clocks, respectively.</para>
<para><varname>RuntimePath</varname> encodes the runtime path of the user,
i.e. <varname>$XDG_RUNTIME_DIR</varname>. For details see the
<ulink url="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">
XDG Basedir Specification
</ulink>.</para>
<para><varname>Service</varname> contains the unit name of the user systemd service of this
user. Each logged in user is assigned a user service that runs a user systemd instance. This is
usually an instance of <filename>user@.service</filename>.</para>
<para><varname>Slice</varname> contains the unit name of the user systemd slice of this user. Each
logged in user gets a private slice.</para>
<para><varname>Display</varname> encodes which graphical session should be used as the primary UI display
for the user. It is a structure encoding the session ID and the object path of the session to use.</para>
<para><varname>State</varname> encodes the user state and is one of <literal>offline</literal>,
<literal>lingering</literal>, <literal>online</literal>, <literal>active</literal>, or
<literal>closing</literal>. See
<citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for more information about the states.</para>
<para><varname>Sessions</varname> is an array of structures encoding all current sessions of the
user. Each structure consists of the ID and object path.</para>
<para>The <varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
<varname>IdleSinceHintMonotonic</varname> properties encode the idle hint state of the user, similarly
to the <interfacename>Manager</interfacename>'s properties, but specific for this user.</para>
<para>The <varname>Linger</varname> property shows whether lingering is enabled for this user.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Session Objects</title>
<programlisting executable="systemd-logind" node="/org/freedesktop/login1/session/1" interface="org.freedesktop.login1.Session">
node /org/freedesktop/login1/session/1 {
interface org.freedesktop.login1.Session {
methods:
Terminate();
Activate();
Lock();
Unlock();
SetIdleHint(in b idle);
SetLockedHint(in b locked);
Kill(in s whom,
in i signal_number);
TakeControl(in b force);
ReleaseControl();
SetType(in s type);
SetClass(in s class);
SetDisplay(in s display);
SetTTY(in h tty_fd);
TakeDevice(in u major,
in u minor,
out h fd,
out b inactive);
ReleaseDevice(in u major,
in u minor);
PauseDeviceComplete(in u major,
in u minor);
SetBrightness(in s subsystem,
in s name,
in u brightness);
signals:
PauseDevice(u major,
u minor,
s type);
ResumeDevice(u major,
u minor,
h fd);
Lock();
Unlock();
properties:
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Id = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly (uo) User = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Name = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t Timestamp = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t TimestampMonotonic = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly u VTNr = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly (so) Seat = ...;
readonly s TTY = '...';
readonly s Display = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b Remote = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s RemoteHost = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s RemoteUser = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly as ExtraDeviceAccess = ['...', ...];
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Service = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Desktop = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly s Scope = '...';
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly u Leader = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly t LeaderPIDFDId = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly u Audit = ...;
readonly s Type = '...';
readonly s Class = '...';
readonly b Active = ...;
readonly s State = '...';
readonly b IdleHint = ...;
readonly t IdleSinceHint = ...;
readonly t IdleSinceHintMonotonic = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b CanIdle = ...;
@org.freedesktop.DBus.Property.EmitsChangedSignal("const")
readonly b CanLock = ...;
readonly b LockedHint = ...;
};
interface org.freedesktop.DBus.Peer { ... };
interface org.freedesktop.DBus.Introspectable { ... };
interface org.freedesktop.DBus.Properties { ... };
};
</programlisting>
<!--Autogenerated cross-references for systemd.directives, do not edit-->
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Session"/>
<variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Session"/>
<variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Activate()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Lock()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Unlock()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetIdleHint()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetLockedHint()"/>
<variablelist class="dbus-method" generated="True" extra-ref="Kill()"/>
<variablelist class="dbus-method" generated="True" extra-ref="TakeControl()"/>
<variablelist class="dbus-method" generated="True" extra-ref="ReleaseControl()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetType()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetClass()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetDisplay()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetTTY()"/>
<variablelist class="dbus-method" generated="True" extra-ref="TakeDevice()"/>
<variablelist class="dbus-method" generated="True" extra-ref="ReleaseDevice()"/>
<variablelist class="dbus-method" generated="True" extra-ref="PauseDeviceComplete()"/>
<variablelist class="dbus-method" generated="True" extra-ref="SetBrightness()"/>
<variablelist class="dbus-signal" generated="True" extra-ref="PauseDevice()"/>
<variablelist class="dbus-signal" generated="True" extra-ref="ResumeDevice()"/>
<variablelist class="dbus-signal" generated="True" extra-ref="Lock()"/>
<variablelist class="dbus-signal" generated="True" extra-ref="Unlock()"/>
<variablelist class="dbus-property" generated="True" extra-ref="Id"/>
<variablelist class="dbus-property" generated="True" extra-ref="User"/>
<variablelist class="dbus-property" generated="True" extra-ref="Name"/>
<variablelist class="dbus-property" generated="True" extra-ref="Timestamp"/>
<variablelist class="dbus-property" generated="True" extra-ref="TimestampMonotonic"/>
<variablelist class="dbus-property" generated="True" extra-ref="VTNr"/>
<variablelist class="dbus-property" generated="True" extra-ref="Seat"/>
<variablelist class="dbus-property" generated="True" extra-ref="TTY"/>
<variablelist class="dbus-property" generated="True" extra-ref="Display"/>
<variablelist class="dbus-property" generated="True" extra-ref="Remote"/>
<variablelist class="dbus-property" generated="True" extra-ref="RemoteHost"/>
<variablelist class="dbus-property" generated="True" extra-ref="RemoteUser"/>
<variablelist class="dbus-property" generated="True" extra-ref="ExtraDeviceAccess"/>
<variablelist class="dbus-property" generated="True" extra-ref="Service"/>
<variablelist class="dbus-property" generated="True" extra-ref="Desktop"/>
<variablelist class="dbus-property" generated="True" extra-ref="Scope"/>
<variablelist class="dbus-property" generated="True" extra-ref="Leader"/>
<variablelist class="dbus-property" generated="True" extra-ref="LeaderPIDFDId"/>
<variablelist class="dbus-property" generated="True" extra-ref="Audit"/>
<variablelist class="dbus-property" generated="True" extra-ref="Type"/>
<variablelist class="dbus-property" generated="True" extra-ref="Class"/>
<variablelist class="dbus-property" generated="True" extra-ref="Active"/>
<variablelist class="dbus-property" generated="True" extra-ref="State"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
<variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
<variablelist class="dbus-property" generated="True" extra-ref="CanIdle"/>
<variablelist class="dbus-property" generated="True" extra-ref="CanLock"/>
<variablelist class="dbus-property" generated="True" extra-ref="LockedHint"/>
<!--End of Autogenerated section-->
<refsect2>
<title>Methods</title>
<para><function>Terminate()</function>, <function>Activate()</function>, <function>Lock()</function>,
<function>Unlock()</function>, and <function>Kill()</function> work similarly to the respective calls on
the <interfacename>Manager</interfacename> object.</para>
<para><function>SetIdleHint()</function> is called by the session object to update the idle state
of the session whenever it changes.</para>
<para><function>TakeControl()</function> allows a process to take exclusive managed device
access-control for that session. Only one D-Bus connection can be a controller for a given session at any
time. If the <varname>force</varname> argument is set (root only), an existing controller is kicked
out and replaced. Otherwise, this method fails if there is already a controller. Note that this method is
limited to D-Bus users with the effective UID set to the user of the session or root.</para>
<para><function>ReleaseControl()</function> drops control of a given session. Closing the D-Bus
connection implicitly releases control as well. See <function>TakeControl()</function> for more
information. This method also releases all devices for which the controller requested ownership via
<function>TakeDevice()</function>.</para>
<para><function>SetType()</function> allows the type of the session to be changed dynamically. It can
only be called by session's current controller. If <function>TakeControl()</function> has not been
called, this method will fail. In addition, the session type will be reset to its original value once
control is released, either by calling <function>ReleaseControl()</function> or closing the D-Bus
connection. This should help prevent a session from entering an inconsistent state, for example if the
controller crashes. The only argument <varname>type</varname> is the new session type.</para>
<para><function>SetClass()</function> allows the caller to change the class of the session dynamically.
It may only be called by session's owning user. Currently, this call may be exclusively used to change
the class from <literal>user-incomplete</literal> to <literal>user</literal>. The call is synchronous,
and will return only once the user's service manager has successfully been started, if necessary. The
only argument <varname>type</varname> is the new session type.</para>
<para><function>SetDisplay()</function> allows the display name of the graphical session to be changed. This is
useful if the display server is started as part of the session. It can only be called by session's current
controller. If <function>TakeControl()</function> has not been called, this method will fail. The only argument
<varname>display</varname> is the new display name.</para>
<para><function>SetTTY()</function> allows the device name of the session to be changed. This is
useful if the tty device is only known after authentication. It can only be called by session's
current controller. If <function>TakeControl()</function> has not been called, this method will fail.
The only argument <varname>tty_fd</varname> is a file handle to the new tty device.</para>
<para><function>TakeDevice()</function> allows a session controller to get a file descriptor for a
specific device. Pass in the major and minor numbers of the character device and
<filename>systemd-logind</filename> will return a file descriptor for the device. Only a limited set of
device-types is currently supported (but may be extended). <filename>systemd-logind</filename>
automatically mutes the file descriptor if the session is inactive and resumes it once the session is
activated again. This guarantees that a session can only access session devices if the session is
active. Note that this revoke/resume mechanism is asynchronous and may happen at any given time. This
only works on devices that are attached to the seat of the given session. A process is not required to
have direct access to the device node. <filename>systemd-logind</filename> only requires you to be the
active session controller (see <function>TakeControl()</function>). Also note that any device can only
be requested once. As long as you do not release it, further <function>TakeDevice()</function> calls
will fail.</para>
<para><function>ReleaseDevice()</function> releases a device again (see
<function>TakeDevice()</function>). This is also implicitly done by
<function>ReleaseControl()</function> or when closing the D-Bus connection.</para>
<para><function>PauseDeviceComplete()</function> allows a session controller to synchronously pause a
device after receiving a <function>PauseDevice(<literal>pause</literal>)</function> signal. Forced
signals (or after an internal timeout) are automatically completed by
<filename>systemd-logind</filename> asynchronously.</para>
<para><function>SetLockedHint()</function> may be used to set the "locked hint" to
<varname>locked</varname>, i.e. information whether the session is locked. This is intended to be used
by the desktop environment to tell <command>systemd-logind</command> when the session is locked and
unlocked.</para>
<para><function>SetBrightness()</function> may be used to set the display brightness. This is intended
to be used by the desktop environment and allows unprivileged programs to access hardware settings in
a controlled way. The <varname>subsystem</varname> parameter specifies a kernel subsystem, either
<literal>backlight</literal> or <literal>leds</literal>. The <varname>name</varname> parameter
specifies a device name under the specified subsystem. The <varname>brightness</varname> parameter
specifies the brightness. The range is defined by individual drivers, see
<filename>/sys/class/<varname>subsystem</varname>/<varname>name</varname>/max_brightness</filename>.
</para>
</refsect2>
<refsect2>
<title>Signals</title>
<para>The active session controller exclusively gets <function>PauseDevice()</function> and
<function>ResumeDevice()</function> events for any device it requested via
<function>TakeDevice()</function>. They notify the controller whenever a device is paused or resumed. A
device is never resumed if its session is inactive. Also note that <function>PauseDevice()</function>
signals are sent before the <function>PropertyChanged</function> signal for the
<function>Active</function> state. The inverse is true for <function>ResumeDevice()</function>. A device
may remain paused for unknown reasons even though the <interfacename>Session</interfacename> is active.
</para>
<para>A <function>PauseDevice()</function> signal carries the major and minor numbers and a string describing the
type as arguments. <function>force</function> means the device was already paused by
<filename>systemd-logind</filename> and the signal is only an asynchronous
notification. <function>pause</function> means <filename>systemd-logind</filename> grants you a limited amount of time to pause the device. You must respond to this via
<function>PauseDeviceComplete()</function>. This synchronous pausing mechanism is used for
backwards-compatibility to VTs and <filename>systemd-logind</filename> is free to not make use of
it. It is also free to send a forced <function>PauseDevice()</function> if you do not respond in a timely
manner (or for any other reason). <function>gone</function> means the device was unplugged from the
system and you will no longer get any notifications about it. There is no need to call
<function>ReleaseDevice()</function>. You may call <function>TakeDevice()</function> again if a new
device is assigned the major+minor combination.</para>
<para><function>ResumeDevice()</function> is sent whenever a session is active and a device is
resumed. It carries the major/minor numbers as arguments and provides a new open file descriptor. You should
switch to the new descriptor and close the old one. They are not guaranteed to have the same underlying
open file descriptor in the kernel (except for a limited set of device types).</para>
<para>Whenever <function>Active</function> or the idle state changes,
<function>PropertyChanged</function> signals are sent out to clients which have subscribed.</para>
<para><function>Lock()</function>/<function>Unlock()</function> is sent when the session is asked to be
screen-locked/unlocked. A session manager of the session should listen to this signal and act
accordingly. This signal is sent out as a result of the <function>Lock()</function> and
<function>Unlock()</function> methods, respectively.</para>
<para>Signals are only emitted on objects referencing a specific session ID, not on the
<literal>/org/freedesktop/login1/session/self</literal> or
<literal>/org/freedesktop/login1/session/auto</literal> convenience objects, as they can only be
dereferenced relative to a method caller.</para>
</refsect2>
<refsect2>
<title>Properties</title>
<para><varname>Id</varname> encodes the session ID.</para>
<para><varname>User</varname> encodes the user ID of the user this session belongs to. This is a
structure consisting of the Unix UID and the object path.</para>
<para><varname>Name</varname> encodes the user name.</para>
<para><varname>Timestamp</varname> and <varname>TimestampMonotonic</varname> encode the microseconds
since the epoch when the session was created, in <constant>CLOCK_REALTIME</constant> or
<constant>CLOCK_MONOTONIC</constant>, respectively.</para>
<para><varname>VTNr</varname> encodes the virtual terminal number of the session if there is any, 0
otherwise.</para>
<para><varname>Seat</varname> encodes the seat this session belongs to if there is any. This is a
structure consisting of the ID and the seat object path.</para>
<para><varname>TTY</varname> encodes the kernel TTY path of the session if this is a text login. If not
this is an empty string.</para>
<para><varname>Display</varname> encodes the X11 display name if this is a graphical login. If not,
this is an empty string.</para>
<para><varname>Remote</varname> encodes whether the session is local or remote.</para>
<para><varname>RemoteHost</varname> and <varname>RemoteUser</varname> encode the remote host and user
if this is a remote session, or an empty string otherwise.</para>
<para><varname>ExtraDeviceAccess</varname> encodes the set of additional hardware devices that the session
is granted access to. For every <literal><replaceable>ID</replaceable></literal> in the list, the session
is granted access to all devices tagged with <literal>xaccess-<replaceable>ID</replaceable></literal> in udev.</para>
<para><varname>Service</varname> encodes the PAM service name that registered the session.</para>
<para><varname>Desktop</varname> describes the desktop environment running in the session (if
known).</para>
<para><varname>Scope</varname> contains the systemd scope unit name of this session.</para>
<para><varname>Leader</varname> encodes the PID of the process that registered the session.</para>
<para><varname>LeaderPIDFDId</varname> encodes the Linux pidfd inode ID of the process that registered
the session.</para>
<para><varname>Audit</varname> encodes the Kernel Audit session ID of the session if auditing is
available.</para>
<para><varname>Type</varname> encodes the session type. It's one of <literal>unspecified</literal> (for
cron PAM sessions and suchlike), <literal>tty</literal> (for text logins), <literal>web</literal> (for
web-based logins), or <literal>x11</literal>/<literal>mir</literal>/<literal>wayland</literal> (for
graphical logins).</para>
<para><varname>Class</varname> encodes the session class. It's one of <literal>user</literal> (for
normal user sessions), <literal>greeter</literal> (for display manager pseudo-sessions), or
<literal>lock-screen</literal> (for display lock screens).</para>
<para><varname>Active</varname> is a boolean that is true if the session is active, i.e. currently in the
foreground. This field is semi-redundant due to <varname>State</varname>.</para>
<para><varname>State</varname> encodes the session state and one of <literal>online</literal>,
<literal>active</literal>, or <literal>closing</literal>. See
<citerefentry><refentrytitle>sd_session_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>
for more information about the states.</para>
<para><varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
<varname>IdleSinceHintMonotonic</varname> encapsulate the idle hint state of this session, similarly to
how the respective properties on the manager object do it for the whole system.</para>
<para><varname>LockedHint</varname> shows the locked hint state of this session, as set by the
<function>SetLockedHint()</function> method described above.</para>
<para><varname>CanIdle</varname> indicates whether the session supports the idle hint
concept. Similarly, <varname>CanLock</varname> indicates whether the session supports the screen lock
concept.</para>
</refsect2>
</refsect1>
<refsect1>
<title>Examples</title>
<example>
<title>Introspect the logind manager on the bus</title>
<programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
--object-path /org/freedesktop/login1
</programlisting>
<para>or</para>
<programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1
</programlisting>
</example>
<example>
<title>Introspect the default seat on the bus</title>
<programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
--object-path /org/freedesktop/login1/seat/seat0
</programlisting>
<para>or</para>
<programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/seat/seat0
</programlisting>
<para>Seat <literal>seat0</literal> is the default seat, so it'll be present unless local configuration
is made to reassign all devices to a different seat. The list of seats and users can be acquired with
<command>loginctl list-sessions</command>.</para>
</example>
<example>
<title>Introspect a single user on the bus</title>
<programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
--object-path /org/freedesktop/login1/user/_1000
</programlisting>
<para>or</para>
<programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/user/_1000
</programlisting>
</example>
<example>
<title>Introspect <interfacename>org.freedesktop.login1.Session</interfacename> on the bus</title>
<programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
--object-path /org/freedesktop/login1/session/45
</programlisting>
<para>or</para>
<programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/session/45
</programlisting>
</example>
</refsect1>
<xi:include href="org.freedesktop.locale1.xml" xpointer="versioning"/>
<refsect1>
<title>History</title>
<refsect2>
<title>The Manager Object</title>
<para><varname>HandlePowerKeyLongPress</varname>,
<varname>HandleRebootKey</varname>,
<varname>HandleRebootKeyLongPress</varname>,
<varname>HandleSuspendKeyLongPress</varname>, and
<varname>HandleHibernateKeyLongPress</varname> were added in version 251.</para>
<para><varname>StopIdleSessionUSec</varname> was added in version 252.</para>
<para><function>PrepareForShutdownWithMetadata()</function> and
<function>CreateSessionWithPIDFD()</function> were added in version 255.</para>
<para><function>Sleep()</function>,
<function>CanSleep()</function>,
<varname>SleepOperation</varname>, and
<function>ListSessionsEx()</function> were added in version 256.</para>
<para><varname>HandleSecureAttentionKey</varname>, <function>SecureAttentionKey()</function>,
<varname>PreparingForShutdownWithMetadata</varname>, <varname>DesignatedMaintenanceTime</varname>,
<varname>CanIdle</varname>, <varname>CanLock</varname>,
and <varname>BlockWeakInhibited</varname> were added in version 257.</para>
</refsect2>
<refsect2>
<title>Session Objects</title>
<para><function>SetDisplay()</function> was added in version 252.</para>
<para><function>SetTTY()</function> was added in version 254.</para>
<para><function>SetClass()</function> was added in version 256.</para>
<para><varname>LeaderPIDFDId</varname> was added in version 258.</para>
<para><varname>ExtraDeviceAccess</varname> was added in version 260.</para>
</refsect2>
</refsect1>
<refsect1>
<title>See Also</title>
<para><simplelist type="inline">
<member><citerefentry><refentrytitle>systemd</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry></member>
<member><citerefentry><refentrytitle>loginctl</refentrytitle><manvolnum>1</manvolnum></citerefentry></member>
</simplelist></para>
</refsect1>
</refentry>