2 .TH "SD\-LOGIN" "3" "" "systemd 214" "sd-login"
3 .\" -----------------------------------------------------------------
4 .\" * Define some portability stuff
5 .\" -----------------------------------------------------------------
6 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7 .\" http://bugs.debian.org/507673
8 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html
9 .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
12 .\" -----------------------------------------------------------------
13 .\" * set default formatting
14 .\" -----------------------------------------------------------------
15 .\" disable hyphenation
17 .\" disable justification (adjust text to left margin only)
19 .\" -----------------------------------------------------------------
20 .\" * MAIN CONTENT STARTS HERE *
21 .\" -----------------------------------------------------------------
23 sd-login \- APIs for tracking logins
28 #include <systemd/sd\-login\&.h>
31 .HP \w'\fBpkg\-config\ \-\-cflags\ \-\-libs\ libsystemd\fR\ 'u
32 \fBpkg\-config \-\-cflags \-\-libs libsystemd\fR
36 provides APIs to introspect and monitor seat, login session and user status information on the local system\&.
39 \m[blue]\fBMulti\-Seat on Linux\fR\m[]\&\s-2\u[1]\d\s+2
40 for an introduction into multi\-seat support on Linux, the background for this set of APIs\&.
42 Note that these APIs only allow purely passive access and monitoring of seats, sessions and users\&. To actively make changes to the seat configuration, terminate login sessions, or switch session on a seat you need to utilize the D\-Bus API of systemd\-logind, instead\&.
44 These functions synchronously access data in
48 /run\&. All of these are virtual file systems, hence the runtime cost of the accesses is relatively cheap\&.
50 It is possible (and often a very good choice) to mix calls to the synchronous interface of
52 with the asynchronous D\-Bus interface of systemd\-logind\&. However, if this is done you need to think a bit about possible races since the stream of events from D\-Bus and from
54 interfaces such as the login monitor are asynchronous and not ordered against each other\&.
56 If the functions return string arrays, these are generally
58 terminated and need to be freed by the caller with the libc
60 call after use, including the strings referenced therein\&. Similarly, individual strings returned need to be freed, as well\&.
62 As a special exception, instead of an empty string array
64 may be returned, which should be treated equivalent to an empty string array\&.
67 \fBsd_pid_get_session\fR(3),
68 \fBsd_uid_get_state\fR(3),
69 \fBsd_session_is_active\fR(3),
70 \fBsd_seat_get_active\fR(3),
71 \fBsd_get_seats\fR(3),
72 \fBsd_login_monitor_new\fR(3)
73 for more information about the functions implemented\&.
76 These APIs are implemented as a shared library, which can be compiled and linked to with the
77 \fBlibsystemd\fR\ \&\fBpkg-config\fR(1)
82 \fBsd_pid_get_session\fR(3),
83 \fBsd_uid_get_state\fR(3),
84 \fBsd_session_is_active\fR(3),
85 \fBsd_seat_get_active\fR(3),
86 \fBsd_get_seats\fR(3),
87 \fBsd_login_monitor_new\fR(3),
89 \fBsd-readahead\fR(3),
95 \%http://www.freedesktop.org/wiki/Software/systemd/multiseat