]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - man/org.freedesktop.login1.xml
Merge pull request #28919 from fbuihuu/custom-config-file-install-path
[thirdparty/systemd.git] / man / org.freedesktop.login1.xml
index 4cc9f2789193b0827b1f2b9f22c3c2a7b10e80c7..4a94656f6625d921c3090b253755684fb4cce60c 100644 (file)
@@ -156,6 +156,8 @@ node /org/freedesktop/login1 {
       SeatRemoved(s seat_id,
                   o object_path);
       PrepareForShutdown(b start);
+      PrepareForShutdownWithMetadata(b start,
+                                     a{sv} metadata);
       PrepareForSleep(b start);
     properties:
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
@@ -245,6 +247,8 @@ node /org/freedesktop/login1 {
       readonly t SessionsMax = ...;
       @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
       readonly t NCurrentSessions = ...;
+      @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
+      readonly t StopIdleSessionUSec = ...;
   };
   interface org.freedesktop.DBus.Peer { ... };
   interface org.freedesktop.DBus.Introspectable { ... };
@@ -262,6 +266,8 @@ node /org/freedesktop/login1 {
 
     <!--property HandleHibernateKeyLongPress is not documented!-->
 
+    <!--property StopIdleSessionUSec is not documented!-->
+
     <!--Autogenerated cross-references for systemd.directives, do not edit-->
 
     <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Manager"/>
@@ -398,6 +404,8 @@ node /org/freedesktop/login1 {
 
     <variablelist class="dbus-signal" generated="True" extra-ref="PrepareForShutdown"/>
 
+    <variablelist class="dbus-signal" generated="True" extra-ref="PrepareForShutdownWithMetadata"/>
+
     <variablelist class="dbus-signal" generated="True" extra-ref="PrepareForSleep"/>
 
     <variablelist class="dbus-property" generated="True" extra-ref="EnableWallMessages"/>
@@ -490,6 +498,8 @@ node /org/freedesktop/login1 {
 
     <variablelist class="dbus-property" generated="True" extra-ref="NCurrentSessions"/>
 
+    <variablelist class="dbus-property" generated="True" extra-ref="StopIdleSessionUSec"/>
+
     <!--End of Autogenerated section-->
 
     <refsect2>
@@ -570,16 +580,15 @@ node /org/freedesktop/login1 {
 
       <para><function>PowerOff()</function>, <function>Reboot()</function>, <function>Halt()</function>,
       <function>Suspend()</function>, and <function>Hibernate()</function> result in the system being powered
-      off, rebooted, halted (shut down without turning off power), suspended (the system state is
-      saved to RAM and the CPU is turned off), or hibernated (the system state is saved to disk and
-      the machine is powered down). <function>HybridSleep()</function> results in the system entering a
-      hybrid-sleep mode, i.e. the system is both hibernated and suspended.
-      <function>SuspendThenHibernate()</function> results in the system being suspended, then later woken
-      using an RTC timer and hibernated. The only argument is the polkit interactivity boolean
-      <varname>interactive</varname> (see below). The main purpose of these calls is that they enforce
-      polkit policy and hence allow powering off/rebooting/suspending/hibernating even by unprivileged
-      users. They also enforce inhibition locks for non-privileged users. UIs should expose these calls
-      as the primary mechanism to poweroff/reboot/suspend/hibernate the machine. Methods
+      off, rebooted, halted (shut down without turning off power), suspended (the system state is saved to
+      RAM and the CPU is turned off), or hibernated (the system state is saved to disk and the machine is
+      powered down). <function>HybridSleep()</function> results in the system entering a hybrid-sleep mode,
+      i.e. the system is both hibernated and suspended.  <function>SuspendThenHibernate()</function> results
+      in the system being suspended, then later woken using an RTC timer and hibernated. The only argument is
+      the polkit interactivity boolean <varname>interactive</varname> (see below). The main purpose of these
+      calls is that they enforce polkit policy and hence allow powering off/rebooting/suspending/hibernating
+      even by unprivileged users. They also enforce inhibition locks for non-privileged users. UIs should
+      expose these calls as the primary mechanism to poweroff/reboot/suspend/hibernate the machine. Methods
       <function>PowerOffWithFlags()</function>, <function>RebootWithFlags()</function>,
       <function>HaltWithFlags()</function>, <function>SuspendWithFlags()</function>,
       <function>HibernateWithFlags()</function>, <function>HybridSleepWithFlags()</function> and
@@ -588,12 +597,14 @@ node /org/freedesktop/login1 {
       <programlisting>
 #define SD_LOGIND_ROOT_CHECK_INHIBITORS  (UINT64_C(1) &lt;&lt; 0)
 #define SD_LOGIND_KEXEC_REBOOT           (UINT64_C(1) &lt;&lt; 1)
+#define SD_LOGIND_SOFT_REBOOT            (UINT64_C(1) &lt;&lt; 2)
       </programlisting>
-      <para> When the <varname>flags</varname> is 0 then these methods behave just like the versions
-      without flags. When <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is set, active
-      inhibitors are honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant>
-      (0x02) is set, then <function>RebootWithFlags()</function> perform kexec reboot if kexec
-      kernel is loaded.</para>
+      <para>When the <varname>flags</varname> is 0 then these methods behave just like the versions without
+      flags. When <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is set, active inhibitors are
+      honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant> (0x02) is set, then
+      <function>RebootWithFlags()</function> performs a kexec reboot if kexec kernel is loaded. When
+      <constant>SD_LOGIND_SOFT_REBOOT</constant> (0x04) is set, then <function>RebootWithFlags()</function>
+      performs a userspace reboot only.</para>
 
       <para><function>SetRebootParameter()</function> sets a parameter for a subsequent reboot operation.
       See the description of <command>reboot</command> in
@@ -667,15 +678,20 @@ node /org/freedesktop/login1 {
       logs in or out, or a seat is added or removed. They each contain the ID of the object plus the object
       path.</para>
 
-      <para>The <function>PrepareForShutdown()</function> and <function>PrepareForSleep()</function> signals
-      are sent right before (with the argument <literal>true</literal>) or after (with the argument
+      <para>The <function>PrepareForShutdown</function>,
+      <function>PrepareForShutdownWithMetadata</function>, and <function>PrepareForSleep</function>
+      signals are sent right before (with the argument <literal>true</literal>) or after (with the argument
       <literal>false</literal>) the system goes down for reboot/poweroff and suspend/hibernate,
       respectively. This may be used by applications to save data on disk, release memory, or do other jobs
       that should be done shortly before shutdown/sleep, in conjunction with delay inhibitor locks. After
       completion of this work they should release their inhibition locks in order to not delay the operation
       any further. For more information see
-      <ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
-      </para>
+      <ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>. The
+      <function>PrepareForShutdownWithMetadata()</function> signal additionally sends a list of key/value
+      pair metadata fields. Currently it sends a <varname>type</varname> string which defines the type of
+      shutdown. The type can be one of <literal>power-off</literal>, <literal>reboot</literal>,
+      <literal>halt</literal>, <literal>kexec</literal> or <literal>soft-reboot</literal>. This signal is
+      sent first, followed by <function>PrepareForShutdown</function> (for backward compatibility).</para>
     </refsect2>
 
     <refsect2>
@@ -873,8 +889,9 @@ node /org/freedesktop/login1/seat/seat0 {
     <refsect2>
       <title>Methods</title>
 
-      <para><function>Terminate()</function> and <function>ActivateSession()</function> work similar to
-      TerminateSeat(), ActivationSessionOnSeat() on the Manager object.</para>
+      <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
@@ -907,8 +924,8 @@ node /org/freedesktop/login1/seat/seat0 {
       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, similar to the ones exposed
-      on the <interfacename>Manager</interfacename> object, but specific for this seat.</para>
+      <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>
 
@@ -1000,7 +1017,7 @@ node /org/freedesktop/login1/user/_1000 {
     <refsect2>
       <title>Methods</title>
 
-      <para><function>Terminate()</function> and <function>Kill()</function> work similar to the
+      <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>
@@ -1050,8 +1067,8 @@ node /org/freedesktop/login1/user/_1000 {
       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, similar to
-      the <interfacename>Manager</interfacename>'s properties, but specific for this user.</para>
+      <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>
@@ -1076,6 +1093,7 @@ node /org/freedesktop/login1/session/1 {
       ReleaseControl();
       SetType(in  s type);
       SetDisplay(in  s display);
+      SetTTY(in  h tty_fd);
       TakeDevice(in  u major,
                  in  u minor,
                  out h fd,
@@ -1175,6 +1193,8 @@ node /org/freedesktop/login1/session/1 {
 
     <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()"/>
@@ -1276,6 +1296,11 @@ node /org/freedesktop/login1/session/1 {
       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
@@ -1480,4 +1505,23 @@ node /org/freedesktop/login1/session/1 {
   </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> was added in version 255.</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>
+    </refsect2>
+  </refsect1>
 </refentry>