1ORG.FREEDESKTOP.LOGIN1(5)   org.freedesktop.login1   ORG.FREEDESKTOP.LOGIN1(5)
2
3
4

NAME

6       org.freedesktop.login1 - The D-Bus interface of systemd-logind
7

INTRODUCTION

9       systemd-logind.service(8) is a system service that keeps track of user
10       logins and seats.
11
12       The daemon provides both a C library interface as well as a D-Bus
13       interface. The library interface may be used to introspect and watch
14       the state of user logins and seats. The bus interface provides the same
15       functionality but in addition may also be used to make changes to the
16       system state. For more information please consult sd-login(3).
17

THE MANAGER OBJECT

19       The service exposes the following interfaces on the Manager object on
20       the bus:
21
22           node /org/freedesktop/login1 {
23             interface org.freedesktop.login1.Manager {
24               methods:
25                 GetSession(in  s session_id,
26                            out o object_path);
27                 GetSessionByPID(in  u pid,
28                                 out o object_path);
29                 GetUser(in  u uid,
30                         out o object_path);
31                 GetUserByPID(in  u pid,
32                              out o object_path);
33                 GetSeat(in  s seat_id,
34                         out o object_path);
35                 ListSessions(out a(susso) sessions);
36                 ListUsers(out a(uso) users);
37                 ListSeats(out a(so) seats);
38                 ListInhibitors(out a(ssssuu) inhibitors);
39                 CreateSession(in  u uid,
40                               in  u pid,
41                               in  s service,
42                               in  s type,
43                               in  s class,
44                               in  s desktop,
45                               in  s seat_id,
46                               in  u vtnr,
47                               in  s tty,
48                               in  s display,
49                               in  b remote,
50                               in  s remote_user,
51                               in  s remote_host,
52                               in  a(sv) properties,
53                               out s session_id,
54                               out o object_path,
55                               out s runtime_path,
56                               out h fifo_fd,
57                               out u uid,
58                               out s seat_id,
59                               out u vtnr,
60                               out b existing);
61                 ReleaseSession(in  s session_id);
62                 ActivateSession(in  s session_id);
63                 ActivateSessionOnSeat(in  s session_id,
64                                       in  s seat_id);
65                 LockSession(in  s session_id);
66                 UnlockSession(in  s session_id);
67                 LockSessions();
68                 UnlockSessions();
69                 KillSession(in  s session_id,
70                             in  s who,
71                             in  i signal_number);
72                 KillUser(in  u uid,
73                          in  i signal_number);
74                 TerminateSession(in  s session_id);
75                 TerminateUser(in  u uid);
76                 TerminateSeat(in  s seat_id);
77                 SetUserLinger(in  u uid,
78                               in  b enable,
79                               in  b interactive);
80                 AttachDevice(in  s seat_id,
81                              in  s sysfs_path,
82                              in  b interactive);
83                 FlushDevices(in  b interactive);
84                 PowerOff(in  b interactive);
85                 PowerOffWithFlags(in  t flags);
86                 Reboot(in  b interactive);
87                 RebootWithFlags(in  t flags);
88                 Halt(in  b interactive);
89                 HaltWithFlags(in  t flags);
90                 Suspend(in  b interactive);
91                 SuspendWithFlags(in  t flags);
92                 Hibernate(in  b interactive);
93                 HibernateWithFlags(in  t flags);
94                 HybridSleep(in  b interactive);
95                 HybridSleepWithFlags(in  t flags);
96                 SuspendThenHibernate(in  b interactive);
97                 SuspendThenHibernateWithFlags(in  t flags);
98                 CanPowerOff(out s result);
99                 CanReboot(out s result);
100                 CanHalt(out s result);
101                 CanSuspend(out s result);
102                 CanHibernate(out s result);
103                 CanHybridSleep(out s result);
104                 CanSuspendThenHibernate(out s result);
105                 ScheduleShutdown(in  s type,
106                                  in  t usec);
107                 CancelScheduledShutdown(out b cancelled);
108                 Inhibit(in  s what,
109                         in  s who,
110                         in  s why,
111                         in  s mode,
112                         out h pipe_fd);
113                 CanRebootParameter(out s result);
114                 SetRebootParameter(in  s parameter);
115                 CanRebootToFirmwareSetup(out s result);
116                 SetRebootToFirmwareSetup(in  b enable);
117                 CanRebootToBootLoaderMenu(out s result);
118                 SetRebootToBootLoaderMenu(in  t timeout);
119                 CanRebootToBootLoaderEntry(out s result);
120                 SetRebootToBootLoaderEntry(in  s boot_loader_entry);
121                 SetWallMessage(in  s wall_message,
122                                in  b enable);
123               signals:
124                 SessionNew(s session_id,
125                            o object_path);
126                 SessionRemoved(s session_id,
127                                o object_path);
128                 UserNew(u uid,
129                         o object_path);
130                 UserRemoved(u uid,
131                             o object_path);
132                 SeatNew(s seat_id,
133                         o object_path);
134                 SeatRemoved(s seat_id,
135                             o object_path);
136                 PrepareForShutdown(b start);
137                 PrepareForSleep(b start);
138               properties:
139                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
140                 @org.freedesktop.systemd1.Privileged("true")
141                 readwrite b EnableWallMessages = ...;
142                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
143                 @org.freedesktop.systemd1.Privileged("true")
144                 readwrite s WallMessage = '...';
145                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
146                 readonly u NAutoVTs = ...;
147                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
148                 readonly as KillOnlyUsers = ['...', ...];
149                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
150                 readonly as KillExcludeUsers = ['...', ...];
151                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
152                 readonly b KillUserProcesses = ...;
153                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
154                 readonly s RebootParameter = '...';
155                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
156                 readonly b RebootToFirmwareSetup = ...;
157                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
158                 readonly t RebootToBootLoaderMenu = ...;
159                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
160                 readonly s RebootToBootLoaderEntry = '...';
161                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
162                 readonly as BootLoaderEntries = ['...', ...];
163                 readonly b IdleHint = ...;
164                 readonly t IdleSinceHint = ...;
165                 readonly t IdleSinceHintMonotonic = ...;
166                 readonly s BlockInhibited = '...';
167                 readonly s DelayInhibited = '...';
168                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
169                 readonly t InhibitDelayMaxUSec = ...;
170                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
171                 readonly t UserStopDelayUSec = ...;
172                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
173                 readonly s HandlePowerKey = '...';
174                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
175                 readonly s HandleSuspendKey = '...';
176                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
177                 readonly s HandleHibernateKey = '...';
178                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
179                 readonly s HandleLidSwitch = '...';
180                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
181                 readonly s HandleLidSwitchExternalPower = '...';
182                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
183                 readonly s HandleLidSwitchDocked = '...';
184                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
185                 readonly t HoldoffTimeoutUSec = ...;
186                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
187                 readonly s IdleAction = '...';
188                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
189                 readonly t IdleActionUSec = ...;
190                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
191                 readonly b PreparingForShutdown = ...;
192                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
193                 readonly b PreparingForSleep = ...;
194                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
195                 readonly (st) ScheduledShutdown = ...;
196                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
197                 readonly b Docked = ...;
198                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
199                 readonly b LidClosed = ...;
200                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
201                 readonly b OnExternalPower = ...;
202                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
203                 readonly b RemoveIPC = ...;
204                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
205                 readonly t RuntimeDirectorySize = ...;
206                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
207                 readonly t RuntimeDirectoryInodesMax = ...;
208                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
209                 readonly t InhibitorsMax = ...;
210                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
211                 readonly t NCurrentInhibitors = ...;
212                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
213                 readonly t SessionsMax = ...;
214                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
215                 readonly t NCurrentSessions = ...;
216             };
217             interface org.freedesktop.DBus.Peer { ... };
218             interface org.freedesktop.DBus.Introspectable { ... };
219             interface org.freedesktop.DBus.Properties { ... };
220           };
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330   Methods
331       GetSession() may be used to get the session object path for the session
332       with the specified ID. Similarly, GetUser() and GetSeat() get the user
333       and seat objects, respectively.  GetSessionByPID() and GetUserByPID()
334       get the session/user object the specified PID belongs to if there is
335       any.
336
337       ListSessions() returns an array of all current sessions. The structures
338       in the array consist of the following fields: session id, user id, user
339       name, seat id, session object path. If a session does not have a seat
340       attached, the seat id field will be an empty string.
341
342       ListUsers() returns an array of all currently logged in users. The
343       structures in the array consist of the following fields: user id, user
344       name, user object path.
345
346       ListSeats() returns an array of all currently available seats. The
347       structure in the array consists of the following fields: seat id, seat
348       object path.
349
350       ListInhibitors() lists all currently active inhibitors. It returns an
351       array of structures consisting of what, who, why, mode, uid (user ID),
352       and pid (process ID).
353
354       CreateSession() and ReleaseSession() may be used to open or close login
355       sessions. These calls should never be invoked directly by clients.
356       Creating/closing sessions is exclusively the job of PAM and its
357       pam_systemd(8) module.
358
359       ActivateSession() brings the session with the specified ID into the
360       foreground.  ActivateSessionOnSeat() does the same, but only if the
361       seat id matches.
362
363       LockSession() asks the session with the specified ID to activate the
364       screen lock.  UnlockSession() asks the session with the specified ID to
365       remove an active screen lock, if there is any. This is implemented by
366       sending out the Lock() and Unlock() signals from the respective session
367       object which session managers are supposed to listen on.
368
369       LockSessions() asks all sessions to activate their screen locks. This
370       may be used to lock access to the entire machine in one action.
371       Similarly, UnlockSessions() asks all sessions to deactivate their
372       screen locks.
373
374       KillSession() may be used to send a Unix signal to one or all processes
375       of a session. As arguments it takes the session id, either the string
376       "leader" or "all" and a signal number. If "leader" is passed only the
377       session "leader" is killed. If "all" is passed all processes of the
378       session are killed.
379
380       KillUser() may be used to send a Unix signal to all processes of a
381       user. As arguments it takes the user id and a signal number.
382
383       TerminateSession(), TerminateUser(), TerminateSeat() may be used to
384       forcibly terminate one specific session, all processes of a user, and
385       all sessions attached to a specific seat, respectively. The session,
386       user, and seat are identified by their respective IDs.
387
388       SetUserLinger() enables or disables user lingering. If enabled, the
389       runtime directory of a user is kept around and they may continue to run
390       processes while logged out. If disabled, the runtime directory goes
391       away as soon as they log out.  SetUserLinger() expects three arguments:
392       the UID, a boolean whether to enable/disable and a boolean controlling
393       the polkit[1] authorization interactivity (see below). Note that the
394       user linger state is persistently stored on disk.
395
396       AttachDevice() may be used to assign a specific device to a specific
397       seat. The device is identified by its /sys/ path and must be eligible
398       for seat assignments.  AttachDevice() takes three arguments: the seat
399       id, the sysfs path, and a boolean for controlling polkit interactivity
400       (see below). Device assignments are persistently stored on disk. To
401       create a new seat, simply specify a previously unused seat id. For more
402       information about the seat assignment logic see sd-login(3).
403
404       FlushDevices() removes all explicit seat assignments for devices,
405       resetting all assignments to the automatic defaults. The only argument
406       it takes is the polkit interactivity boolean (see below).
407
408       PowerOff(), Reboot(), Halt(), Suspend(), and Hibernate() result in the
409       system being powered off, rebooted, halted (shut down without turning
410       off power), suspended (the system state is saved to RAM and the CPU is
411       turned off), or hibernated (the system state is saved to disk and the
412       machine is powered down).  HybridSleep() results in the system entering
413       a hybrid-sleep mode, i.e. the system is both hibernated and suspended.
414       SuspendThenHibernate() results in the system being suspended, then
415       later woken using an RTC timer and hibernated. The only argument is the
416       polkit interactivity boolean interactive (see below). The main purpose
417       of these calls is that they enforce polkit policy and hence allow
418       powering off/rebooting/suspending/hibernating even by unprivileged
419       users. They also enforce inhibition locks for non-privileged users. UIs
420       should expose these calls as the primary mechanism to
421       poweroff/reboot/suspend/hibernate the machine. Methods
422       PowerOffWithFlags(), RebootWithFlags(), HaltWithFlags(),
423       SuspendWithFlags(), HibernateWithFlags(), HybridSleepWithFlags() and
424       SuspendThenHibernateWithFlags() add flags to allow for extendability,
425       defined as follows:
426
427           #define SD_LOGIND_ROOT_CHECK_INHIBITORS  (UINT64_C(1) << 0)
428
429
430       When the flags is 0 then these methods behave just like the versions
431       without flags. When SD_LOGIND_ROOT_CHECK_INHIBITORS (0x01) is set,
432       active inhibitors are honoured for privileged users too.
433
434       SetRebootParameter() sets a parameter for a subsequent reboot
435       operation. See the description of reboot in systemctl(1) and reboot(2)
436       for more information.
437
438       SetRebootToFirmwareSetup(), SetRebootToBootLoaderMenu(), and
439       SetRebootToBootLoaderEntry() configure the action to be taken from the
440       boot loader after a reboot: respectively entering firmware setup mode,
441       the boot loader menu, or a specific boot loader entry. See systemctl(1)
442       for the corresponding command line interface.
443
444       CanPowerOff(), CanReboot(), CanHalt(), CanSuspend(), CanHibernate(),
445       CanHybridSleep(), CanSuspendThenHibernate(), CanRebootParameter(),
446       CanRebootToFirmwareSetup(), CanRebootToBootLoaderMenu(), and
447       CanRebootToBootLoaderEntry() test whether the system supports the
448       respective operation and whether the calling user is allowed to execute
449       it. Returns one of "na", "yes", "no", and "challenge". If "na" is
450       returned, the operation is not available because hardware, kernel, or
451       drivers do not support it. If "yes" is returned, the operation is
452       supported and the user may execute the operation without further
453       authentication. If "no" is returned, the operation is available but the
454       user is not allowed to execute the operation. If "challenge" is
455       returned, the operation is available but only after authorization.
456
457       ScheduleShutdown() schedules a shutdown operation type at time usec in
458       microseconds since the UNIX epoch.  type can be one of "poweroff",
459       "dry-poweroff", "reboot", "dry-reboot", "halt", and "dry-halt". (The
460       "dry-" variants do not actually execute the shutdown action.)
461       CancelScheduledShutdown() cancels a scheduled shutdown. The output
462       parameter cancelled is true if a shutdown operation was scheduled.
463
464       SetWallMessage() sets the wall message (the message that will be sent
465       out to all terminals and stored in a utmp(5) record) for a subsequent
466       scheduled shutdown operation. The parameter wall_message specifies the
467       shutdown reason (and may be empty) which will be included in the
468       shutdown message. The parameter enable specifies whether to print a
469       wall message on shutdown.
470
471       Inhibit() creates an inhibition lock. It takes four parameters: what,
472       who, why, and mode.  what is one or more of "shutdown", "sleep",
473       "idle", "handle-power-key", "handle-suspend-key",
474       "handle-hibernate-key", "handle-lid-switch", separated by colons, for
475       inhibiting poweroff/reboot, suspend/hibernate, the automatic idle
476       logic, or hardware key handling.  who should be a short human readable
477       string identifying the application taking the lock.  why should be a
478       short human readable string identifying the reason why the lock is
479       taken. Finally, mode is either "block" or "delay" which encodes whether
480       the inhibit shall be consider mandatory or whether it should just delay
481       the operation to a certain maximum time. The method returns a file
482       descriptor. The lock is released the moment this file descriptor and
483       all its duplicates are closed. For more information on the inhibition
484       logic see Inhibitor Locks[2].
485
486   Signals
487       Whenever the inhibition state or idle hint changes, PropertyChanged
488       signals are sent out to which clients can subscribe.
489
490       The SessionNew, SessionRemoved, UserNew, UserRemoved, SeatNew, and
491       SeatRemoved signals are sent each time a session is created or removed,
492       a user logs in or out, or a seat is added or removed. They each contain
493       the ID of the object plus the object path.
494
495       The PrepareForShutdown() and PrepareForSleep() signals are sent right
496       before (with the argument "true") or after (with the argument "false")
497       the system goes down for reboot/poweroff and suspend/hibernate,
498       respectively. This may be used by applications to save data on disk,
499       release memory, or do other jobs that should be done shortly before
500       shutdown/sleep, in conjunction with delay inhibitor locks. After
501       completion of this work they should release their inhibition locks in
502       order to not delay the operation any further. For more information see
503       Inhibitor Locks[2].
504
505   Properties
506       Most properties simply reflect the configuration, see logind.conf(5).
507       This includes: NAutoVTs, KillOnlyUsers, KillExcludeUsers,
508       KillUserProcesses, IdleAction, InhibitDelayMaxUSec, InhibitorsMax,
509       UserStopDelayUSec, HandlePowerKey, HandleSuspendKey,
510       HandleHibernateKey, HandleLidSwitch, HandleLidSwitchExternalPower,
511       HandleLidSwitchDocked, IdleActionUSec, HoldoffTimeoutUSec, RemoveIPC,
512       RuntimeDirectorySize, RuntimeDirectoryInodesMax, InhibitorsMax, and
513       SessionsMax.
514
515       The IdleHint property reflects the idle hint state of the system. If
516       the system is idle it might get into automatic suspend or shutdown
517       depending on the configuration.
518
519       IdleSinceHint and IdleSinceHintMonotonic encode the timestamps of the
520       last change of the idle hint boolean, in CLOCK_REALTIME and
521       CLOCK_MONOTONIC timestamps, respectively, in microseconds since the
522       epoch.
523
524       The BlockInhibited and DelayInhibited properties encode the currently
525       active locks of the respective modes. They are colon separated lists of
526       "shutdown", "sleep", and "idle" (see above).
527
528       NCurrentSessions and NCurrentInhibitors contain the number of currently
529       registered sessions and inhibitors.
530
531       The BootLoaderEntries property contains a list of boot loader entries.
532       This includes boot loader entries defined in configuration and any
533       additional loader entries reported by the boot loader. See systemd-
534       boot(7) for more information.
535
536       The PreparingForShutdown and PreparingForSleep boolean properties are
537       true during the interval between the two PrepareForShutdown and
538       PrepareForSleep signals respectively. Note that these properties do not
539       send out PropertyChanged signals.
540
541       The RebootParameter property shows the value set with the
542       SetRebootParameter() method described above.
543
544       ScheduledShutdown shows the value pair set with the ScheduleShutdown()
545       method described above.
546
547       RebootToFirmwareSetup, RebootToBootLoaderMenu, and
548       RebootToBootLoaderEntry are true when the resprective post-reboot
549       operation was selected with SetRebootToFirmwareSetup,
550       SetRebootToBootLoaderMenu, or SetRebootToBootLoaderEntry.
551
552       The WallMessage and EnableWallMessages properties reflect the shutdown
553       reason and wall message enablement switch which can be set with the
554       SetWallMessage() method described above.
555
556       Docked is true if the machine is connected to a dock.  LidClosed is
557       true when the lid (of a laptop) is closed.  OnExternalPower is true
558       when the machine is connected to an external power supply.
559
560   Security
561       A number of operations are protected via the polkit privilege system.
562       SetUserLinger() requires the org.freedesktop.login1.set-user-linger
563       privilege.  AttachDevice() requires
564       org.freedesktop.login1.attach-device and FlushDevices() requires
565       org.freedesktop.login1.flush-devices.  PowerOff(), Reboot(), Halt(),
566       Suspend(), Hibernate() require org.freedesktop.login1.power-off,
567       org.freedesktop.login1.power-off-multiple-sessions,
568       org.freedesktop.login1.power-off-ignore-inhibit,
569       org.freedesktop.login1.reboot,
570       org.freedesktop.login1.reboot-multiple-sessions,
571       org.freedesktop.login1.reboot-ignore-inhibit,
572       org.freedesktop.login1.halt,
573       org.freedesktop.login1.halt-multiple-sessions,
574       org.freedesktop.login1.halt-ignore-inhibit,
575       org.freedesktop.login1.suspend,
576       org.freedesktop.login1.suspend-multiple-sessions,
577       org.freedesktop.login1.suspend-ignore-inhibit,
578       org.freedesktop.login1.hibernate,
579       org.freedesktop.login1.hibernate-multiple-sessions,
580       org.freedesktop.login1.hibernate-ignore-inhibit, respectively depending
581       on whether there are other sessions around or active inhibits are
582       present.  HybridSleep() and SuspendThenHibernate() use the same
583       privileges as Hibernate().  SetRebootParameter() requires
584       org.freedesktop.login1.set-reboot-parameter.
585
586       SetRebootToFirmwareSetup requires
587       org.freedesktop.login1.set-reboot-to-firmware-setup.
588       SetRebootToBootLoaderMenu requires
589       org.freedesktop.login1.set-reboot-to-boot-loader-menu.
590       SetRebootToBootLoaderEntry requires
591       org.freedesktop.login1.set-reboot-to-boot-loader-entry.
592
593       ScheduleShutdown and CancelScheduledShutdown require the same
594       privileges (listed above) as the immediate poweroff/reboot/halt
595       operations.
596
597       Inhibit() is protected via one of
598       org.freedesktop.login1.inhibit-block-shutdown,
599       org.freedesktop.login1.inhibit-delay-shutdown,
600       org.freedesktop.login1.inhibit-block-sleep,
601       org.freedesktop.login1.inhibit-delay-sleep,
602       org.freedesktop.login1.inhibit-block-idle,
603       org.freedesktop.login1.inhibit-handle-power-key,
604       org.freedesktop.login1.inhibit-handle-suspend-key,
605       org.freedesktop.login1.inhibit-handle-hibernate-key,
606       org.freedesktop.login1.inhibit-handle-lid-switch depending on the lock
607       type and mode taken.
608
609       The interactive boolean parameters can be used to control whether
610       polkit should interactively ask the user for authentication credentials
611       if required.
612

SEAT OBJECTS

614           node /org/freedesktop/login1/seat/seat0 {
615             interface org.freedesktop.login1.Seat {
616               methods:
617                 Terminate();
618                 ActivateSession(in  s session_id);
619                 SwitchTo(in  u vtnr);
620                 SwitchToNext();
621                 SwitchToPrevious();
622               properties:
623                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
624                 readonly s Id = '...';
625                 readonly (so) ActiveSession = ...;
626                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
627                 readonly b CanTTY = ...;
628                 readonly b CanGraphical = ...;
629                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
630                 readonly a(so) Sessions = [...];
631                 readonly b IdleHint = ...;
632                 readonly t IdleSinceHint = ...;
633                 readonly t IdleSinceHintMonotonic = ...;
634             };
635             interface org.freedesktop.DBus.Peer { ... };
636             interface org.freedesktop.DBus.Introspectable { ... };
637             interface org.freedesktop.DBus.Properties { ... };
638           };
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655   Methods
656       Terminate() and ActivateSession() work similar to TerminateSeat(),
657       ActivationSessionOnSeat() on the Manager object.
658
659       SwitchTo() switches to the session on the virtual terminal vtnr.
660       SwitchToNext() and SwitchToPrevious() switch to, respectively, the next
661       and previous sessions on the seat in the order of virtual terminals. If
662       there is no active session, they switch to, respectively, the first and
663       last session on the seat.
664
665   Signals
666       Whenever ActiveSession, Sessions, CanGraphical, CanTTY, or the idle
667       state changes, PropertyChanged signals are sent out to which clients
668       can subscribe.
669
670   Properties
671       The Id property encodes the ID of the seat.
672
673       ActiveSession encodes the currently active session if there is one. It
674       is a structure consisting of the session id and the object path.
675
676       CanTTY encodes whether the session is suitable for text logins, and
677       CanGraphical whether it is suitable for graphical sessions.
678
679       The Sessions property is an array of all current sessions of this seat,
680       each encoded in a structure consisting of the ID and the object path.
681
682       The IdleHint, IdleSinceHint, and IdleSinceHintMonotonic properties
683       encode the idle state, similar to the ones exposed on the Manager
684       object, but specific for this seat.
685

USER OBJECTS

687           node /org/freedesktop/login1/user/_1000 {
688             interface org.freedesktop.login1.User {
689               methods:
690                 Terminate();
691                 Kill(in  i signal_number);
692               properties:
693                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
694                 readonly u UID = ...;
695                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
696                 readonly u GID = ...;
697                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
698                 readonly s Name = '...';
699                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
700                 readonly t Timestamp = ...;
701                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
702                 readonly t TimestampMonotonic = ...;
703                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
704                 readonly s RuntimePath = '...';
705                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
706                 readonly s Service = '...';
707                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
708                 readonly s Slice = '...';
709                 readonly (so) Display = ...;
710                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
711                 readonly s State = '...';
712                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
713                 readonly a(so) Sessions = [...];
714                 readonly b IdleHint = ...;
715                 readonly t IdleSinceHint = ...;
716                 readonly t IdleSinceHintMonotonic = ...;
717                 @org.freedesktop.DBus.Property.EmitsChangedSignal("false")
718                 readonly b Linger = ...;
719             };
720             interface org.freedesktop.DBus.Peer { ... };
721             interface org.freedesktop.DBus.Introspectable { ... };
722             interface org.freedesktop.DBus.Properties { ... };
723           };
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744   Methods
745       Terminate() and Kill() work similar to the TerminateUser() and
746       KillUser() methods on the manager object.
747
748   Signals
749       Whenever Sessions or the idle state changes, PropertyChanged signals
750       are sent out to which clients can subscribe.
751
752   Properties
753       The UID and GID properties encode the Unix UID and primary GID of the
754       user.
755
756       The Name property encodes the user name.
757
758       Timestamp and TimestampMonotonic encode the login time of the user in
759       microseconds since the epoch, in the CLOCK_REALTIME and CLOCK_MONOTONIC
760       clocks, respectively.
761
762       RuntimePath encodes the runtime path of the user, i.e.
763       $XDG_RUNTIME_DIR. For details see the XDG Basedir Specification[3].
764
765       Service contains the unit name of the user systemd service of this
766       user. Each logged in user is assigned a user service that runs a user
767       systemd instance. This is usually an instance of user@.service.
768
769       Slice contains the unit name of the user systemd slice of this user.
770       Each logged in user gets a private slice.
771
772       Display encodes which graphical session should be used as the primary
773       UI display for the user. It is a structure encoding the session ID and
774       the object path of the session to use.
775
776       State encodes the user state and is one of "offline", "lingering",
777       "online", "active", or "closing". See sd_uid_get_state(3) for more
778       information about the states.
779
780       Sessions is an array of structures encoding all current sessions of the
781       user. Each structure consists of the ID and object path.
782
783       The IdleHint, IdleSinceHint, and IdleSinceHintMonotonic properties
784       encode the idle hint state of the user, similar to the Manager's
785       properties, but specific for this user.
786
787       The Linger property shows whether lingering is enabled for this user.
788

SESSION OBJECTS

790           node /org/freedesktop/login1/session/1 {
791             interface org.freedesktop.login1.Session {
792               methods:
793                 Terminate();
794                 Activate();
795                 Lock();
796                 Unlock();
797                 SetIdleHint(in  b idle);
798                 SetLockedHint(in  b locked);
799                 Kill(in  s who,
800                      in  i signal_number);
801                 TakeControl(in  b force);
802                 ReleaseControl();
803                 SetType(in  s type);
804                 TakeDevice(in  u major,
805                            in  u minor,
806                            out h fd,
807                            out b inactive);
808                 ReleaseDevice(in  u major,
809                               in  u minor);
810                 PauseDeviceComplete(in  u major,
811                                     in  u minor);
812                 SetBrightness(in  s subsystem,
813                               in  s name,
814                               in  u brightness);
815               signals:
816                 PauseDevice(u major,
817                             u minor,
818                             s type);
819                 ResumeDevice(u major,
820                              u minor,
821                              h fd);
822                 Lock();
823                 Unlock();
824               properties:
825                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
826                 readonly s Id = '...';
827                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
828                 readonly (uo) User = ...;
829                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
830                 readonly s Name = '...';
831                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
832                 readonly t Timestamp = ...;
833                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
834                 readonly t TimestampMonotonic = ...;
835                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
836                 readonly u VTNr = ...;
837                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
838                 readonly (so) Seat = ...;
839                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
840                 readonly s TTY = '...';
841                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
842                 readonly s Display = '...';
843                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
844                 readonly b Remote = ...;
845                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
846                 readonly s RemoteHost = '...';
847                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
848                 readonly s RemoteUser = '...';
849                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
850                 readonly s Service = '...';
851                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
852                 readonly s Desktop = '...';
853                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
854                 readonly s Scope = '...';
855                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
856                 readonly u Leader = ...;
857                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
858                 readonly u Audit = ...;
859                 readonly s Type = '...';
860                 @org.freedesktop.DBus.Property.EmitsChangedSignal("const")
861                 readonly s Class = '...';
862                 readonly b Active = ...;
863                 readonly s State = '...';
864                 readonly b IdleHint = ...;
865                 readonly t IdleSinceHint = ...;
866                 readonly t IdleSinceHintMonotonic = ...;
867                 readonly b LockedHint = ...;
868             };
869             interface org.freedesktop.DBus.Peer { ... };
870             interface org.freedesktop.DBus.Introspectable { ... };
871             interface org.freedesktop.DBus.Properties { ... };
872           };
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919   Methods
920       Terminate(), Activate(), Lock(), Unlock(), and Kill() work similarly to
921       the respective calls on the Manager object.
922
923       SetIdleHint() is called by the session object to update the idle state
924       of the session whenever it changes.
925
926       TakeControl() allows a process to take exclusive managed device
927       access-control for that session. Only one D-Bus connection can be a
928       controller for a given session at any time. If the force argument is
929       set (root only), an existing controller is kicked out and replaced.
930       Otherwise, this method fails if there is already a controller. Note
931       that this method is limited to D-Bus users with the effective UID set
932       to the user of the session or root.
933
934       ReleaseControl() drops control of a given session. Closing the D-Bus
935       connection implicitly releases control as well. See TakeControl() for
936       more information. This method also releases all devices for which the
937       controller requested ownership via TakeDevice().
938
939       SetType() allows the type of the session to be changed dynamically. It
940       can only be called by session's current controller. If TakeControl()
941       has not been called, this method will fail. In addition, the session
942       type will be reset to its original value once control is released,
943       either by calling ReleaseControl() or closing the D-Bus connection.
944       This should help prevent a session from entering an inconsistent state,
945       for example if the controller crashes. The only argument type is the
946       new session type.
947
948       TakeDevice() allows a session controller to get a file descriptor for a
949       specific device. Pass in the major and minor numbers of the character
950       device and systemd-logind will return a file descriptor for the device.
951       Only a limited set of device-types is currently supported (but may be
952       extended).  systemd-logind automatically mutes the file descriptor if
953       the session is inactive and resumes it once the session is activated
954       again. This guarantees that a session can only access session devices
955       if the session is active. Note that this revoke/resume mechanism is
956       asynchronous and may happen at any given time. This only works on
957       devices that are attached to the seat of the given session. A process
958       is not required to have direct access to the device node.
959       systemd-logind only requires you to be the active session controller
960       (see TakeControl()). Also note that any device can only be requested
961       once. As long as you don't release it, further TakeDevice() calls will
962       fail.
963
964       ReleaseDevice() releases a device again (see TakeDevice()). This is
965       also implicitly done by ReleaseControl() or when closing the D-Bus
966       connection.
967
968       PauseDeviceComplete() allows a session controller to synchronously
969       pause a device after receiving a PauseDevice("pause") signal. Forced
970       signals (or after an internal timeout) are automatically completed by
971       systemd-logind asynchronously.
972
973       SetLockedHint() may be used to set the "locked hint" to locked, i.e.
974       information whether the session is locked. This is intended to be used
975       by the desktop environment to tell systemd-logind when the session is
976       locked and unlocked.
977
978       SetBrightness() may be used to set the display brightness. This is
979       intended to be used by the desktop environment and allows unprivileged
980       programs to access hardware settings in a controlled way. The subsystem
981       parameter specifies a kernel subsystem, either "backlight" or "leds".
982       The name parameter specifies a device name under the specified
983       subsystem. The brightness parameter specifies the brightness. The range
984       is defined by individual drivers, see
985       /sys/class/subsystem/name/max_brightness.
986
987   Signals
988       The active session controller exclusively gets PauseDevice and
989       ResumeDevice events for any device it requested via TakeDevice(). They
990       notify the controller whenever a device is paused or resumed. A device
991       is never resumed if its session is inactive. Also note that PauseDevice
992       signals are sent before the PropertyChanged signal for the Active
993       state. The inverse is true for ResumeDevice. A device may remain paused
994       for unknown reasons even though the Session is active.
995
996       A PauseDevice signal carries the major and minor numbers and a string
997       describing the type as arguments.  force means the device was already
998       paused by systemd-logind and the signal is only an asynchronous
999       notification.  pause means systemd-logind grants you a limited amount
1000       of time to pause the device. You must respond to this via
1001       PauseDeviceComplete(). This synchronous pausing mechanism is used for
1002       backwards-compatibility to VTs and systemd-logind is free to not make
1003       use of it. It is also free to send a forced PauseDevice if you don't
1004       respond in a timely manner (or for any other reason).  gone means the
1005       device was unplugged from the system and you will no longer get any
1006       notifications about it. There is no need to call ReleaseDevice(). You
1007       may call TakeDevice() again if a new device is assigned the major+minor
1008       combination.
1009
1010       ResumeDevice is sent whenever a session is active and a device is
1011       resumed. It carries the major/minor numbers as arguments and provides a
1012       new open file descriptor. You should switch to the new descriptor and
1013       close the old one. They are not guaranteed to have the same underlying
1014       open file descriptor in the kernel (except for a limited set of device
1015       types).
1016
1017       Whenever Active or the idle state changes, PropertyChanged signals are
1018       sent out to which clients can subscribe.
1019
1020       Lock/Unlock is sent when the session is asked to be
1021       screen-locked/unlocked. A session manager of the session should listen
1022       to this signal and act accordingly. This signal is sent out as a result
1023       of the Lock() and Unlock() methods, respectively.
1024
1025   Properties
1026       Id encodes the session ID.
1027
1028       User encodes the user ID of the user this session belongs to. This is a
1029       structure consisting of the Unix UID and the object path.
1030
1031       Name encodes the user name.
1032
1033       Timestamp and TimestampMonotonic encode the microseconds since the
1034       epoch when the session was created, in CLOCK_REALTIME or
1035       CLOCK_MONOTONIC, respectively.
1036
1037       VTNr encodes the virtual terminal number of the session if there is
1038       any, 0 otherwise.
1039
1040       Seat encodes the seat this session belongs to if there is any. This is
1041       a structure consisting of the ID and the seat object path.
1042
1043       TTY encodes the kernel TTY path of the session if this is a text login.
1044       If not this is an empty string.
1045
1046       Display encodes the X11 display name if this is a graphical login. If
1047       not, this is an empty string.
1048
1049       Remote encodes whether the session is local or remote.
1050
1051       RemoteHost and RemoteUser encode the remote host and user if this is a
1052       remote session, or an empty string otherwise.
1053
1054       Service encodes the PAM service name that registered the session.
1055
1056       Desktop describes the desktop environment running in the session (if
1057       known).
1058
1059       Scope contains the systemd scope unit name of this session.
1060
1061       Leader encodes the PID of the process that registered the session.
1062
1063       Audit encodes the Kernel Audit session ID of the session if auditing is
1064       available.
1065
1066       Type encodes the session type. It's one of "unspecified" (for cron PAM
1067       sessions and suchlike), "tty" (for text logins) or
1068       "x11"/"mir"/"wayland" (for graphical logins).
1069
1070       Class encodes the session class. It's one of "user" (for normal user
1071       sessions), "greeter" (for display manager pseudo-sessions), or
1072       "lock-screen" (for display lock screens).
1073
1074       Active is a boolean that is true if the session is active, i.e.
1075       currently in the foreground. This field is semi-redundant due to State.
1076
1077       State encodes the session state and one of "online", "active", or
1078       "closing". See sd_session_get_state(3) for more information about the
1079       states.
1080
1081       IdleHint, IdleSinceHint, and IdleSinceHintMonotonic encapsulate the
1082       idle hint state of this session, similarly to how the respective
1083       properties on the manager object do it for the whole system.
1084
1085       LockedHint shows the locked hint state of this session, as set by the
1086       SetLockedHint() method described above.
1087

EXAMPLES

1089       Example 1. Introspect org.freedesktop.login1.Manager on the bus
1090
1091           $ gdbus introspect --system --dest org.freedesktop.login1 \
1092             --object-path /org/freedesktop/login1
1093
1094
1095       Example 2. Introspect org.freedesktop.login1.Seat on the bus
1096
1097           $ gdbus introspect --system --dest org.freedesktop.login1 \
1098            --object-path /org/freedesktop/login1/seat/seat0
1099
1100
1101       Example 3. Introspect org.freedesktop.login1.User on the bus
1102
1103           $ gdbus introspect --system --dest org.freedesktop.login1 \
1104             --object-path /org/freedesktop/login1/user/_1000
1105
1106
1107       Example 4. Introspect org.freedesktop.login1.Session on the bus
1108
1109           $ gdbus introspect --system --dest org.freedesktop.login1 \
1110             --object-path /org/freedesktop/login1/session/45
1111
1112

VERSIONING

1114       These D-Bus interfaces follow the usual interface versioning
1115       guidelines[4].
1116

NOTES

1118        1. polkit
1119           https://www.freedesktop.org/software/polkit/docs/latest/
1120
1121        2. Inhibitor Locks
1122           http://www.freedesktop.org/wiki/Software/systemd/inhibit
1123
1124        3. XDG Basedir Specification
1125           https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
1126
1127        4. the usual interface versioning guidelines
1128           http://0pointer.de/blog/projects/versioning-dbus.html
1129
1130
1131
1132systemd 248                                          ORG.FREEDESKTOP.LOGIN1(5)
Impressum