]> git.ipfire.org Git - thirdparty/systemd.git/blob - man/org.freedesktop.login1.xml
Merge pull request #23361 from keszybz/resolved-helpers
[thirdparty/systemd.git] / man / org.freedesktop.login1.xml
1 <?xml version='1.0'?>
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
3 "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" >
4 <!-- SPDX-License-Identifier: LGPL-2.1-or-later -->
5
6 <refentry id="org.freedesktop.login1" conditional='ENABLE_LOGIND'
7 xmlns:xi="http://www.w3.org/2001/XInclude">
8 <refentryinfo>
9 <title>org.freedesktop.login1</title>
10 <productname>systemd</productname>
11 </refentryinfo>
12
13 <refmeta>
14 <refentrytitle>org.freedesktop.login1</refentrytitle>
15 <manvolnum>5</manvolnum>
16 </refmeta>
17
18 <refnamediv>
19 <refname>org.freedesktop.login1</refname>
20 <refpurpose>The D-Bus interface of systemd-logind</refpurpose>
21 </refnamediv>
22
23 <refsect1>
24 <title>Introduction</title>
25
26 <para><citerefentry><refentrytitle>systemd-logind.service</refentrytitle><manvolnum>8</manvolnum></citerefentry>
27 is a system service that keeps track of user logins and seats.</para>
28
29 <para>The daemon provides both a C library interface as well as a D-Bus interface. The library interface
30 may be used to introspect and watch the state of user logins and seats. The bus interface provides the
31 same functionality but in addition may also be used to make changes to the system state. For more information please
32 consult <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>.
33 </para>
34 </refsect1>
35
36 <refsect1>
37 <title>The Manager Object</title>
38
39 <para>The service exposes the following interfaces on the Manager object on the bus:</para>
40
41 <programlisting executable="systemd-logind" node="/org/freedesktop/login1" interface="org.freedesktop.login1.Manager">
42 node /org/freedesktop/login1 {
43 interface org.freedesktop.login1.Manager {
44 methods:
45 GetSession(in s session_id,
46 out o object_path);
47 GetSessionByPID(in u pid,
48 out o object_path);
49 GetUser(in u uid,
50 out o object_path);
51 GetUserByPID(in u pid,
52 out o object_path);
53 GetSeat(in s seat_id,
54 out o object_path);
55 ListSessions(out a(susso) sessions);
56 ListUsers(out a(uso) users);
57 ListSeats(out a(so) seats);
58 ListInhibitors(out a(ssssuu) inhibitors);
59 @org.freedesktop.systemd1.Privileged("true")
60 CreateSession(in u uid,
61 in u pid,
62 in s service,
63 in s type,
64 in s class,
65 in s desktop,
66 in s seat_id,
67 in u vtnr,
68 in s tty,
69 in s display,
70 in b remote,
71 in s remote_user,
72 in s remote_host,
73 in a(sv) properties,
74 out s session_id,
75 out o object_path,
76 out s runtime_path,
77 out h fifo_fd,
78 out u uid,
79 out s seat_id,
80 out u vtnr,
81 out b existing);
82 @org.freedesktop.systemd1.Privileged("true")
83 ReleaseSession(in s session_id);
84 ActivateSession(in s session_id);
85 ActivateSessionOnSeat(in s session_id,
86 in s seat_id);
87 LockSession(in s session_id);
88 UnlockSession(in s session_id);
89 LockSessions();
90 UnlockSessions();
91 KillSession(in s session_id,
92 in s who,
93 in i signal_number);
94 KillUser(in u uid,
95 in i signal_number);
96 TerminateSession(in s session_id);
97 TerminateUser(in u uid);
98 TerminateSeat(in s seat_id);
99 SetUserLinger(in u uid,
100 in b enable,
101 in b interactive);
102 AttachDevice(in s seat_id,
103 in s sysfs_path,
104 in b interactive);
105 FlushDevices(in b interactive);
106 PowerOff(in b interactive);
107 PowerOffWithFlags(in t flags);
108 Reboot(in b interactive);
109 RebootWithFlags(in t flags);
110 Halt(in b interactive);
111 HaltWithFlags(in t flags);
112 Suspend(in b interactive);
113 SuspendWithFlags(in t flags);
114 Hibernate(in b interactive);
115 HibernateWithFlags(in t flags);
116 HybridSleep(in b interactive);
117 HybridSleepWithFlags(in t flags);
118 SuspendThenHibernate(in b interactive);
119 SuspendThenHibernateWithFlags(in t flags);
120 CanPowerOff(out s result);
121 CanReboot(out s result);
122 CanHalt(out s result);
123 CanSuspend(out s result);
124 CanHibernate(out s result);
125 CanHybridSleep(out s result);
126 CanSuspendThenHibernate(out s result);
127 ScheduleShutdown(in s type,
128 in t usec);
129 CancelScheduledShutdown(out b cancelled);
130 Inhibit(in s what,
131 in s who,
132 in s why,
133 in s mode,
134 out h pipe_fd);
135 CanRebootParameter(out s result);
136 SetRebootParameter(in s parameter);
137 CanRebootToFirmwareSetup(out s result);
138 SetRebootToFirmwareSetup(in b enable);
139 CanRebootToBootLoaderMenu(out s result);
140 SetRebootToBootLoaderMenu(in t timeout);
141 CanRebootToBootLoaderEntry(out s result);
142 SetRebootToBootLoaderEntry(in s boot_loader_entry);
143 SetWallMessage(in s wall_message,
144 in b enable);
145 signals:
146 SessionNew(s session_id,
147 o object_path);
148 SessionRemoved(s session_id,
149 o object_path);
150 UserNew(u uid,
151 o object_path);
152 UserRemoved(u uid,
153 o object_path);
154 SeatNew(s seat_id,
155 o object_path);
156 SeatRemoved(s seat_id,
157 o object_path);
158 PrepareForShutdown(b start);
159 PrepareForSleep(b start);
160 properties:
161 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
162 @org.freedesktop.systemd1.Privileged("true")
163 readwrite b EnableWallMessages = ...;
164 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
165 @org.freedesktop.systemd1.Privileged("true")
166 readwrite s WallMessage = '...';
167 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
168 readonly u NAutoVTs = ...;
169 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
170 readonly as KillOnlyUsers = ['...', ...];
171 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
172 readonly as KillExcludeUsers = ['...', ...];
173 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
174 readonly b KillUserProcesses = ...;
175 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
176 readonly s RebootParameter = '...';
177 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
178 readonly b RebootToFirmwareSetup = ...;
179 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
180 readonly t RebootToBootLoaderMenu = ...;
181 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
182 readonly s RebootToBootLoaderEntry = '...';
183 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
184 readonly as BootLoaderEntries = ['...', ...];
185 readonly b IdleHint = ...;
186 readonly t IdleSinceHint = ...;
187 readonly t IdleSinceHintMonotonic = ...;
188 readonly s BlockInhibited = '...';
189 readonly s DelayInhibited = '...';
190 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
191 readonly t InhibitDelayMaxUSec = ...;
192 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
193 readonly t UserStopDelayUSec = ...;
194 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
195 readonly s HandlePowerKey = '...';
196 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
197 readonly s HandlePowerKeyLongPress = '...';
198 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
199 readonly s HandleRebootKey = '...';
200 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
201 readonly s HandleRebootKeyLongPress = '...';
202 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
203 readonly s HandleSuspendKey = '...';
204 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
205 readonly s HandleSuspendKeyLongPress = '...';
206 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
207 readonly s HandleHibernateKey = '...';
208 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
209 readonly s HandleHibernateKeyLongPress = '...';
210 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
211 readonly s HandleLidSwitch = '...';
212 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
213 readonly s HandleLidSwitchExternalPower = '...';
214 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
215 readonly s HandleLidSwitchDocked = '...';
216 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
217 readonly t HoldoffTimeoutUSec = ...;
218 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
219 readonly s IdleAction = '...';
220 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
221 readonly t IdleActionUSec = ...;
222 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
223 readonly b PreparingForShutdown = ...;
224 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
225 readonly b PreparingForSleep = ...;
226 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
227 readonly (st) ScheduledShutdown = ...;
228 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
229 readonly b Docked = ...;
230 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
231 readonly b LidClosed = ...;
232 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
233 readonly b OnExternalPower = ...;
234 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
235 readonly b RemoveIPC = ...;
236 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
237 readonly t RuntimeDirectorySize = ...;
238 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
239 readonly t RuntimeDirectoryInodesMax = ...;
240 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
241 readonly t InhibitorsMax = ...;
242 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
243 readonly t NCurrentInhibitors = ...;
244 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
245 readonly t SessionsMax = ...;
246 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
247 readonly t NCurrentSessions = ...;
248 };
249 interface org.freedesktop.DBus.Peer { ... };
250 interface org.freedesktop.DBus.Introspectable { ... };
251 interface org.freedesktop.DBus.Properties { ... };
252 };
253 </programlisting>
254
255 <!--property HandlePowerKeyLongPress is not documented!-->
256
257 <!--property HandleRebootKey is not documented!-->
258
259 <!--property HandleRebootKeyLongPress is not documented!-->
260
261 <!--property HandleSuspendKeyLongPress is not documented!-->
262
263 <!--property HandleHibernateKeyLongPress is not documented!-->
264
265 <!--Autogenerated cross-references for systemd.directives, do not edit-->
266
267 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Manager"/>
268
269 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Manager"/>
270
271 <variablelist class="dbus-method" generated="True" extra-ref="GetSession()"/>
272
273 <variablelist class="dbus-method" generated="True" extra-ref="GetSessionByPID()"/>
274
275 <variablelist class="dbus-method" generated="True" extra-ref="GetUser()"/>
276
277 <variablelist class="dbus-method" generated="True" extra-ref="GetUserByPID()"/>
278
279 <variablelist class="dbus-method" generated="True" extra-ref="GetSeat()"/>
280
281 <variablelist class="dbus-method" generated="True" extra-ref="ListSessions()"/>
282
283 <variablelist class="dbus-method" generated="True" extra-ref="ListUsers()"/>
284
285 <variablelist class="dbus-method" generated="True" extra-ref="ListSeats()"/>
286
287 <variablelist class="dbus-method" generated="True" extra-ref="ListInhibitors()"/>
288
289 <variablelist class="dbus-method" generated="True" extra-ref="CreateSession()"/>
290
291 <variablelist class="dbus-method" generated="True" extra-ref="ReleaseSession()"/>
292
293 <variablelist class="dbus-method" generated="True" extra-ref="ActivateSession()"/>
294
295 <variablelist class="dbus-method" generated="True" extra-ref="ActivateSessionOnSeat()"/>
296
297 <variablelist class="dbus-method" generated="True" extra-ref="LockSession()"/>
298
299 <variablelist class="dbus-method" generated="True" extra-ref="UnlockSession()"/>
300
301 <variablelist class="dbus-method" generated="True" extra-ref="LockSessions()"/>
302
303 <variablelist class="dbus-method" generated="True" extra-ref="UnlockSessions()"/>
304
305 <variablelist class="dbus-method" generated="True" extra-ref="KillSession()"/>
306
307 <variablelist class="dbus-method" generated="True" extra-ref="KillUser()"/>
308
309 <variablelist class="dbus-method" generated="True" extra-ref="TerminateSession()"/>
310
311 <variablelist class="dbus-method" generated="True" extra-ref="TerminateUser()"/>
312
313 <variablelist class="dbus-method" generated="True" extra-ref="TerminateSeat()"/>
314
315 <variablelist class="dbus-method" generated="True" extra-ref="SetUserLinger()"/>
316
317 <variablelist class="dbus-method" generated="True" extra-ref="AttachDevice()"/>
318
319 <variablelist class="dbus-method" generated="True" extra-ref="FlushDevices()"/>
320
321 <variablelist class="dbus-method" generated="True" extra-ref="PowerOff()"/>
322
323 <variablelist class="dbus-method" generated="True" extra-ref="PowerOffWithFlags()"/>
324
325 <variablelist class="dbus-method" generated="True" extra-ref="Reboot()"/>
326
327 <variablelist class="dbus-method" generated="True" extra-ref="RebootWithFlags()"/>
328
329 <variablelist class="dbus-method" generated="True" extra-ref="Halt()"/>
330
331 <variablelist class="dbus-method" generated="True" extra-ref="HaltWithFlags()"/>
332
333 <variablelist class="dbus-method" generated="True" extra-ref="Suspend()"/>
334
335 <variablelist class="dbus-method" generated="True" extra-ref="SuspendWithFlags()"/>
336
337 <variablelist class="dbus-method" generated="True" extra-ref="Hibernate()"/>
338
339 <variablelist class="dbus-method" generated="True" extra-ref="HibernateWithFlags()"/>
340
341 <variablelist class="dbus-method" generated="True" extra-ref="HybridSleep()"/>
342
343 <variablelist class="dbus-method" generated="True" extra-ref="HybridSleepWithFlags()"/>
344
345 <variablelist class="dbus-method" generated="True" extra-ref="SuspendThenHibernate()"/>
346
347 <variablelist class="dbus-method" generated="True" extra-ref="SuspendThenHibernateWithFlags()"/>
348
349 <variablelist class="dbus-method" generated="True" extra-ref="CanPowerOff()"/>
350
351 <variablelist class="dbus-method" generated="True" extra-ref="CanReboot()"/>
352
353 <variablelist class="dbus-method" generated="True" extra-ref="CanHalt()"/>
354
355 <variablelist class="dbus-method" generated="True" extra-ref="CanSuspend()"/>
356
357 <variablelist class="dbus-method" generated="True" extra-ref="CanHibernate()"/>
358
359 <variablelist class="dbus-method" generated="True" extra-ref="CanHybridSleep()"/>
360
361 <variablelist class="dbus-method" generated="True" extra-ref="CanSuspendThenHibernate()"/>
362
363 <variablelist class="dbus-method" generated="True" extra-ref="ScheduleShutdown()"/>
364
365 <variablelist class="dbus-method" generated="True" extra-ref="CancelScheduledShutdown()"/>
366
367 <variablelist class="dbus-method" generated="True" extra-ref="Inhibit()"/>
368
369 <variablelist class="dbus-method" generated="True" extra-ref="CanRebootParameter()"/>
370
371 <variablelist class="dbus-method" generated="True" extra-ref="SetRebootParameter()"/>
372
373 <variablelist class="dbus-method" generated="True" extra-ref="CanRebootToFirmwareSetup()"/>
374
375 <variablelist class="dbus-method" generated="True" extra-ref="SetRebootToFirmwareSetup()"/>
376
377 <variablelist class="dbus-method" generated="True" extra-ref="CanRebootToBootLoaderMenu()"/>
378
379 <variablelist class="dbus-method" generated="True" extra-ref="SetRebootToBootLoaderMenu()"/>
380
381 <variablelist class="dbus-method" generated="True" extra-ref="CanRebootToBootLoaderEntry()"/>
382
383 <variablelist class="dbus-method" generated="True" extra-ref="SetRebootToBootLoaderEntry()"/>
384
385 <variablelist class="dbus-method" generated="True" extra-ref="SetWallMessage()"/>
386
387 <variablelist class="dbus-signal" generated="True" extra-ref="SessionNew"/>
388
389 <variablelist class="dbus-signal" generated="True" extra-ref="SessionRemoved"/>
390
391 <variablelist class="dbus-signal" generated="True" extra-ref="UserNew"/>
392
393 <variablelist class="dbus-signal" generated="True" extra-ref="UserRemoved"/>
394
395 <variablelist class="dbus-signal" generated="True" extra-ref="SeatNew"/>
396
397 <variablelist class="dbus-signal" generated="True" extra-ref="SeatRemoved"/>
398
399 <variablelist class="dbus-signal" generated="True" extra-ref="PrepareForShutdown"/>
400
401 <variablelist class="dbus-signal" generated="True" extra-ref="PrepareForSleep"/>
402
403 <variablelist class="dbus-property" generated="True" extra-ref="EnableWallMessages"/>
404
405 <variablelist class="dbus-property" generated="True" extra-ref="WallMessage"/>
406
407 <variablelist class="dbus-property" generated="True" extra-ref="NAutoVTs"/>
408
409 <variablelist class="dbus-property" generated="True" extra-ref="KillOnlyUsers"/>
410
411 <variablelist class="dbus-property" generated="True" extra-ref="KillExcludeUsers"/>
412
413 <variablelist class="dbus-property" generated="True" extra-ref="KillUserProcesses"/>
414
415 <variablelist class="dbus-property" generated="True" extra-ref="RebootParameter"/>
416
417 <variablelist class="dbus-property" generated="True" extra-ref="RebootToFirmwareSetup"/>
418
419 <variablelist class="dbus-property" generated="True" extra-ref="RebootToBootLoaderMenu"/>
420
421 <variablelist class="dbus-property" generated="True" extra-ref="RebootToBootLoaderEntry"/>
422
423 <variablelist class="dbus-property" generated="True" extra-ref="BootLoaderEntries"/>
424
425 <variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
426
427 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
428
429 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
430
431 <variablelist class="dbus-property" generated="True" extra-ref="BlockInhibited"/>
432
433 <variablelist class="dbus-property" generated="True" extra-ref="DelayInhibited"/>
434
435 <variablelist class="dbus-property" generated="True" extra-ref="InhibitDelayMaxUSec"/>
436
437 <variablelist class="dbus-property" generated="True" extra-ref="UserStopDelayUSec"/>
438
439 <variablelist class="dbus-property" generated="True" extra-ref="HandlePowerKey"/>
440
441 <variablelist class="dbus-property" generated="True" extra-ref="HandlePowerKeyLongPress"/>
442
443 <variablelist class="dbus-property" generated="True" extra-ref="HandleRebootKey"/>
444
445 <variablelist class="dbus-property" generated="True" extra-ref="HandleRebootKeyLongPress"/>
446
447 <variablelist class="dbus-property" generated="True" extra-ref="HandleSuspendKey"/>
448
449 <variablelist class="dbus-property" generated="True" extra-ref="HandleSuspendKeyLongPress"/>
450
451 <variablelist class="dbus-property" generated="True" extra-ref="HandleHibernateKey"/>
452
453 <variablelist class="dbus-property" generated="True" extra-ref="HandleHibernateKeyLongPress"/>
454
455 <variablelist class="dbus-property" generated="True" extra-ref="HandleLidSwitch"/>
456
457 <variablelist class="dbus-property" generated="True" extra-ref="HandleLidSwitchExternalPower"/>
458
459 <variablelist class="dbus-property" generated="True" extra-ref="HandleLidSwitchDocked"/>
460
461 <variablelist class="dbus-property" generated="True" extra-ref="HoldoffTimeoutUSec"/>
462
463 <variablelist class="dbus-property" generated="True" extra-ref="IdleAction"/>
464
465 <variablelist class="dbus-property" generated="True" extra-ref="IdleActionUSec"/>
466
467 <variablelist class="dbus-property" generated="True" extra-ref="PreparingForShutdown"/>
468
469 <variablelist class="dbus-property" generated="True" extra-ref="PreparingForSleep"/>
470
471 <variablelist class="dbus-property" generated="True" extra-ref="ScheduledShutdown"/>
472
473 <variablelist class="dbus-property" generated="True" extra-ref="Docked"/>
474
475 <variablelist class="dbus-property" generated="True" extra-ref="LidClosed"/>
476
477 <variablelist class="dbus-property" generated="True" extra-ref="OnExternalPower"/>
478
479 <variablelist class="dbus-property" generated="True" extra-ref="RemoveIPC"/>
480
481 <variablelist class="dbus-property" generated="True" extra-ref="RuntimeDirectorySize"/>
482
483 <variablelist class="dbus-property" generated="True" extra-ref="RuntimeDirectoryInodesMax"/>
484
485 <variablelist class="dbus-property" generated="True" extra-ref="InhibitorsMax"/>
486
487 <variablelist class="dbus-property" generated="True" extra-ref="NCurrentInhibitors"/>
488
489 <variablelist class="dbus-property" generated="True" extra-ref="SessionsMax"/>
490
491 <variablelist class="dbus-property" generated="True" extra-ref="NCurrentSessions"/>
492
493 <!--End of Autogenerated section-->
494
495 <refsect2>
496 <title>Methods</title>
497
498 <para><function>GetSession()</function> may be used to get the session object path for the session with
499 the specified ID. Similarly, <function>GetUser()</function> and <function>GetSeat()</function> get the
500 user and seat objects, respectively. <function>GetSessionByPID()</function> and
501 <function>GetUserByPID()</function> get the session/user object the specified PID belongs to if there
502 is any.</para>
503
504 <para><function>ListSessions()</function> returns an array of all current sessions. The structures in
505 the array consist of the following fields: session id, user id, user name, seat id, session object
506 path. If a session does not have a seat attached, the seat id field will be an empty string.</para>
507
508 <para><function>ListUsers()</function> returns an array of all currently logged in users. The
509 structures in the array consist of the following fields: user id, user name, user object path.</para>
510
511 <para><function>ListSeats()</function> returns an array of all currently available seats. The
512 structure in the array consists of the following fields: seat id, seat object path.</para>
513
514 <para><function>ListInhibitors()</function> lists all currently active inhibitors. It returns an array of
515 structures consisting of <varname>what</varname>, <varname>who</varname>, <varname>why</varname>,
516 <varname>mode</varname>, <varname>uid</varname> (user ID), and <varname>pid</varname> (process ID).</para>
517
518 <para><function>CreateSession()</function> and <function>ReleaseSession()</function> may be used to
519 open or close login sessions. These calls should <emphasis>never</emphasis> be invoked directly by
520 clients. Creating/closing sessions is exclusively the job of PAM and its
521 <citerefentry><refentrytitle>pam_systemd</refentrytitle><manvolnum>8</manvolnum></citerefentry>
522 module.</para>
523
524 <para><function>ActivateSession()</function> brings the session with the specified ID into the
525 foreground. <function>ActivateSessionOnSeat()</function> does the same, but only if the seat id
526 matches.</para>
527
528 <para><function>LockSession()</function> asks the session with the specified ID to activate the screen
529 lock. <function>UnlockSession()</function> asks the session with the specified ID to remove an active
530 screen lock, if there is any. This is implemented by sending out the Lock() and Unlock() signals from
531 the respective session object which session managers are supposed to listen on.</para>
532
533 <para><function>LockSessions()</function> asks all sessions to activate their screen locks. This may be
534 used to lock access to the entire machine in one action. Similarly, <function>UnlockSessions()</function>
535 asks all sessions to deactivate their screen locks.</para>
536
537 <para><function>KillSession()</function> may be used to send a Unix signal to one or all processes of a
538 session. As arguments it takes the session id, either the string <literal>leader</literal> or
539 <literal>all</literal> and a signal number. If <literal>leader</literal> is passed only the session
540 <literal>leader</literal> is killed. If <literal>all</literal> is passed all processes of the session
541 are killed.</para>
542
543 <para><function>KillUser()</function> may be used to send a Unix signal to all processes of a user. As
544 arguments it takes the user id and a signal number.</para>
545
546 <para><function>TerminateSession()</function>, <function>TerminateUser()</function>,
547 <function>TerminateSeat()</function> may be used to forcibly terminate one specific session, all
548 processes of a user, and all sessions attached to a specific seat, respectively. The session, user,
549 and seat are identified by their respective IDs.</para>
550
551 <para><function>SetUserLinger()</function> enables or disables user lingering. If enabled, the runtime
552 directory of a user is kept around and they may continue to run processes while logged out. If
553 disabled, the runtime directory goes away as soon as they log out. <function>SetUserLinger()</function>
554 expects three arguments: the UID, a boolean whether to enable/disable and a boolean controlling the
555 <ulink url="https://www.freedesktop.org/software/polkit/docs/latest/">polkit</ulink>
556 authorization interactivity (see below). Note that the user linger state is persistently
557 stored on disk.</para>
558
559 <para><function>AttachDevice()</function> may be used to assign a specific device to a specific
560 seat. The device is identified by its <filename>/sys/</filename> path and must be eligible for seat
561 assignments. <function>AttachDevice()</function> takes three arguments: the seat id, the sysfs path,
562 and a boolean for controlling polkit interactivity (see below). Device assignments are persistently
563 stored on disk. To create a new seat, simply specify a previously unused seat id. For more information
564 about the seat assignment logic see
565 <citerefentry><refentrytitle>sd-login</refentrytitle><manvolnum>3</manvolnum></citerefentry>.</para>
566
567 <para><function>FlushDevices()</function> removes all explicit seat assignments for devices, resetting
568 all assignments to the automatic defaults. The only argument it takes is the polkit interactivity
569 boolean (see below).</para>
570
571 <para><function>PowerOff()</function>, <function>Reboot()</function>, <function>Halt()</function>,
572 <function>Suspend()</function>, and <function>Hibernate()</function> result in the system being powered
573 off, rebooted, halted (shut down without turning off power), suspended (the system state is
574 saved to RAM and the CPU is turned off), or hibernated (the system state is saved to disk and
575 the machine is powered down). <function>HybridSleep()</function> results in the system entering a
576 hybrid-sleep mode, i.e. the system is both hibernated and suspended.
577 <function>SuspendThenHibernate()</function> results in the system being suspended, then later woken
578 using an RTC timer and hibernated. The only argument is the polkit interactivity boolean
579 <varname>interactive</varname> (see below). The main purpose of these calls is that they enforce
580 polkit policy and hence allow powering off/rebooting/suspending/hibernating even by unprivileged
581 users. They also enforce inhibition locks for non-privileged users. UIs should expose these calls
582 as the primary mechanism to poweroff/reboot/suspend/hibernate the machine. Methods
583 <function>PowerOffWithFlags()</function>, <function>RebootWithFlags()</function>,
584 <function>HaltWithFlags()</function>, <function>SuspendWithFlags()</function>,
585 <function>HibernateWithFlags()</function>, <function>HybridSleepWithFlags()</function> and
586 <function>SuspendThenHibernateWithFlags()</function> add <varname>flags</varname> to allow for
587 extendability, defined as follows:</para>
588 <programlisting>
589 #define SD_LOGIND_ROOT_CHECK_INHIBITORS (UINT64_C(1) &lt;&lt; 0)
590 #define SD_LOGIND_KEXEC_REBOOT (UINT64_C(1) &lt;&lt; 1)
591 </programlisting>
592 <para> When the <varname>flags</varname> is 0 then these methods behave just like the versions
593 without flags. When <constant>SD_LOGIND_ROOT_CHECK_INHIBITORS</constant> (0x01) is set, active
594 inhibitors are honoured for privileged users too. When <constant>SD_LOGIND_KEXEC_REBOOT</constant>
595 (0x02) is set, then <function>RebootWithFlags()</function> perform kexec reboot if kexec
596 kernel is loaded.</para>
597
598 <para><function>SetRebootParameter()</function> sets a parameter for a subsequent reboot operation.
599 See the description of <command>reboot</command> in
600 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> and
601 <citerefentry project="man-pages"><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
602 for more information.</para>
603
604 <para><function>SetRebootToFirmwareSetup()</function>,
605 <function>SetRebootToBootLoaderMenu()</function>, and <function>SetRebootToBootLoaderEntry()</function>
606 configure the action to be taken from the boot loader after a reboot: respectively entering firmware
607 setup mode, the boot loader menu, or a specific boot loader entry. See
608 <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry> for the
609 corresponding command line interface.</para>
610
611 <para><function>CanPowerOff()</function>, <function>CanReboot()</function>,
612 <function>CanHalt()</function>, <function>CanSuspend()</function>, <function>CanHibernate()</function>,
613 <function>CanHybridSleep()</function>, <function>CanSuspendThenHibernate()</function>,
614 <function>CanRebootParameter()</function>, <function>CanRebootToFirmwareSetup()</function>,
615 <function>CanRebootToBootLoaderMenu()</function>, and
616 <function>CanRebootToBootLoaderEntry()</function> test whether the system supports the respective
617 operation and whether the calling user is allowed to execute it. Returns one of <literal>na</literal>,
618 <literal>yes</literal>, <literal>no</literal>, and <literal>challenge</literal>. If
619 <literal>na</literal> is returned, the operation is not available because hardware, kernel, or drivers
620 do not support it. If <literal>yes</literal> is returned, the operation is supported and the user may
621 execute the operation without further authentication. If <literal>no</literal> is returned, the
622 operation is available but the user is not allowed to execute the operation. If
623 <literal>challenge</literal> is returned, the operation is available but only after
624 authorization.</para>
625
626 <para><function>ScheduleShutdown()</function> schedules a shutdown operation <varname>type</varname> at
627 time <varname>usec</varname> in microseconds since the UNIX epoch. <varname>type</varname> can be one
628 of <literal>poweroff</literal>, <literal>dry-poweroff</literal>, <literal>reboot</literal>,
629 <literal>dry-reboot</literal>, <literal>halt</literal>, and <literal>dry-halt</literal>. (The
630 <literal>dry-</literal> variants do not actually execute the shutdown action.)
631 <function>CancelScheduledShutdown()</function> cancels a scheduled shutdown. The output parameter
632 <varname>cancelled</varname> is true if a shutdown operation was scheduled.</para>
633
634 <para><function>SetWallMessage()</function> sets the wall message (the message that will be sent out to
635 all terminals and stored in a
636 <citerefentry project="man-pages"><refentrytitle>utmp</refentrytitle><manvolnum>5</manvolnum></citerefentry> record) for a
637 subsequent scheduled shutdown operation. The parameter <varname>wall_message</varname> specifies the
638 shutdown reason (and may be empty) which will be included in the shutdown message. The parameter
639 <varname>enable</varname> specifies whether to print a wall message on shutdown.</para>
640
641 <para><function>Inhibit()</function> creates an inhibition lock. It takes four parameters:
642 <varname>what</varname>, <varname>who</varname>, <varname>why</varname>, and
643 <varname>mode</varname>. <varname>what</varname> is one or more of <literal>shutdown</literal>,
644 <literal>sleep</literal>, <literal>idle</literal>, <literal>handle-power-key</literal>,
645 <literal>handle-suspend-key</literal>, <literal>handle-hibernate-key</literal>,
646 <literal>handle-lid-switch</literal>, separated by colons, for inhibiting poweroff/reboot,
647 suspend/hibernate, the automatic idle logic, or hardware key handling. <varname>who</varname> should be
648 a short human readable string identifying the application taking the lock. <varname>why</varname>
649 should be a short human readable string identifying the reason why the lock is taken. Finally,
650 <varname>mode</varname> is either <literal>block</literal> or <literal>delay</literal> which encodes
651 whether the inhibit shall be consider mandatory or whether it should just delay the operation to a
652 certain maximum time. The method returns a file descriptor. The lock is released the moment this file
653 descriptor and all its duplicates are closed. For more information on the inhibition logic see
654 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
655 </para>
656 </refsect2>
657
658 <refsect2>
659 <title>Signals</title>
660
661 <para>Whenever the inhibition state or idle hint changes, <function>PropertyChanged</function>
662 signals are sent out to which clients can subscribe.</para>
663
664 <para>The <function>SessionNew</function>, <function>SessionRemoved</function>,
665 <function>UserNew</function>, <function>UserRemoved</function>, <function>SeatNew</function>, and
666 <function>SeatRemoved</function> signals are sent each time a session is created or removed, a user
667 logs in or out, or a seat is added or removed. They each contain the ID of the object plus the object
668 path.</para>
669
670 <para>The <function>PrepareForShutdown()</function> and <function>PrepareForSleep()</function> signals
671 are sent right before (with the argument <literal>true</literal>) or after (with the argument
672 <literal>false</literal>) the system goes down for reboot/poweroff and suspend/hibernate,
673 respectively. This may be used by applications to save data on disk, release memory, or do other jobs
674 that should be done shortly before shutdown/sleep, in conjunction with delay inhibitor locks. After
675 completion of this work they should release their inhibition locks in order to not delay the operation
676 any further. For more information see
677 <ulink url="https://www.freedesktop.org/wiki/Software/systemd/inhibit">Inhibitor Locks</ulink>.
678 </para>
679 </refsect2>
680
681 <refsect2>
682 <title>Properties</title>
683
684 <para>Most properties simply reflect the configuration, see
685 <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>. This
686 includes: <varname>NAutoVTs</varname>, <varname>KillOnlyUsers</varname>,
687 <varname>KillExcludeUsers</varname>, <varname>KillUserProcesses</varname>, <varname>IdleAction</varname>,
688 <varname>InhibitDelayMaxUSec</varname>,
689 <varname>InhibitorsMax</varname>,
690 <varname>UserStopDelayUSec</varname>,
691 <varname>HandlePowerKey</varname>, <varname>HandleSuspendKey</varname>,
692 <varname>HandleHibernateKey</varname>, <varname>HandleLidSwitch</varname>,
693 <varname>HandleLidSwitchExternalPower</varname>, <varname>HandleLidSwitchDocked</varname>,
694 <varname>IdleActionUSec</varname>, <varname>HoldoffTimeoutUSec</varname>,
695 <varname>RemoveIPC</varname>, <varname>RuntimeDirectorySize</varname>,
696 <varname>RuntimeDirectoryInodesMax</varname>, <varname>InhibitorsMax</varname>, and
697 <varname>SessionsMax</varname>.
698 </para>
699
700 <para>The <varname>IdleHint</varname> property reflects the idle hint state of the system. If the
701 system is idle it might get into automatic suspend or shutdown depending on the configuration.</para>
702
703 <para><varname>IdleSinceHint</varname> and <varname>IdleSinceHintMonotonic</varname> encode the
704 timestamps of the last change of the idle hint boolean, in <constant>CLOCK_REALTIME</constant> and
705 <constant>CLOCK_MONOTONIC</constant> timestamps, respectively, in microseconds since the epoch.</para>
706
707 <para>The <varname>BlockInhibited</varname> and <varname>DelayInhibited</varname> properties encode
708 the currently active locks of the respective modes. They are colon separated lists of
709 <literal>shutdown</literal>, <literal>sleep</literal>, and <literal>idle</literal> (see above).</para>
710
711 <para><varname>NCurrentSessions</varname> and <varname>NCurrentInhibitors</varname> contain the number
712 of currently registered sessions and inhibitors.</para>
713
714 <para>The <varname>BootLoaderEntries</varname> property contains a list of boot loader entries.
715 This includes boot loader entries defined in configuration and any additional loader entries
716 reported by the boot loader. See
717 <citerefentry><refentrytitle>systemd-boot</refentrytitle><manvolnum>7</manvolnum></citerefentry>
718 for more information.</para>
719
720 <para>The <varname>PreparingForShutdown</varname> and <varname>PreparingForSleep</varname> boolean
721 properties are true during the interval between the two <function>PrepareForShutdown</function> and
722 <function>PrepareForSleep</function> signals respectively. Note that these properties do not
723 send out <function>PropertyChanged</function> signals.</para>
724
725 <para>The <varname>RebootParameter</varname> property shows the value set with the
726 <function>SetRebootParameter()</function> method described above.</para>
727
728 <para><varname>ScheduledShutdown</varname> shows the value pair set with the
729 <function>ScheduleShutdown()</function> method described above.</para>
730
731 <para><varname>RebootToFirmwareSetup</varname>, <varname>RebootToBootLoaderMenu</varname>, and
732 <varname>RebootToBootLoaderEntry</varname> are true when the resprective post-reboot operation was
733 selected with <function>SetRebootToFirmwareSetup</function>,
734 <function>SetRebootToBootLoaderMenu</function>, or
735 <function>SetRebootToBootLoaderEntry</function>.</para>
736
737 <para>The <varname>WallMessage</varname> and <varname>EnableWallMessages</varname> properties reflect the
738 shutdown reason and wall message enablement switch which can be set with the
739 <function>SetWallMessage()</function> method described above.</para>
740
741 <para><varname>Docked</varname> is true if the machine is connected to a dock.
742 <varname>LidClosed</varname> is true when the lid (of a laptop) is closed.
743 <varname>OnExternalPower</varname> is true when the machine is connected to an external power supply.
744 </para>
745 </refsect2>
746
747 <refsect2>
748 <title>Security</title>
749
750 <para>A number of operations are protected via the polkit privilege
751 system. <function>SetUserLinger()</function> requires the
752 <interfacename>org.freedesktop.login1.set-user-linger</interfacename>
753 privilege. <function>AttachDevice()</function> requires
754 <interfacename>org.freedesktop.login1.attach-device</interfacename> and
755 <function>FlushDevices()</function> requires
756 <interfacename>org.freedesktop.login1.flush-devices</interfacename>. <function>PowerOff()</function>,
757 <function>Reboot()</function>, <function>Halt()</function>, <function>Suspend()</function>,
758 <function>Hibernate()</function> require
759 <interfacename>org.freedesktop.login1.power-off</interfacename>,
760 <interfacename>org.freedesktop.login1.power-off-multiple-sessions</interfacename>,
761 <interfacename>org.freedesktop.login1.power-off-ignore-inhibit</interfacename>,
762 <interfacename>org.freedesktop.login1.reboot</interfacename>,
763 <interfacename>org.freedesktop.login1.reboot-multiple-sessions</interfacename>,
764 <interfacename>org.freedesktop.login1.reboot-ignore-inhibit</interfacename>,
765 <interfacename>org.freedesktop.login1.halt</interfacename>,
766 <interfacename>org.freedesktop.login1.halt-multiple-sessions</interfacename>,
767 <interfacename>org.freedesktop.login1.halt-ignore-inhibit</interfacename>,
768 <interfacename>org.freedesktop.login1.suspend</interfacename>,
769 <interfacename>org.freedesktop.login1.suspend-multiple-sessions</interfacename>,
770 <interfacename>org.freedesktop.login1.suspend-ignore-inhibit</interfacename>,
771 <interfacename>org.freedesktop.login1.hibernate</interfacename>,
772 <interfacename>org.freedesktop.login1.hibernate-multiple-sessions</interfacename>,
773 <interfacename>org.freedesktop.login1.hibernate-ignore-inhibit</interfacename>,
774 respectively depending on whether there are other sessions around or active inhibits are present.
775 <function>HybridSleep()</function> and <function>SuspendThenHibernate()</function>
776 use the same privileges as <function>Hibernate()</function>.
777 <function>SetRebootParameter()</function> requires
778 <interfacename>org.freedesktop.login1.set-reboot-parameter</interfacename>.</para>
779
780 <para><function>SetRebootToFirmwareSetup</function> requires
781 <interfacename>org.freedesktop.login1.set-reboot-to-firmware-setup</interfacename>.
782 <function>SetRebootToBootLoaderMenu</function> requires
783 <interfacename>org.freedesktop.login1.set-reboot-to-boot-loader-menu</interfacename>.
784 <function>SetRebootToBootLoaderEntry</function> requires
785 <interfacename>org.freedesktop.login1.set-reboot-to-boot-loader-entry</interfacename>.
786 </para>
787
788 <para><function>ScheduleShutdown</function> and <function>CancelScheduledShutdown</function> require
789 the same privileges (listed above) as the immediate poweroff/reboot/halt operations.</para>
790
791 <para><function>Inhibit()</function> is protected via one of
792 <interfacename>org.freedesktop.login1.inhibit-block-shutdown</interfacename>,
793 <interfacename>org.freedesktop.login1.inhibit-delay-shutdown</interfacename>,
794 <interfacename>org.freedesktop.login1.inhibit-block-sleep</interfacename>,
795 <interfacename>org.freedesktop.login1.inhibit-delay-sleep</interfacename>,
796 <interfacename>org.freedesktop.login1.inhibit-block-idle</interfacename>,
797 <interfacename>org.freedesktop.login1.inhibit-handle-power-key</interfacename>,
798 <interfacename>org.freedesktop.login1.inhibit-handle-suspend-key</interfacename>,
799 <interfacename>org.freedesktop.login1.inhibit-handle-hibernate-key</interfacename>,
800 <interfacename>org.freedesktop.login1.inhibit-handle-lid-switch</interfacename> depending on the lock
801 type and mode taken.</para>
802
803 <para>The <varname>interactive</varname> boolean parameters can be used to control whether polkit
804 should interactively ask the user for authentication credentials if required.</para>
805 </refsect2>
806 </refsect1>
807
808 <refsect1>
809 <title>Seat Objects</title>
810
811 <programlisting executable="systemd-logind" node="/org/freedesktop/login1/seat/seat0" interface="org.freedesktop.login1.Seat">
812 node /org/freedesktop/login1/seat/seat0 {
813 interface org.freedesktop.login1.Seat {
814 methods:
815 Terminate();
816 ActivateSession(in s session_id);
817 SwitchTo(in u vtnr);
818 SwitchToNext();
819 SwitchToPrevious();
820 properties:
821 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
822 readonly s Id = '...';
823 readonly (so) ActiveSession = ...;
824 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
825 readonly b CanTTY = ...;
826 readonly b CanGraphical = ...;
827 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
828 readonly a(so) Sessions = [...];
829 readonly b IdleHint = ...;
830 readonly t IdleSinceHint = ...;
831 readonly t IdleSinceHintMonotonic = ...;
832 };
833 interface org.freedesktop.DBus.Peer { ... };
834 interface org.freedesktop.DBus.Introspectable { ... };
835 interface org.freedesktop.DBus.Properties { ... };
836 };
837 </programlisting>
838
839 <!--Autogenerated cross-references for systemd.directives, do not edit-->
840
841 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Seat"/>
842
843 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Seat"/>
844
845 <variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
846
847 <variablelist class="dbus-method" generated="True" extra-ref="ActivateSession()"/>
848
849 <variablelist class="dbus-method" generated="True" extra-ref="SwitchTo()"/>
850
851 <variablelist class="dbus-method" generated="True" extra-ref="SwitchToNext()"/>
852
853 <variablelist class="dbus-method" generated="True" extra-ref="SwitchToPrevious()"/>
854
855 <variablelist class="dbus-property" generated="True" extra-ref="Id"/>
856
857 <variablelist class="dbus-property" generated="True" extra-ref="ActiveSession"/>
858
859 <variablelist class="dbus-property" generated="True" extra-ref="CanTTY"/>
860
861 <variablelist class="dbus-property" generated="True" extra-ref="CanGraphical"/>
862
863 <variablelist class="dbus-property" generated="True" extra-ref="Sessions"/>
864
865 <variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
866
867 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
868
869 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
870
871 <!--End of Autogenerated section-->
872
873 <refsect2>
874 <title>Methods</title>
875
876 <para><function>Terminate()</function> and <function>ActivateSession()</function> work similar to
877 TerminateSeat(), ActivationSessionOnSeat() on the Manager object.</para>
878
879 <para><function>SwitchTo()</function> switches to the session on the virtual terminal
880 <varname>vtnr</varname>. <function>SwitchToNext()</function> and
881 <function>SwitchToPrevious()</function> switch to, respectively, the next and previous sessions on the
882 seat in the order of virtual terminals. If there is no active session, they switch to, respectively,
883 the first and last session on the seat.</para>
884 </refsect2>
885
886 <refsect2>
887 <title>Signals</title>
888
889 <para>Whenever <function>ActiveSession</function>, <function>Sessions</function>,
890 <function>CanGraphical</function>, <function>CanTTY</function>,
891 or the idle state changes, <function>PropertyChanged</function> signals are sent out to which clients
892 can subscribe.</para>
893 </refsect2>
894
895 <refsect2>
896 <title>Properties</title>
897
898 <para>The <varname>Id</varname> property encodes the ID of the seat.</para>
899
900 <para><varname>ActiveSession</varname> encodes the currently active session if there is one. It is a
901 structure consisting of the session id and the object path.</para>
902
903 <para><varname>CanTTY</varname> encodes whether the session is suitable for text logins, and
904 <varname>CanGraphical</varname> whether it is suitable for graphical sessions.</para>
905
906 <para>The <varname>Sessions</varname> property is an array of all current sessions of this seat, each
907 encoded in a structure consisting of the ID and the object path.</para>
908
909 <para>The <varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
910 <varname>IdleSinceHintMonotonic</varname> properties encode the idle state, similar to the ones exposed
911 on the <interfacename>Manager</interfacename> object, but specific for this seat.</para>
912 </refsect2>
913 </refsect1>
914
915 <refsect1>
916 <title>User Objects</title>
917
918 <programlisting executable="systemd-logind" node="/org/freedesktop/login1/user/_1000" interface="org.freedesktop.login1.User">
919 node /org/freedesktop/login1/user/_1000 {
920 interface org.freedesktop.login1.User {
921 methods:
922 Terminate();
923 Kill(in i signal_number);
924 properties:
925 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
926 readonly u UID = ...;
927 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
928 readonly u GID = ...;
929 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
930 readonly s Name = '...';
931 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
932 readonly t Timestamp = ...;
933 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
934 readonly t TimestampMonotonic = ...;
935 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
936 readonly s RuntimePath = '...';
937 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
938 readonly s Service = '...';
939 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
940 readonly s Slice = '...';
941 readonly (so) Display = ...;
942 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
943 readonly s State = '...';
944 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
945 readonly a(so) Sessions = [...];
946 readonly b IdleHint = ...;
947 readonly t IdleSinceHint = ...;
948 readonly t IdleSinceHintMonotonic = ...;
949 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
950 readonly b Linger = ...;
951 };
952 interface org.freedesktop.DBus.Peer { ... };
953 interface org.freedesktop.DBus.Introspectable { ... };
954 interface org.freedesktop.DBus.Properties { ... };
955 };
956 </programlisting>
957
958 <!--Autogenerated cross-references for systemd.directives, do not edit-->
959
960 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.User"/>
961
962 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.User"/>
963
964 <variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
965
966 <variablelist class="dbus-method" generated="True" extra-ref="Kill()"/>
967
968 <variablelist class="dbus-property" generated="True" extra-ref="UID"/>
969
970 <variablelist class="dbus-property" generated="True" extra-ref="GID"/>
971
972 <variablelist class="dbus-property" generated="True" extra-ref="Name"/>
973
974 <variablelist class="dbus-property" generated="True" extra-ref="Timestamp"/>
975
976 <variablelist class="dbus-property" generated="True" extra-ref="TimestampMonotonic"/>
977
978 <variablelist class="dbus-property" generated="True" extra-ref="RuntimePath"/>
979
980 <variablelist class="dbus-property" generated="True" extra-ref="Service"/>
981
982 <variablelist class="dbus-property" generated="True" extra-ref="Slice"/>
983
984 <variablelist class="dbus-property" generated="True" extra-ref="Display"/>
985
986 <variablelist class="dbus-property" generated="True" extra-ref="State"/>
987
988 <variablelist class="dbus-property" generated="True" extra-ref="Sessions"/>
989
990 <variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
991
992 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
993
994 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
995
996 <variablelist class="dbus-property" generated="True" extra-ref="Linger"/>
997
998 <!--End of Autogenerated section-->
999
1000 <refsect2>
1001 <title>Methods</title>
1002
1003 <para><function>Terminate()</function> and <function>Kill()</function> work similar to the
1004 <function>TerminateUser()</function> and <function>KillUser()</function> methods on the manager
1005 object.</para>
1006 </refsect2>
1007
1008 <refsect2>
1009 <title>Signals</title>
1010
1011 <para>Whenever <varname>Sessions</varname> or the idle state changes,
1012 <function>PropertyChanged</function> signals are sent out to which clients can subscribe.</para>
1013 </refsect2>
1014
1015 <refsect2>
1016 <title>Properties</title>
1017
1018 <para>The <varname>UID</varname> and <varname>GID</varname> properties encode the Unix UID and primary
1019 GID of the user.</para>
1020
1021 <para>The <varname>Name</varname> property encodes the user name.</para>
1022
1023 <para><varname>Timestamp</varname> and <varname>TimestampMonotonic</varname> encode the login time of
1024 the user in microseconds since the epoch, in the <constant>CLOCK_REALTIME</constant> and
1025 <constant>CLOCK_MONOTONIC</constant> clocks, respectively.</para>
1026
1027 <para><varname>RuntimePath</varname> encodes the runtime path of the user,
1028 i.e. <varname>$XDG_RUNTIME_DIR</varname>. For details see the
1029 <ulink url="https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html">
1030 XDG Basedir Specification
1031 </ulink>.</para>
1032
1033 <para><varname>Service</varname> contains the unit name of the user systemd service of this
1034 user. Each logged in user is assigned a user service that runs a user systemd instance. This is
1035 usually an instance of <filename>user@.service</filename>.</para>
1036
1037 <para><varname>Slice</varname> contains the unit name of the user systemd slice of this user. Each
1038 logged in user gets a private slice.</para>
1039
1040 <para><varname>Display</varname> encodes which graphical session should be used as the primary UI display
1041 for the user. It is a structure encoding the session ID and the object path of the session to use.</para>
1042
1043 <para><varname>State</varname> encodes the user state and is one of <literal>offline</literal>,
1044 <literal>lingering</literal>, <literal>online</literal>, <literal>active</literal>, or
1045 <literal>closing</literal>. See
1046 <citerefentry><refentrytitle>sd_uid_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>
1047 for more information about the states.</para>
1048
1049 <para><varname>Sessions</varname> is an array of structures encoding all current sessions of the
1050 user. Each structure consists of the ID and object path.</para>
1051
1052 <para>The <varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
1053 <varname>IdleSinceHintMonotonic</varname> properties encode the idle hint state of the user, similar to
1054 the <interfacename>Manager</interfacename>'s properties, but specific for this user.</para>
1055
1056 <para>The <varname>Linger</varname> property shows whether lingering is enabled for this user.</para>
1057 </refsect2>
1058 </refsect1>
1059
1060 <refsect1>
1061 <title>Session Objects</title>
1062
1063 <programlisting executable="systemd-logind" node="/org/freedesktop/login1/session/1" interface="org.freedesktop.login1.Session">
1064 node /org/freedesktop/login1/session/1 {
1065 interface org.freedesktop.login1.Session {
1066 methods:
1067 Terminate();
1068 Activate();
1069 Lock();
1070 Unlock();
1071 SetIdleHint(in b idle);
1072 SetLockedHint(in b locked);
1073 Kill(in s who,
1074 in i signal_number);
1075 TakeControl(in b force);
1076 ReleaseControl();
1077 SetType(in s type);
1078 TakeDevice(in u major,
1079 in u minor,
1080 out h fd,
1081 out b inactive);
1082 ReleaseDevice(in u major,
1083 in u minor);
1084 PauseDeviceComplete(in u major,
1085 in u minor);
1086 SetBrightness(in s subsystem,
1087 in s name,
1088 in u brightness);
1089 signals:
1090 PauseDevice(u major,
1091 u minor,
1092 s type);
1093 ResumeDevice(u major,
1094 u minor,
1095 h fd);
1096 Lock();
1097 Unlock();
1098 properties:
1099 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1100 readonly s Id = '...';
1101 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1102 readonly (uo) User = ...;
1103 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1104 readonly s Name = '...';
1105 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1106 readonly t Timestamp = ...;
1107 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1108 readonly t TimestampMonotonic = ...;
1109 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1110 readonly u VTNr = ...;
1111 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1112 readonly (so) Seat = ...;
1113 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1114 readonly s TTY = '...';
1115 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1116 readonly s Display = '...';
1117 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1118 readonly b Remote = ...;
1119 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1120 readonly s RemoteHost = '...';
1121 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1122 readonly s RemoteUser = '...';
1123 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1124 readonly s Service = '...';
1125 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1126 readonly s Desktop = '...';
1127 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1128 readonly s Scope = '...';
1129 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1130 readonly u Leader = ...;
1131 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1132 readonly u Audit = ...;
1133 readonly s Type = '...';
1134 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
1135 readonly s Class = '...';
1136 readonly b Active = ...;
1137 readonly s State = '...';
1138 readonly b IdleHint = ...;
1139 readonly t IdleSinceHint = ...;
1140 readonly t IdleSinceHintMonotonic = ...;
1141 readonly b LockedHint = ...;
1142 };
1143 interface org.freedesktop.DBus.Peer { ... };
1144 interface org.freedesktop.DBus.Introspectable { ... };
1145 interface org.freedesktop.DBus.Properties { ... };
1146 };
1147 </programlisting>
1148
1149 <!--Autogenerated cross-references for systemd.directives, do not edit-->
1150
1151 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Session"/>
1152
1153 <variablelist class="dbus-interface" generated="True" extra-ref="org.freedesktop.login1.Session"/>
1154
1155 <variablelist class="dbus-method" generated="True" extra-ref="Terminate()"/>
1156
1157 <variablelist class="dbus-method" generated="True" extra-ref="Activate()"/>
1158
1159 <variablelist class="dbus-method" generated="True" extra-ref="Lock()"/>
1160
1161 <variablelist class="dbus-method" generated="True" extra-ref="Unlock()"/>
1162
1163 <variablelist class="dbus-method" generated="True" extra-ref="SetIdleHint()"/>
1164
1165 <variablelist class="dbus-method" generated="True" extra-ref="SetLockedHint()"/>
1166
1167 <variablelist class="dbus-method" generated="True" extra-ref="Kill()"/>
1168
1169 <variablelist class="dbus-method" generated="True" extra-ref="TakeControl()"/>
1170
1171 <variablelist class="dbus-method" generated="True" extra-ref="ReleaseControl()"/>
1172
1173 <variablelist class="dbus-method" generated="True" extra-ref="SetType()"/>
1174
1175 <variablelist class="dbus-method" generated="True" extra-ref="TakeDevice()"/>
1176
1177 <variablelist class="dbus-method" generated="True" extra-ref="ReleaseDevice()"/>
1178
1179 <variablelist class="dbus-method" generated="True" extra-ref="PauseDeviceComplete()"/>
1180
1181 <variablelist class="dbus-method" generated="True" extra-ref="SetBrightness()"/>
1182
1183 <variablelist class="dbus-signal" generated="True" extra-ref="PauseDevice"/>
1184
1185 <variablelist class="dbus-signal" generated="True" extra-ref="ResumeDevice"/>
1186
1187 <variablelist class="dbus-signal" generated="True" extra-ref="Lock"/>
1188
1189 <variablelist class="dbus-signal" generated="True" extra-ref="Unlock"/>
1190
1191 <variablelist class="dbus-property" generated="True" extra-ref="Id"/>
1192
1193 <variablelist class="dbus-property" generated="True" extra-ref="User"/>
1194
1195 <variablelist class="dbus-property" generated="True" extra-ref="Name"/>
1196
1197 <variablelist class="dbus-property" generated="True" extra-ref="Timestamp"/>
1198
1199 <variablelist class="dbus-property" generated="True" extra-ref="TimestampMonotonic"/>
1200
1201 <variablelist class="dbus-property" generated="True" extra-ref="VTNr"/>
1202
1203 <variablelist class="dbus-property" generated="True" extra-ref="Seat"/>
1204
1205 <variablelist class="dbus-property" generated="True" extra-ref="TTY"/>
1206
1207 <variablelist class="dbus-property" generated="True" extra-ref="Display"/>
1208
1209 <variablelist class="dbus-property" generated="True" extra-ref="Remote"/>
1210
1211 <variablelist class="dbus-property" generated="True" extra-ref="RemoteHost"/>
1212
1213 <variablelist class="dbus-property" generated="True" extra-ref="RemoteUser"/>
1214
1215 <variablelist class="dbus-property" generated="True" extra-ref="Service"/>
1216
1217 <variablelist class="dbus-property" generated="True" extra-ref="Desktop"/>
1218
1219 <variablelist class="dbus-property" generated="True" extra-ref="Scope"/>
1220
1221 <variablelist class="dbus-property" generated="True" extra-ref="Leader"/>
1222
1223 <variablelist class="dbus-property" generated="True" extra-ref="Audit"/>
1224
1225 <variablelist class="dbus-property" generated="True" extra-ref="Type"/>
1226
1227 <variablelist class="dbus-property" generated="True" extra-ref="Class"/>
1228
1229 <variablelist class="dbus-property" generated="True" extra-ref="Active"/>
1230
1231 <variablelist class="dbus-property" generated="True" extra-ref="State"/>
1232
1233 <variablelist class="dbus-property" generated="True" extra-ref="IdleHint"/>
1234
1235 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHint"/>
1236
1237 <variablelist class="dbus-property" generated="True" extra-ref="IdleSinceHintMonotonic"/>
1238
1239 <variablelist class="dbus-property" generated="True" extra-ref="LockedHint"/>
1240
1241 <!--End of Autogenerated section-->
1242
1243 <refsect2>
1244 <title>Methods</title>
1245
1246 <para><function>Terminate()</function>, <function>Activate()</function>, <function>Lock()</function>,
1247 <function>Unlock()</function>, and <function>Kill()</function> work similarly to the respective calls on
1248 the <interfacename>Manager</interfacename> object.</para>
1249
1250 <para><function>SetIdleHint()</function> is called by the session object to update the idle state
1251 of the session whenever it changes.</para>
1252
1253 <para><function>TakeControl()</function> allows a process to take exclusive managed device
1254 access-control for that session. Only one D-Bus connection can be a controller for a given session at any
1255 time. If the <varname>force</varname> argument is set (root only), an existing controller is kicked
1256 out and replaced. Otherwise, this method fails if there is already a controller. Note that this method is
1257 limited to D-Bus users with the effective UID set to the user of the session or root.</para>
1258
1259 <para><function>ReleaseControl()</function> drops control of a given session. Closing the D-Bus
1260 connection implicitly releases control as well. See <function>TakeControl()</function> for more
1261 information. This method also releases all devices for which the controller requested ownership via
1262 <function>TakeDevice()</function>.</para>
1263
1264 <para><function>SetType()</function> allows the type of the session to be changed dynamically. It can
1265 only be called by session's current controller. If <function>TakeControl()</function> has not been
1266 called, this method will fail. In addition, the session type will be reset to its original value once
1267 control is released, either by calling <function>ReleaseControl()</function> or closing the D-Bus
1268 connection. This should help prevent a session from entering an inconsistent state, for example if the
1269 controller crashes. The only argument <varname>type</varname> is the new session type.</para>
1270
1271 <para><function>TakeDevice()</function> allows a session controller to get a file descriptor for a
1272 specific device. Pass in the major and minor numbers of the character device and
1273 <filename>systemd-logind</filename> will return a file descriptor for the device. Only a limited set of
1274 device-types is currently supported (but may be extended). <filename>systemd-logind</filename>
1275 automatically mutes the file descriptor if the session is inactive and resumes it once the session is
1276 activated again. This guarantees that a session can only access session devices if the session is
1277 active. Note that this revoke/resume mechanism is asynchronous and may happen at any given time. This
1278 only works on devices that are attached to the seat of the given session. A process is not required to
1279 have direct access to the device node. <filename>systemd-logind</filename> only requires you to be the
1280 active session controller (see <function>TakeControl()</function>). Also note that any device can only
1281 be requested once. As long as you don't release it, further <function>TakeDevice()</function> calls
1282 will fail.</para>
1283
1284 <para><function>ReleaseDevice()</function> releases a device again (see
1285 <function>TakeDevice()</function>). This is also implicitly done by
1286 <function>ReleaseControl()</function> or when closing the D-Bus connection.</para>
1287
1288 <para><function>PauseDeviceComplete()</function> allows a session controller to synchronously pause a
1289 device after receiving a <function>PauseDevice(<literal>pause</literal>)</function> signal. Forced
1290 signals (or after an internal timeout) are automatically completed by
1291 <filename>systemd-logind</filename> asynchronously.</para>
1292
1293 <para><function>SetLockedHint()</function> may be used to set the "locked hint" to
1294 <varname>locked</varname>, i.e. information whether the session is locked. This is intended to be used
1295 by the desktop environment to tell <command>systemd-logind</command> when the session is locked and
1296 unlocked.</para>
1297
1298 <para><function>SetBrightness()</function> may be used to set the display brightness. This is intended
1299 to be used by the desktop environment and allows unprivileged programs to access hardware settings in
1300 a controlled way. The <varname>subsystem</varname> parameter specifies a kernel subsystem, either
1301 <literal>backlight</literal> or <literal>leds</literal>. The <varname>name</varname> parameter
1302 specifies a device name under the specified subsystem. The <varname>brightness</varname> parameter
1303 specifies the brightness. The range is defined by individual drivers, see
1304 <filename>/sys/class/<varname>subsystem</varname>/<varname>name</varname>/max_brightness</filename>.
1305 </para>
1306 </refsect2>
1307
1308 <refsect2>
1309 <title>Signals</title>
1310
1311 <para>The active session controller exclusively gets <function>PauseDevice</function> and
1312 <function>ResumeDevice</function> events for any device it requested via
1313 <function>TakeDevice()</function>. They notify the controller whenever a device is paused or resumed. A
1314 device is never resumed if its session is inactive. Also note that <function>PauseDevice</function>
1315 signals are sent before the <function>PropertyChanged</function> signal for the
1316 <function>Active</function> state. The inverse is true for <function>ResumeDevice</function>. A device
1317 may remain paused for unknown reasons even though the <interfacename>Session</interfacename> is active.
1318 </para>
1319
1320 <para>A <function>PauseDevice</function> signal carries the major and minor numbers and a string describing the
1321 type as arguments. <function>force</function> means the device was already paused by
1322 <filename>systemd-logind</filename> and the signal is only an asynchronous
1323 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
1324 <function>PauseDeviceComplete()</function>. This synchronous pausing mechanism is used for
1325 backwards-compatibility to VTs and <filename>systemd-logind</filename> is free to not make use of
1326 it. It is also free to send a forced <function>PauseDevice</function> if you don't respond in a timely
1327 manner (or for any other reason). <function>gone</function> means the device was unplugged from the
1328 system and you will no longer get any notifications about it. There is no need to call
1329 <function>ReleaseDevice()</function>. You may call <function>TakeDevice()</function> again if a new
1330 device is assigned the major+minor combination.</para>
1331
1332 <para><function>ResumeDevice</function> is sent whenever a session is active and a device is
1333 resumed. It carries the major/minor numbers as arguments and provides a new open file descriptor. You should
1334 switch to the new descriptor and close the old one. They are not guaranteed to have the same underlying
1335 open file descriptor in the kernel (except for a limited set of device types).</para>
1336
1337 <para>Whenever <function>Active</function> or the idle state changes,
1338 <function>PropertyChanged</function> signals are sent out to which clients can subscribe.</para>
1339
1340 <para><function>Lock</function>/<function>Unlock</function> is sent when the session is asked to be
1341 screen-locked/unlocked. A session manager of the session should listen to this signal and act
1342 accordingly. This signal is sent out as a result of the <function>Lock()</function> and
1343 <function>Unlock()</function> methods, respectively.</para>
1344 </refsect2>
1345
1346 <refsect2>
1347 <title>Properties</title>
1348
1349 <para><varname>Id</varname> encodes the session ID.</para>
1350
1351 <para><varname>User</varname> encodes the user ID of the user this session belongs to. This is a
1352 structure consisting of the Unix UID and the object path.</para>
1353
1354 <para><varname>Name</varname> encodes the user name.</para>
1355
1356 <para><varname>Timestamp</varname> and <varname>TimestampMonotonic</varname> encode the microseconds
1357 since the epoch when the session was created, in <constant>CLOCK_REALTIME</constant> or
1358 <constant>CLOCK_MONOTONIC</constant>, respectively.</para>
1359
1360 <para><varname>VTNr</varname> encodes the virtual terminal number of the session if there is any, 0
1361 otherwise.</para>
1362
1363 <para><varname>Seat</varname> encodes the seat this session belongs to if there is any. This is a
1364 structure consisting of the ID and the seat object path.</para>
1365
1366 <para><varname>TTY</varname> encodes the kernel TTY path of the session if this is a text login. If not
1367 this is an empty string.</para>
1368
1369 <para><varname>Display</varname> encodes the X11 display name if this is a graphical login. If not,
1370 this is an empty string.</para>
1371
1372 <para><varname>Remote</varname> encodes whether the session is local or remote.</para>
1373
1374 <para><varname>RemoteHost</varname> and <varname>RemoteUser</varname> encode the remote host and user
1375 if this is a remote session, or an empty string otherwise.</para>
1376
1377 <para><varname>Service</varname> encodes the PAM service name that registered the session.</para>
1378
1379 <para><varname>Desktop</varname> describes the desktop environment running in the session (if
1380 known).</para>
1381
1382 <para><varname>Scope</varname> contains the systemd scope unit name of this session.</para>
1383
1384 <para><varname>Leader</varname> encodes the PID of the process that registered the session.</para>
1385
1386 <para><varname>Audit</varname> encodes the Kernel Audit session ID of the session if auditing is
1387 available.</para>
1388
1389 <para><varname>Type</varname> encodes the session type. It's one of <literal>unspecified</literal> (for
1390 cron PAM sessions and suchlike), <literal>tty</literal> (for text logins) or
1391 <literal>x11</literal>/<literal>mir</literal>/<literal>wayland</literal> (for graphical logins).</para>
1392
1393 <para><varname>Class</varname> encodes the session class. It's one of <literal>user</literal> (for
1394 normal user sessions), <literal>greeter</literal> (for display manager pseudo-sessions), or
1395 <literal>lock-screen</literal> (for display lock screens).</para>
1396
1397 <para><varname>Active</varname> is a boolean that is true if the session is active, i.e. currently in the
1398 foreground. This field is semi-redundant due to <varname>State</varname>.</para>
1399
1400 <para><varname>State</varname> encodes the session state and one of <literal>online</literal>,
1401 <literal>active</literal>, or <literal>closing</literal>. See
1402 <citerefentry><refentrytitle>sd_session_get_state</refentrytitle><manvolnum>3</manvolnum></citerefentry>
1403 for more information about the states.</para>
1404
1405 <para><varname>IdleHint</varname>, <varname>IdleSinceHint</varname>, and
1406 <varname>IdleSinceHintMonotonic</varname> encapsulate the idle hint state of this session, similarly to
1407 how the respective properties on the manager object do it for the whole system.</para>
1408
1409 <para><varname>LockedHint</varname> shows the locked hint state of this session, as set by the
1410 <function>SetLockedHint()</function> method described above.</para>
1411 </refsect2>
1412 </refsect1>
1413
1414 <refsect1>
1415 <title>Examples</title>
1416
1417 <example>
1418 <title>Introspect the logind manager on the bus</title>
1419
1420 <programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
1421 --object-path /org/freedesktop/login1
1422 </programlisting>
1423
1424 <para>or</para>
1425
1426 <programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1
1427 </programlisting>
1428 </example>
1429
1430 <example>
1431 <title>Introspect the default seat on the bus</title>
1432
1433 <programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
1434 --object-path /org/freedesktop/login1/seat/seat0
1435 </programlisting>
1436
1437 <para>or</para>
1438
1439 <programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/seat/seat0
1440 </programlisting>
1441
1442 <para>Seat <literal>seat0</literal> is the default seat, so it'll be present unless local configuration
1443 is made to reassign all devices to a different seat. The list of seats and users can be acquired with
1444 <command>loginctl list-sessions</command>.</para>
1445 </example>
1446
1447 <example>
1448 <title>Introspect a single user on the bus</title>
1449
1450 <programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
1451 --object-path /org/freedesktop/login1/user/_1000
1452 </programlisting>
1453
1454 <para>or</para>
1455
1456 <programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/user/_1000
1457 </programlisting>
1458 </example>
1459
1460 <example>
1461 <title>Introspect <interfacename>org.freedesktop.login1.Session</interfacename> on the bus</title>
1462
1463 <programlisting>$ gdbus introspect --system --dest org.freedesktop.login1 \
1464 --object-path /org/freedesktop/login1/session/45
1465 </programlisting>
1466
1467 <para>or</para>
1468
1469 <programlisting>$ busctl introspect org.freedesktop.login1 /org/freedesktop/login1/session/45
1470 </programlisting>
1471 </example>
1472 </refsect1>
1473
1474 <xi:include href="org.freedesktop.locale1.xml" xpointer="versioning"/>
1475 </refentry>