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