{"id":4614,"date":"2022-12-20T18:09:18","date_gmt":"2022-12-20T21:09:18","guid":{"rendered":"http:\/\/lode.uno\/linux-man\/index.php\/2022\/12\/20\/org-freedesktop-login1-man5\/"},"modified":"2022-12-20T18:09:18","modified_gmt":"2022-12-20T21:09:18","slug":"org-freedesktop-login1-man5","status":"publish","type":"post","link":"https:\/\/lode.uno\/linux-man\/2022\/12\/20\/org-freedesktop-login1-man5\/","title":{"rendered":"ORG.FREEDESKTOP.LOGIN1 (man5)"},"content":{"rendered":"<h1 align=\"center\">ORG.FREEDESKTOP.LOGIN1<\/h1>\n<p> <a href=\"#NAME\">NAME<\/a><br \/> <a href=\"#INTRODUCTION\">INTRODUCTION<\/a><br \/> <a href=\"#THE MANAGER OBJECT\">THE MANAGER OBJECT<\/a><br \/> <a href=\"#SEAT OBJECTS\">SEAT OBJECTS<\/a><br \/> <a href=\"#USER OBJECTS\">USER OBJECTS<\/a><br \/> <a href=\"#SESSION OBJECTS\">SESSION OBJECTS<\/a><br \/> <a href=\"#EXAMPLES\">EXAMPLES<\/a><br \/> <a href=\"#VERSIONING\">VERSIONING<\/a><br \/> <a href=\"#NOTES\">NOTES<\/a> <\/p>\n<hr>\n<h2>NAME <a name=\"NAME\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">org.freedesktop.login1 \u2212 The D\u2212Bus interface of systemd\u2212logind<\/p>\n<h2>INTRODUCTION <a name=\"INTRODUCTION\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>systemd-logind.service<\/b>(8) is a system service that keeps track of user logins and seats.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\">The daemon provides both a C library interface as well as a D\u2212Bus interface. The library interface may be used to introspect and watch the state of user logins and seats. The bus interface provides the same functionality but in addition may also be used to make changes to the system state. For more information please consult <b>sd-login<\/b>(3).<\/p>\n<h2>THE MANAGER OBJECT <a name=\"THE MANAGER OBJECT\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\">The service exposes the following interfaces on the Manager object on the bus:<\/p>\n<p style=\"margin-left:17%; margin-top: 1em\">node \/org\/freedesktop\/login1 { <br \/> interface org.freedesktop.login1.Manager { <br \/> methods: <br \/> GetSession(in s session_id, <br \/> out o object_path); <br \/> GetSessionByPID(in u pid, <br \/> out o object_path); <br \/> GetUser(in u uid, <br \/> out o object_path); <br \/> GetUserByPID(in u pid, <br \/> out o object_path); <br \/> GetSeat(in s seat_id, <br \/> out o object_path); <br \/> ListSessions(out a(susso) sessions); <br \/> ListUsers(out a(uso) users); <br \/> ListSeats(out a(so) seats); <br \/> ListInhibitors(out a(ssssuu) inhibitors); <br \/> CreateSession(in u uid, <br \/> in u pid, <br \/> in s service, <br \/> in s type, <br \/> in s class, <br \/> in s desktop, <br \/> in s seat_id, <br \/> in u vtnr, <br \/> in s tty, <br \/> in s display, <br \/> in b remote, <br \/> in s remote_user, <br \/> in s remote_host, <br \/> in a(sv) properties, <br \/> out s session_id, <br \/> out o object_path, <br \/> out s runtime_path, <br \/> out h fifo_fd, <br \/> out u uid, <br \/> out s seat_id, <br \/> out u vtnr, <br \/> out b existing); <br \/> ReleaseSession(in s session_id); <br \/> ActivateSession(in s session_id); <br \/> ActivateSessionOnSeat(in s session_id, <br \/> in s seat_id); <br \/> LockSession(in s session_id); <br \/> UnlockSession(in s session_id); <br \/> LockSessions(); <br \/> UnlockSessions(); <br \/> KillSession(in s session_id, <br \/> in s who, <br \/> in i signal_number); <br \/> KillUser(in u uid, <br \/> in i signal_number); <br \/> TerminateSession(in s session_id); <br \/> TerminateUser(in u uid); <br \/> TerminateSeat(in s seat_id); <br \/> SetUserLinger(in u uid, <br \/> in b enable, <br \/> in b interactive); <br \/> AttachDevice(in s seat_id, <br \/> in s sysfs_path, <br \/> in b interactive); <br \/> FlushDevices(in b interactive); <br \/> PowerOff(in b interactive); <br \/> Reboot(in b interactive); <br \/> Halt(in b interactive); <br \/> Suspend(in b interactive); <br \/> Hibernate(in b interactive); <br \/> HybridSleep(in b interactive); <br \/> SuspendThenHibernate(in b interactive); <br \/> CanPowerOff(out s result); <br \/> CanReboot(out s result); <br \/> CanHalt(out s result); <br \/> CanSuspend(out s result); <br \/> CanHibernate(out s result); <br \/> CanHybridSleep(out s result); <br \/> CanSuspendThenHibernate(out s result); <br \/> ScheduleShutdown(in s type, <br \/> in t usec); <br \/> CancelScheduledShutdown(out b cancelled); <br \/> Inhibit(in s what, <br \/> in s who, <br \/> in s why, <br \/> in s mode, <br \/> out h pipe_fd); <br \/> CanRebootParameter(out s result); <br \/> SetRebootParameter(in s parameter); <br \/> CanRebootToFirmwareSetup(out s result); <br \/> SetRebootToFirmwareSetup(in b enable); <br \/> CanRebootToBootLoaderMenu(out s result); <br \/> SetRebootToBootLoaderMenu(in t timeout); <br \/> CanRebootToBootLoaderEntry(out s result); <br \/> SetRebootToBootLoaderEntry(in s boot_loader_entry); <br \/> SetWallMessage(in s wall_message, <br \/> in b enable); <br \/> signals: <br \/> SessionNew(s session_id, <br \/> o object_path); <br \/> SessionRemoved(s session_id, <br \/> o object_path); <br \/> UserNew(u uid, <br \/> o object_path); <br \/> UserRemoved(u uid, <br \/> o object_path); <br \/> SeatNew(s seat_id, <br \/> o object_path); <br \/> SeatRemoved(s seat_id, <br \/> o object_path); <br \/> PrepareForShutdown(b start); <br \/> PrepareForSleep(b start); <br \/> properties: <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> @org.freedesktop.systemd1.Privileged(&#8220;true&#8221;) <br \/> readwrite b EnableWallMessages = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> @org.freedesktop.systemd1.Privileged(&#8220;true&#8221;) <br \/> readwrite s WallMessage = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u NAutoVTs = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly as KillOnlyUsers = [&#8216;&#8230;&#8217;, &#8230;]; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly as KillExcludeUsers = [&#8216;&#8230;&#8217;, &#8230;]; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly b KillUserProcesses = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly s RebootParameter = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b RebootToFirmwareSetup = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly t RebootToBootLoaderMenu = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly s RebootToBootLoaderEntry = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly as BootLoaderEntries = [&#8216;&#8230;&#8217;, &#8230;]; <br \/> readonly b IdleHint = &#8230;; <br \/> readonly t IdleSinceHint = &#8230;; <br \/> readonly t IdleSinceHintMonotonic = &#8230;; <br \/> readonly s BlockInhibited = &#8216;&#8230;&#8217;; <br \/> readonly s DelayInhibited = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t InhibitDelayMaxUSec = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t UserStopDelayUSec = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandlePowerKey = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandleSuspendKey = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandleHibernateKey = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandleLidSwitch = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandleLidSwitchExternalPower = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s HandleLidSwitchDocked = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t HoldoffTimeoutUSec = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s IdleAction = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t IdleActionUSec = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b PreparingForShutdown = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b PreparingForSleep = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly (st) ScheduledShutdown = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b Docked = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b LidClosed = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b OnExternalPower = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly b RemoveIPC = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t RuntimeDirectorySize = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t RuntimeDirectoryInodesMax = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t InhibitorsMax = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly t NCurrentInhibitors = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t SessionsMax = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly t NCurrentSessions = &#8230;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>Methods <br \/> GetSession()<\/b> may be used to get the session object path for the session with the specified ID. Similarly, <b>GetUser()<\/b> and <b>GetSeat()<\/b> get the user and seat objects, respectively. <b>GetSessionByPID()<\/b> and <b>GetUserByPID()<\/b> get the session\/user object the specified PID belongs to if there is any.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ListSessions()<\/b> returns an array of all current sessions. The structures in the array consist of the following fields: session id, user id, user name, seat id, session object path. If a session does not have a seat attached, the seat id field will be an empty string.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ListUsers()<\/b> returns an array of all currently logged in users. The structures in the array consist of the following fields: user id, user name, user object path.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ListSeats()<\/b> returns an array of all currently available seats. The structure in the array consists of the following fields: seat id, seat object path.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ListInhibitors()<\/b> lists all currently active inhibitors. It returns an array of structures consisting of <i>what<\/i>, <i>who<\/i>, <i>why<\/i>, <i>mode<\/i>, <i>uid<\/i> (user ID), and <i>pid<\/i> (process ID).<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>CreateSession()<\/b> and <b>ReleaseSession()<\/b> may be used to open or close login sessions. These calls should <i>never<\/i> be invoked directly by clients. Creating\/closing sessions is exclusively the job of PAM and its <b>pam_systemd<\/b>(8) module.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>ActivateSession()<\/b> brings the session with the specified ID into the foreground. <b>ActivateSessionOnSeat()<\/b> does the same, but only if the seat id matches.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>LockSession()<\/b> asks the session with the specified ID to activate the screen lock. <b>UnlockSession()<\/b> asks the session with the specified ID to remove an active screen lock, if there is any. This is implemented by sending out the Lock() and Unlock() signals from the respective session object which session managers are supposed to listen on.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>LockSessions()<\/b> asks all sessions to activate their screen locks. This may be used to lock access to the entire machine in one action. Similarly, <b>UnlockSessions()<\/b> asks all sessions to deactivate their screen locks.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>KillSession()<\/b> may be used to send a Unix signal to one or all processes of a session. As arguments it takes the session id, either the string &#8220;leader&#8221; or &#8220;all&#8221; and a signal number. If &#8220;leader&#8221; is passed only the session &#8220;leader&#8221; is killed. If &#8220;all&#8221; is passed all processes of the session are killed.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>KillUser()<\/b> may be used to send a Unix signal to all processes of a user. As arguments it takes the user id and a signal number.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>TerminateSession()<\/b>, <b>TerminateUser()<\/b>, <b>TerminateSeat()<\/b> may be used to forcibly terminate one specific session, all processes of a user, and all sessions attached to a specific seat, respectively. The session, user, and seat are identified by their respective IDs.<\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><b>SetUserLinger()<\/b> enables or disables user lingering. If enabled, the runtime directory of a user is kept around and they may continue to run processes while logged out. If disabled, the runtime directory goes away as soon as they log out. <b>SetUserLinger()<\/b> expects three arguments: the UID, a boolean whether to enable\/disable and a boolean controlling the <b><font color=\"#0000FF\">polkit<\/font><\/b> <small><font color=\"#000000\">[1]<\/font><\/small> <font color=\"#000000\">authorization interactivity (see below). Note that the user linger state is persistently stored on disk.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>AttachDevice()<\/b> may be used to assign a specific device to a specific seat. The device is identified by its \/sys path and must be eligible for seat assignments. <b>AttachDevice()<\/b> takes three arguments: the seat id, the sysfs path, and a boolean for controlling polkit interactivity (see below). Device assignments are persistently stored on disk. To create a new seat, simply specify a previously unused seat id. For more information about the seat assignment logic see<\/font> <b><font color=\"#0000FF\">Multi\u2212Seat for Linux<\/font><\/b> <small><font color=\"#000000\">[2]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>FlushDevices()<\/b> removes all explicit seat assignments for devices, resetting all assignments to the automatic defaults. The only argument it takes is the polkit interactivity boolean (see below).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>PowerOff()<\/b>, <b>Reboot()<\/b>, <b>Halt()<\/b>, <b>Suspend()<\/b>, and <b>Hibernate()<\/b> 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). <b>HybridSleep()<\/b> results in the system entering a hybrid\u2212sleep mode, i.e. the system is both hibernated and suspended. <b>SuspendThenHibernate()<\/b> results in the system being suspended, then later woken using an RTC timer and hibernated. The only argument is the polkit interactivity boolean <i>interactive<\/i> (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. UIs should expose these calls as the primary mechanism to poweroff\/reboot\/suspend\/hibernate the machine.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetRebootParameter()<\/b> sets a parameter for a subsequent reboot operation. See the description of <b>reboot<\/b> in <b>systemctl<\/b>(1) and <b>reboot<\/b>(2) for more information.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetRebootToFirmwareSetup()<\/b>, <b>SetRebootToBootLoaderMenu()<\/b>, and <b>SetRebootToBootLoaderEntry()<\/b> configure the action to be taken from the boot loader after a reboot: respectively entering firmware setup mode, the boot loader menu, or a specific boot loader entry. See <b>systemctl<\/b>(1) for the corresponding command line interface.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>CanPowerOff()<\/b>, <b>CanReboot()<\/b>, <b>CanHalt()<\/b>, <b>CanSuspend()<\/b>, <b>CanHibernate()<\/b>, <b>CanHybridSleep()<\/b>, <b>CanSuspendThenHibernate()<\/b>, <b>CanRebootParameter()<\/b>, <b>CanRebootToFirmwareSetup()<\/b>, <b>CanRebootToBootLoaderMenu()<\/b>, and <b>CanRebootToBootLoaderEntry()<\/b> test whether the system supports the respective operation and whether the calling user is allowed to execute it. Returns one of &#8220;na&#8221;, &#8220;yes&#8221;, &#8220;no&#8221;, and &#8220;challenge&#8221;. If &#8220;na&#8221; is returned, the operation is not available because hardware, kernel, or drivers do not support it. If &#8220;yes&#8221; is returned, the operation is supported and the user may execute the operation without further authentication. If &#8220;no&#8221; is returned, the operation is available but the user is not allowed to execute the operation. If &#8220;challenge&#8221; is returned, the operation is available but only after authorization.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ScheduleShutdown()<\/b> schedules a shutdown operation <i>type<\/i> at time <i>usec<\/i> in microseconds since the UNIX epoch. <i>type<\/i> can be one of &#8220;poweroff&#8221;, &#8220;dry\u2212poweroff&#8221;, &#8220;reboot&#8221;, &#8220;dry\u2212reboot&#8221;, &#8220;halt&#8221;, and &#8220;dry\u2212halt&#8221;. (The &#8220;dry\u2212&#8221; variants do not actually execute the shutdown action.) <b>CancelScheduledShutdown()<\/b> cancels a scheduled shutdown. The output parameter <i>cancelled<\/i> is true if a shutdown operation was scheduled.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetWallMessage()<\/b> sets the wall message (the message that will be sent out to all terminals and stored in a <b>utmp<\/b>(5) record) for a subsequent scheduled shutdown operation. The parameter <i>wall_message<\/i> specifies the shutdown reason (and may be empty) which will be included in the shutdown message. The parameter <i>enable<\/i> specifies whether to print a wall message on shutdown.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Inhibit()<\/b> creates an inhibition lock. It takes four parameters: <i>what<\/i>, <i>who<\/i>, <i>why<\/i>, and <i>mode<\/i>. <i>what<\/i> is one or more of &#8220;shutdown&#8221;, &#8220;sleep&#8221;, &#8220;idle&#8221;, &#8220;handle\u2212power\u2212key&#8221;, &#8220;handle\u2212suspend\u2212key&#8221;, &#8220;handle\u2212hibernate\u2212key&#8221;, &#8220;handle\u2212lid\u2212switch&#8221;, separated by colons, for inhibiting poweroff\/reboot, suspend\/hibernate, the automatic idle logic, or hardware key handling. <i>who<\/i> should be a short human readable string identifying the application taking the lock. <i>why<\/i> should be a short human readable string identifying the reason why the lock is taken. Finally, <i>mode<\/i> is either &#8220;block&#8221; or &#8220;delay&#8221; which encodes whether the inhibit shall be consider mandatory or whether it should just delay the operation to a certain maximum time. The method returns a file descriptor. The lock is released the moment this file descriptor and all its duplicates are closed. For more information on the inhibition logic see<\/font> <b><font color=\"#0000FF\">Inhibitor Locks<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Signals<\/b> <br \/> Whenever the inhibition state or idle hint changes, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <b>SessionNew<\/b>, <b>SessionRemoved<\/b>, <b>UserNew<\/b>, <b>UserRemoved<\/b>, <b>SeatNew<\/b>, and <b>SeatRemoved<\/b> signals are sent each time a session is created or removed, a user logs in or out, or a seat is added or removed. They each contain the ID of the object plus the object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <b>PrepareForShutdown()<\/b> and <b>PrepareForSleep()<\/b> signals are sent right before (with the argument &#8220;true&#8221;) or after (with the argument &#8220;false&#8221;) 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<\/font> <b><font color=\"#0000FF\">Inhibitor Locks<\/font><\/b> <small><font color=\"#000000\">[3]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Properties<\/b> <br \/> Most properties simply reflect the configuration, see <b>logind.conf<\/b>(5). This includes: <i>NAutoVTs<\/i>, <i>KillOnlyUsers<\/i>, <i>KillExcludeUsers<\/i>, <i>KillUserProcesses<\/i>, <i>IdleAction<\/i>, <i>InhibitDelayMaxUSec<\/i>, <i>InhibitorsMax<\/i>, <i>UserStopDelayUSec<\/i>, <i>HandlePowerKey<\/i>, <i>HandleSuspendKey<\/i>, <i>HandleHibernateKey<\/i>, <i>HandleLidSwitch<\/i>, <i>HandleLidSwitchExternalPower<\/i>, <i>HandleLidSwitchDocked<\/i>, <i>IdleActionUSec<\/i>, <i>HoldoffTimeoutUSec<\/i>, <i>RemoveIPC<\/i>, <i>RuntimeDirectorySize<\/i>, <i>RuntimeDirectoryInodesMax<\/i>, <i>InhibitorsMax<\/i>, and <i>SessionsMax<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>IdleHint<\/i> property reflects the idle hint state of the system. If the system is idle it might get into automatic suspend or shutdown depending on the configuration.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>IdleSinceHint<\/i> and <i>IdleSinceHintMonotonic<\/i> encode the timestamps of the last change of the idle hint boolean, in <b>CLOCK_REALTIME<\/b> and <b>CLOCK_MONOTONIC<\/b> timestamps, respectively, in microseconds since the epoch.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>BlockInhibited<\/i> and <i>DelayInhibited<\/i> properties encode the currently active locks of the respective modes. They are colon separated lists of &#8220;shutdown&#8221;, &#8220;sleep&#8221;, and &#8220;idle&#8221; (see above).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>NCurrentSessions<\/i> and <i>NCurrentInhibitors<\/i> contain the number of currently registered sessions and inhibitors.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>BootLoaderEntries<\/i> property contains a list of boot loader entries. This includes boot loader entries defined in configuration and any additional loader entries reported by the boot loader. See <b>systemd-boot<\/b>(7) for more information.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>PreparingForShutdown<\/i> and <i>PreparingForSleep<\/i> boolean properties are true during the interval between the two <b>PrepareForShutdown<\/b> and <b>PrepareForSleep<\/b> signals respectively. Note that these properties do not send out <b>PropertyChanged<\/b> signals.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>RebootParameter<\/i> property shows the value set with the <b>SetRebootParameter()<\/b> method described above.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>ScheduledShutdown<\/i> shows the value pair set with the <b>ScheduleShutdown()<\/b> method described above.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>RebootToFirmwareSetup<\/i>, <i>RebootToBootLoaderMenu<\/i>, and <i>RebootToBootLoaderEntry<\/i> are true when the resprective post\u2212reboot operation was selected with <b>SetRebootToFirmwareSetup<\/b>, <b>SetRebootToBootLoaderMenu<\/b>, or <b>SetRebootToBootLoaderEntry<\/b>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>WallMessage<\/i> and <i>EnableWallMessages<\/i> properties reflect the shutdown reason and wall message enablement switch which can be set with the <b>SetWallMessage()<\/b> method described above.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Docked<\/i> is true if the machine is connected to a dock. <i>LidClosed<\/i> is true when the lid (of a laptop) is closed. <i>OnExternalPower<\/i> is true when the machine is connected to an external power supply.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Security<\/b> <br \/> A number of operations are protected via the polkit privilege system. <b>SetUserLinger()<\/b> requires the org.freedesktop.login1.set\u2212user\u2212linger privilege. <b>AttachDevice()<\/b> requires org.freedesktop.login1.attach\u2212device and <b>FlushDevices()<\/b> requires org.freedesktop.login1.flush\u2212devices. <b>PowerOff()<\/b>, <b>Reboot()<\/b>, <b>Halt()<\/b>, <b>Suspend()<\/b>, <b>Hibernate()<\/b> require org.freedesktop.login1.power\u2212off, org.freedesktop.login1.power\u2212off\u2212multiple\u2212sessions, org.freedesktop.login1.power\u2212off\u2212ignore\u2212inhibit, org.freedesktop.login1.reboot, org.freedesktop.login1.reboot\u2212multiple\u2212sessions, org.freedesktop.login1.reboot\u2212ignore\u2212inhibit, org.freedesktop.login1.halt, org.freedesktop.login1.halt\u2212multiple\u2212sessions, org.freedesktop.login1.halt\u2212ignore\u2212inhibit, org.freedesktop.login1.suspend, org.freedesktop.login1.suspend\u2212multiple\u2212sessions, org.freedesktop.login1.suspend\u2212ignore\u2212inhibit, org.freedesktop.login1.hibernate, org.freedesktop.login1.hibernate\u2212multiple\u2212sessions, org.freedesktop.login1.hibernate\u2212ignore\u2212inhibit, respectively depending on whether there are other sessions around or active inhibits are present. <b>HybridSleep()<\/b> and <b>SuspendThenHibernate()<\/b> use the same privileges as <b>Hibernate()<\/b>. <b>SetRebootParameter()<\/b> requires org.freedesktop.login1.set\u2212reboot\u2212parameter.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetRebootToFirmwareSetup<\/b> requires org.freedesktop.login1.set\u2212reboot\u2212to\u2212firmware\u2212setup. <b>SetRebootToBootLoaderMenu<\/b> requires org.freedesktop.login1.set\u2212reboot\u2212to\u2212boot\u2212loader\u2212menu. <b>SetRebootToBootLoaderEntry<\/b> requires org.freedesktop.login1.set\u2212reboot\u2212to\u2212boot\u2212loader\u2212entry.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ScheduleShutdown<\/b> and <b>CancelScheduledShutdown<\/b> require the same privileges (listed above) as the immediate poweroff\/reboot\/halt operations.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Inhibit()<\/b> is protected via one of org.freedesktop.login1.inhibit\u2212block\u2212shutdown, org.freedesktop.login1.inhibit\u2212delay\u2212shutdown, org.freedesktop.login1.inhibit\u2212block\u2212sleep, org.freedesktop.login1.inhibit\u2212delay\u2212sleep, org.freedesktop.login1.inhibit\u2212block\u2212idle, org.freedesktop.login1.inhibit\u2212handle\u2212power\u2212key, org.freedesktop.login1.inhibit\u2212handle\u2212suspend\u2212key, org.freedesktop.login1.inhibit\u2212handle\u2212hibernate\u2212key, org.freedesktop.login1.inhibit\u2212handle\u2212lid\u2212switch depending on the lock type and mode taken.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>interactive<\/i> boolean parameters can be used to control whether polkit should interactively ask the user for authentication credentials if required.<\/font><\/p>\n<h2>SEAT OBJECTS <a name=\"SEAT OBJECTS\"><\/a> <\/h2>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">node \/org\/freedesktop\/login1\/seat\/seat0 { <br \/> interface org.freedesktop.login1.Seat { <br \/> methods: <br \/> Terminate(); <br \/> ActivateSession(in s session_id); <br \/> SwitchTo(in u vtnr); <br \/> SwitchToNext(); <br \/> SwitchToPrevious(); <br \/> properties: <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Id = &#8216;&#8230;&#8217;; <br \/> readonly (so) ActiveSession = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly b CanTTY = &#8230;; <br \/> readonly b CanGraphical = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly a(so) Sessions = [&#8230;]; <br \/> readonly b IdleHint = &#8230;; <br \/> readonly t IdleSinceHint = &#8230;; <br \/> readonly t IdleSinceHintMonotonic = &#8230;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Methods <br \/> Terminate()<\/b> and <b>ActivateSession()<\/b> work similar to TerminateSeat(), ActivationSessionOnSeat() on the Manager object.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SwitchTo()<\/b> switches to the session on the virtual terminal <i>vtnr<\/i>. <b>SwitchToNext()<\/b> and <b>SwitchToPrevious()<\/b> 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.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Signals<\/b> <br \/> Whenever <b>ActiveSession<\/b>, <b>Sessions<\/b>, <b>CanGraphical<\/b>, <b>CanTTY<\/b>, or the idle state changes, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Properties<\/b> <br \/> The <i>Id<\/i> property encodes the ID of the seat.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>ActiveSession<\/i> encodes the currently active session if there is one. It is a structure consisting of the session id and the object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>CanTTY<\/i> encodes whether the session is suitable for text logins, and <i>CanGraphical<\/i> whether it is suitable for graphical sessions.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>Sessions<\/i> property is an array of all current sessions of this seat, each encoded in a structure consisting of the ID and the object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>IdleHint<\/i>, <i>IdleSinceHint<\/i>, and <i>IdleSinceHintMonotonic<\/i> properties encode the idle state, similar to the ones exposed on the Manager object, but specific for this seat.<\/font><\/p>\n<h2>USER OBJECTS <a name=\"USER OBJECTS\"><\/a> <\/h2>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">node \/org\/freedesktop\/login1\/user\/_1000 { <br \/> interface org.freedesktop.login1.User { <br \/> methods: <br \/> Terminate(); <br \/> Kill(in i signal_number); <br \/> properties: <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u UID = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u GID = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Name = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t Timestamp = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t TimestampMonotonic = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s RuntimePath = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Service = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Slice = &#8216;&#8230;&#8217;; <br \/> readonly (so) Display = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly s State = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly a(so) Sessions = [&#8230;]; <br \/> readonly b IdleHint = &#8230;; <br \/> readonly t IdleSinceHint = &#8230;; <br \/> readonly t IdleSinceHintMonotonic = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;false&#8221;) <br \/> readonly b Linger = &#8230;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Methods <br \/> Terminate()<\/b> and <b>Kill()<\/b> work similar to the <b>TerminateUser()<\/b> and <b>KillUser()<\/b> methods on the manager object.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Signals<\/b> <br \/> Whenever <i>Sessions<\/i> or the idle state changes, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Properties<\/b> <br \/> The <i>UID<\/i> and <i>GID<\/i> properties encode the Unix UID and primary GID of the user.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>Name<\/i> property encodes the user name.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Timestamp<\/i> and <i>TimestampMonotonic<\/i> encode the login time of the user in microseconds since the epoch, in the <b>CLOCK_REALTIME<\/b> and <b>CLOCK_MONOTONIC<\/b> clocks, respectively.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>RuntimePath<\/i> encodes the runtime path of the user, i.e. <i>$XDG_RUNTIME_DIR<\/i>. For details see the<\/font> <b><font color=\"#0000FF\">XDG Basedir Specification<\/font><\/b> <small><font color=\"#000000\">[4]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Service<\/i> 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 user@.service.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Slice<\/i> contains the unit name of the user systemd slice of this user. Each logged in user gets a private slice.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Display<\/i> 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.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>State<\/i> encodes the user state and is one of &#8220;offline&#8221;, &#8220;lingering&#8221;, &#8220;online&#8221;, &#8220;active&#8221;, or &#8220;closing&#8221;. See <b>sd_uid_get_state<\/b>(3) for more information about the states.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Sessions<\/i> is an array of structures encoding all current sessions of the user. Each structure consists of the ID and object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>IdleHint<\/i>, <i>IdleSinceHint<\/i>, and <i>IdleSinceHintMonotonic<\/i> properties encode the idle hint state of the user, similar to the Manager&#8217;s properties, but specific for this user.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">The <i>Linger<\/i> property shows whether lingering is enabled for this user.<\/font><\/p>\n<h2>SESSION OBJECTS <a name=\"SESSION OBJECTS\"><\/a> <\/h2>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">node \/org\/freedesktop\/login1\/session\/1 { <br \/> interface org.freedesktop.login1.Session { <br \/> methods: <br \/> Terminate(); <br \/> Activate(); <br \/> Lock(); <br \/> Unlock(); <br \/> SetIdleHint(in b idle); <br \/> SetLockedHint(in b locked); <br \/> Kill(in s who, <br \/> in i signal_number); <br \/> TakeControl(in b force); <br \/> ReleaseControl(); <br \/> SetType(in s type); <br \/> TakeDevice(in u major, <br \/> in u minor, <br \/> out h fd, <br \/> out b inactive); <br \/> ReleaseDevice(in u major, <br \/> in u minor); <br \/> PauseDeviceComplete(in u major, <br \/> in u minor); <br \/> SetBrightness(in s subsystem, <br \/> in s name, <br \/> in u brightness); <br \/> signals: <br \/> PauseDevice(u major, <br \/> u minor, <br \/> s type); <br \/> ResumeDevice(u major, <br \/> u minor, <br \/> h fd); <br \/> Lock(); <br \/> Unlock(); <br \/> properties: <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Id = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly (uo) User = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Name = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t Timestamp = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly t TimestampMonotonic = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u VTNr = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly (so) Seat = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s TTY = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Display = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly b Remote = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s RemoteHost = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s RemoteUser = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Service = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Desktop = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Scope = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u Leader = &#8230;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly u Audit = &#8230;; <br \/> readonly s Type = &#8216;&#8230;&#8217;; <br \/> @org.freedesktop.DBus.Property.EmitsChangedSignal(&#8220;const&#8221;) <br \/> readonly s Class = &#8216;&#8230;&#8217;; <br \/> readonly b Active = &#8230;; <br \/> readonly s State = &#8216;&#8230;&#8217;; <br \/> readonly b IdleHint = &#8230;; <br \/> readonly t IdleSinceHint = &#8230;; <br \/> readonly t IdleSinceHintMonotonic = &#8230;; <br \/> readonly b LockedHint = &#8230;; <br \/> }; <br \/> interface org.freedesktop.DBus.Peer { &#8230; }; <br \/> interface org.freedesktop.DBus.Introspectable { &#8230; }; <br \/> interface org.freedesktop.DBus.Properties { &#8230; }; <br \/> };<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Methods <br \/> Terminate()<\/b>, <b>Activate()<\/b>, <b>Lock()<\/b>, <b>Unlock()<\/b>, and <b>Kill()<\/b> work similarly to the respective calls on the Manager object.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetIdleHint()<\/b> is called by the session object to update the idle state of the session whenever it changes.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>TakeControl()<\/b> allows a process to take exclusive managed device access\u2212control for that session. Only one D\u2212Bus connection can be a controller for a given session at any time. If the <i>force<\/i> 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\u2212Bus users with the effective UID set to the user of the session or root.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ReleaseControl()<\/b> drops control of a given session. Closing the D\u2212Bus connection implicitly releases control as well. See <b>TakeControl()<\/b> for more information. This method also releases all devices for which the controller requested ownership via <b>TakeDevice()<\/b>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetType()<\/b> allows the type of the session to be changed dynamically. It can only be called by session&#8217;s current controller. If <b>TakeControl()<\/b> 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 <b>ReleaseControl()<\/b> or closing the D\u2212Bus connection. This should help prevent a session from entering an inconsistent state, for example if the controller crashes. The only argument <i>type<\/i> is the new session type.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>TakeDevice()<\/b> 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 systemd\u2212logind will return a file descriptor for the device. Only a limited set of device\u2212types is currently supported (but may be extended). systemd\u2212logind 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. systemd\u2212logind only requires you to be the active session controller (see <b>TakeControl()<\/b>). Also note that any device can only be requested once. As long as you don&#8217;t release it, further <b>TakeDevice()<\/b> calls will fail.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ReleaseDevice()<\/b> releases a device again (see <b>TakeDevice()<\/b>). This is also implicitly done by <b>ReleaseControl()<\/b> or when closing the D\u2212Bus connection.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>PauseDeviceComplete()<\/b> allows a session controller to synchronously pause a device after receiving a <b>PauseDevice(&#8220;pause&#8221;)<\/b> signal. Forced signals (or after an internal timeout) are automatically completed by systemd\u2212logind asynchronously.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetLockedHint()<\/b> may be used to set the &#8220;locked hint&#8221; to <i>locked<\/i>, i.e. information whether the session is locked. This is intended to be used by the desktop environment to tell <b>systemd\u2212logind<\/b> when the session is locked and unlocked.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>SetBrightness()<\/b> 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 <i>subsystem<\/i> parameter specifies a kernel subsystem, either &#8220;backlight&#8221; or &#8220;leds&#8221;. The <i>name<\/i> parameter specifies a device name under the specified subsystem. The <i>brightness<\/i> parameter specifies the brightness. The range is defined by individual drivers, see \/sys\/class\/<i>subsystem<\/i>\/<i>name<\/i>\/max_brightness.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Signals<\/b> <br \/> The active session controller exclusively gets <b>PauseDevice<\/b> and <b>ResumeDevice<\/b> events for any device it requested via <b>TakeDevice()<\/b>. They notify the controller whenever a device is paused or resumed. A device is never resumed if its session is inactive. Also note that <b>PauseDevice<\/b> signals are sent before the <b>PropertyChanged<\/b> signal for the <b>Active<\/b> state. The inverse is true for <b>ResumeDevice<\/b>. A device may remain paused for unknown reasons even though the Session is active.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">A <b>PauseDevice<\/b> signal carries the major and minor numbers and a string describing the type as arguments. <b>force<\/b> means the device was already paused by systemd\u2212logind and the signal is only an asynchronous notification. <b>pause<\/b> means systemd\u2212logind grants you a limited amount of time to pause the device. You must respond to this via <b>PauseDeviceComplete()<\/b>. This synchronous pausing mechanism is used for backwards\u2212compatibility to VTs and systemd\u2212logind is free to not make use of it. It is also free to send a forced <b>PauseDevice<\/b> if you don&#8217;t respond in a timely manner (or for any other reason). <b>gone<\/b> means the device was unplugged from the system and you will no longer get any notifications about it. There is no need to call <b>ReleaseDevice()<\/b>. You may call <b>TakeDevice()<\/b> again if a new device is assigned the major+minor combination.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>ResumeDevice<\/b> 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).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">Whenever <b>Active<\/b> or the idle state changes, <b>PropertyChanged<\/b> signals are sent out to which clients can subscribe.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Lock<\/b>\/<b>Unlock<\/b> is sent when the session is asked to be screen\u2212locked\/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 <b>Lock()<\/b> and <b>Unlock()<\/b> methods, respectively.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Properties<\/b> <i><br \/> Id<\/i> encodes the session ID.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>User<\/i> encodes the user ID of the user this session belongs to. This is a structure consisting of the Unix UID and the object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Name<\/i> encodes the user name.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Timestamp<\/i> and <i>TimestampMonotonic<\/i> encode the microseconds since the epoch when the session was created, in <b>CLOCK_REALTIME<\/b> or <b>CLOCK_MONOTONIC<\/b>, respectively.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>VTNr<\/i> encodes the virtual terminal number of the session if there is any, 0 otherwise.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Seat<\/i> encodes the seat this session belongs to if there is any. This is a structure consisting of the ID and the seat object path.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>TTY<\/i> encodes the kernel TTY path of the session if this is a text login. If not this is an empty string.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Display<\/i> encodes the X11 display name if this is a graphical login. If not, this is an empty string.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Remote<\/i> encodes whether the session is local or remote.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>RemoteHost<\/i> and <i>RemoteUser<\/i> encode the remote host and user if this is a remote session, or an empty string otherwise.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Service<\/i> encodes the PAM service name that registered the session.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Desktop<\/i> describes the desktop environment running in the session (if known).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Scope<\/i> contains the systemd scope unit name of this session.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Leader<\/i> encodes the PID of the process that registered the session.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Audit<\/i> encodes the Kernel Audit session ID of the session if auditing is available.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Type<\/i> encodes the session type. It&#8217;s one of &#8220;unspecified&#8221; (for cron PAM sessions and suchlike), &#8220;tty&#8221; (for text logins) or &#8220;x11&#8243;\/&#8221;mir&#8221;\/&#8221;wayland&#8221; (for graphical logins).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Class<\/i> encodes the session class. It&#8217;s one of &#8220;user&#8221; (for normal user sessions), &#8220;greeter&#8221; (for display manager pseudo\u2212sessions), or &#8220;lock\u2212screen&#8221; (for display lock screens).<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>Active<\/i> is a boolean that is true if the session is active, i.e. currently in the foreground. This field is semi\u2212redundant due to <i>State<\/i>.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>State<\/i> encodes the session state and one of &#8220;online&#8221;, &#8220;active&#8221;, or &#8220;closing&#8221;. See <b>sd_session_get_state<\/b>(3) for more information about the states.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>IdleHint<\/i>, <i>IdleSinceHint<\/i>, and <i>IdleSinceHintMonotonic<\/i> encapsulate the idle hint state of this session, similarly to how the respective properties on the manager object do it for the whole system.<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><i>LockedHint<\/i> shows the locked hint state of this session, as set by the <b>SetLockedHint()<\/b> method described above.<\/font><\/p>\n<h2>EXAMPLES <a name=\"EXAMPLES\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a01.\u00a0Introspect org.freedesktop.login1.Manager on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system \u2212\u2212dest org.freedesktop.login1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/login1<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a02.\u00a0Introspect org.freedesktop.login1.Seat on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system \u2212\u2212dest org.freedesktop.login1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/login1\/seat\/seat0<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a03.\u00a0Introspect org.freedesktop.login1.User on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system \u2212\u2212dest org.freedesktop.login1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/login1\/user\/_1000<\/font><\/p>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\"><b>Example\u00a04.\u00a0Introspect org.freedesktop.login1.Session on the bus<\/b><\/font><\/p>\n<p style=\"margin-left:17%; margin-top: 1em\"><font color=\"#000000\">$ gdbus introspect \u2212\u2212system \u2212\u2212dest org.freedesktop.login1  <br \/> \u2212\u2212object\u2212path \/org\/freedesktop\/login1\/session\/45<\/font><\/p>\n<h2>VERSIONING <a name=\"VERSIONING\"><\/a> <\/h2>\n<p style=\"margin-left:11%; margin-top: 1em\"><font color=\"#000000\">These D\u2212Bus interfaces follow<\/font> <b><font color=\"#0000FF\">the usual interface versioning guidelines<\/font><\/b> <small><font color=\"#000000\">[5]<\/font><\/small> <font color=\"#000000\">.<\/font><\/p>\n<h2>NOTES <a name=\"NOTES\"><\/a> <\/h2>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">1.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"9%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">polkit<\/font><\/p>\n<\/td>\n<td width=\"74%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/software\/polkit\/docs\/latest\/<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">2.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"31%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Multi-Seat for Linux<\/font><\/p>\n<\/td>\n<td width=\"52%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/multiseat<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">3.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"23%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">Inhibitor Locks<\/font><\/p>\n<\/td>\n<td width=\"60%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/www.freedesktop.org\/wiki\/Software\/systemd\/inhibit<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">4.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"38%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">XDG Basedir Specification<\/font><\/p>\n<\/td>\n<td width=\"45%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">https:\/\/specifications.freedesktop.org\/basedir-spec\/basedir-spec-latest.html<\/font><\/p>\n<table width=\"100%\" border=\"0\" rules=\"none\" frame=\"void\" cellspacing=\"0\" cellpadding=\"0\">\n<tr valign=\"top\" align=\"left\">\n<td width=\"12%\"><\/td>\n<td width=\"3%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">5.<\/font><\/p>\n<\/td>\n<td width=\"2%\"><\/td>\n<td width=\"63%\">\n<p style=\"margin-top: 1em\"><font color=\"#000000\">the usual interface versioning guidelines<\/font><\/p>\n<\/td>\n<td width=\"20%\"> <\/td>\n<\/tr>\n<\/table>\n<p style=\"margin-left:17%;\"><font color=\"#000000\">http:\/\/0pointer.de\/blog\/projects\/versioning-dbus.html<\/font><\/p>\n<hr>\n","protected":false},"excerpt":{"rendered":"<p>  org.freedesktop.login1 \u2212 The D\u2212Bus interface of systemd\u2212logind <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[959],"tags":[961,1291,1318],"class_list":["post-4614","post","type-post","status-publish","format-standard","hentry","category-5-formatos-de-ficheros","tag-961","tag-man5","tag-org"],"gutentor_comment":0,"_links":{"self":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4614","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/comments?post=4614"}],"version-history":[{"count":0,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/posts\/4614\/revisions"}],"wp:attachment":[{"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/media?parent=4614"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/categories?post=4614"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lode.uno\/linux-man\/wp-json\/wp\/v2\/tags?post=4614"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}