chiark / gitweb /
Prep v229: Update man pages (fix most inappropriate stuff. Still lots to do...)
[elogind.git] / man / loginctl.xml
1 <?xml version='1.0'?> <!--*-nxml-*-->
2 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN"
3   "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
4
5 <!--
6   This file is part of elogind.
7
8   Copyright 2010 Lennart Poettering
9
10   elogind is free software; you can redistribute it and/or modify it
11   under the terms of the GNU Lesser General Public License as published by
12   the Free Software Foundation; either version 2.1 of the License, or
13   (at your option) any later version.
14
15   elogind is distributed in the hope that it will be useful, but
16   WITHOUT ANY WARRANTY; without even the implied warranty of
17   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18   Lesser General Public License for more details.
19
20   You should have received a copy of the GNU Lesser General Public License
21   along with elogind; If not, see <http://www.gnu.org/licenses/>.
22 -->
23
24 <refentry id="loginctl" xmlns:xi="http://www.w3.org/2001/XInclude">
25
26   <refentryinfo>
27     <title>loginctl</title>
28     <productname>elogind</productname>
29
30     <authorgroup>
31       <author>
32         <contrib>Developer</contrib>
33         <firstname>Lennart</firstname>
34         <surname>Poettering</surname>
35         <email>lennart@poettering.net</email>
36       </author>
37     </authorgroup>
38   </refentryinfo>
39
40   <refmeta>
41     <refentrytitle>loginctl</refentrytitle>
42     <manvolnum>1</manvolnum>
43   </refmeta>
44
45   <refnamediv>
46     <refname>loginctl</refname>
47     <refpurpose>Control the elogind login manager</refpurpose>
48   </refnamediv>
49
50   <refsynopsisdiv>
51     <cmdsynopsis>
52       <command>loginctl</command>
53       <arg choice="opt" rep="repeat">OPTIONS</arg>
54       <arg choice="req">COMMAND</arg>
55       <arg choice="opt" rep="repeat">NAME</arg>
56     </cmdsynopsis>
57   </refsynopsisdiv>
58
59   <refsect1>
60     <title>Description</title>
61
62     <para><command>loginctl</command> may be used to introspect and
63     control the state of the
64     <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>
65     login manager.</para>
66   </refsect1>
67
68   <refsect1>
69     <title>Options</title>
70
71     <para>The following options are understood:</para>
72
73     <variablelist>
74       <varlistentry>
75         <term><option>--no-ask-password</option></term>
76
77         <listitem><para>Do not query the user for authentication for
78         privileged operations.</para></listitem>
79       </varlistentry>
80
81       <varlistentry>
82         <term><option>-p</option></term>
83         <term><option>--property=</option></term>
84
85         <listitem><para>When showing session/user/seat properties,
86         limit display to certain properties as specified as argument.
87         If not specified, all set properties are shown. The argument
88         should be a property name, such as
89         <literal>Sessions</literal>. If specified more than once, all
90         properties with the specified names are
91         shown.</para></listitem>
92       </varlistentry>
93
94       <varlistentry>
95         <term><option>-a</option></term>
96         <term><option>--all</option></term>
97
98         <listitem><para>When showing session/user/seat properties,
99         show all properties regardless of whether they are set or
100         not.</para></listitem>
101       </varlistentry>
102
103       <varlistentry>
104         <term><option>-l</option></term>
105         <term><option>--full</option></term>
106
107         <listitem><para>Do not ellipsize process tree entries.</para>
108         </listitem>
109       </varlistentry>
110
111       <varlistentry>
112         <term><option>--kill-who=</option></term>
113
114         <listitem><para>When used with
115         <command>kill-session</command>, choose which processes to
116         kill. Must be one of <option>leader</option>, or
117         <option>all</option> to select whether to kill only the leader
118         process of the session or all processes of the session. If
119         omitted, defaults to <option>all</option>.</para></listitem>
120       </varlistentry>
121
122       <varlistentry>
123         <term><option>-s</option></term>
124         <term><option>--signal=</option></term>
125
126         <listitem><para>When used with <command>kill-session</command>
127         or <command>kill-user</command>, choose which signal to send
128         to selected processes. Must be one of the well known signal
129         specifiers, such as <constant>SIGTERM</constant>,
130         <constant>SIGINT</constant> or <constant>SIGSTOP</constant>.
131         If omitted, defaults to
132         <constant>SIGTERM</constant>.</para></listitem>
133       </varlistentry>
134
135       <xi:include href="user-system-options.xml" xpointer="host" />
136       <xi:include href="user-system-options.xml" xpointer="machine" />
137
138       <xi:include href="standard-options.xml" xpointer="no-pager" />
139       <xi:include href="standard-options.xml" xpointer="no-legend" />
140       <xi:include href="standard-options.xml" xpointer="help" />
141       <xi:include href="standard-options.xml" xpointer="version" />
142     </variablelist>
143   </refsect1>
144
145   <refsect1>
146     <title>Commands</title>
147
148     <para>The following commands are understood:</para>
149
150     <refsect2><title>Session Commands</title><variablelist>
151
152       <varlistentry>
153         <term><command>list-sessions</command></term>
154
155         <listitem><para>List current sessions.</para></listitem>
156       </varlistentry>
157
158       <varlistentry>
159         <term><command>session-status</command> <optional><replaceable>ID</replaceable>...</optional></term>
160
161         <listitem><para>Show terse runtime status information about
162         one or more sessions. Takes one or more session identifiers as
163         parameters. If no session identifiers are passed the status of
164         the caller's session is shown. This function is intended to
165         generate human-readable output. If you are looking for
166         computer-parsable output, use <command>show-session</command>
167         instead.</para></listitem>
168       </varlistentry>
169
170       <varlistentry>
171         <term><command>show-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
172
173         <listitem><para>Show properties of one or more sessions or the
174         manager itself. If no argument is specified, properties of the
175         manager will be shown. If a session ID is specified,
176         properties of the session are shown. By default, empty
177         properties are suppressed. Use <option>--all</option> to show
178         those too. To select specific properties to show, use
179         <option>--property=</option>. This command is intended to be
180         used whenever computer-parsable output is required. Use
181         <command>session-status</command> if you are looking for
182         formatted human-readable output.</para></listitem>
183       </varlistentry>
184
185       <varlistentry>
186         <term><command>activate</command> <optional><replaceable>ID</replaceable></optional></term>
187
188         <listitem><para>Activate a session. This brings a session into
189         the foreground, if another session is currently in the
190         foreground on the respective seat. Takes a session identifier
191         as argument. If no argument is specified the session of the
192         caller is put into foreground.</para></listitem>
193       </varlistentry>
194
195       <varlistentry>
196         <term><command>lock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
197         <term><command>unlock-session</command> <optional><replaceable>ID</replaceable>...</optional></term>
198
199         <listitem><para>Activates/deactivates the screen lock on one
200         or more sessions, if the session supports it. Takes one or
201         more session identifiers as arguments. If no argument is
202         specified the session of the caller is locked/unlocked.
203         </para></listitem>
204       </varlistentry>
205
206       <varlistentry>
207         <term><command>lock-sessions</command></term>
208         <term><command>unlock-sessions</command></term>
209
210         <listitem><para>Activates/deactivates the screen lock on all
211         current sessions supporting it. </para></listitem>
212       </varlistentry>
213
214       <varlistentry>
215         <term><command>terminate-session</command> <replaceable>ID</replaceable>...</term>
216
217         <listitem><para>Terminates a session. This kills all processes
218         of the session and deallocates all resources attached to the
219         session. </para></listitem>
220       </varlistentry>
221
222       <varlistentry>
223         <term><command>kill-session</command> <replaceable>ID</replaceable>...</term>
224
225         <listitem><para>Send a signal to one or more processes of the
226         session. Use <option>--kill-who=</option> to select which
227         process to kill. Use <option>--signal=</option> to select the
228         signal to send.</para></listitem>
229       </varlistentry>
230     </variablelist></refsect2>
231
232     <refsect2><title>User Commands</title><variablelist>
233       <varlistentry>
234         <term><command>list-users</command></term>
235
236         <listitem><para>List currently logged in users.
237         </para></listitem>
238       </varlistentry>
239
240       <varlistentry>
241         <term><command>user-status</command> <optional><replaceable>USER</replaceable>...</optional></term>
242
243         <listitem><para>Show terse runtime status information about
244         one or more logged in users. Takes one or more user names or numeric
245         user IDs as parameters. If no parameters are passed the status
246         of the caller's user is shown. This function is intended to
247         generate human-readable output. If you are looking for
248         computer-parsable output, use <command>show-user</command>
249         instead. Users may be specified by their usernames or numeric
250         user IDs. </para></listitem>
251       </varlistentry>
252
253       <varlistentry>
254         <term><command>show-user</command> <optional><replaceable>USER</replaceable>...</optional></term>
255
256         <listitem><para>Show properties of one or more users or the
257         manager itself. If no argument is specified, properties of the
258         manager will be shown. If a user is specified, properties of
259         the user are shown. By default, empty properties are
260         suppressed. Use <option>--all</option> to show those too. To
261         select specific properties to show, use
262         <option>--property=</option>. This command is intended to be
263         used whenever computer-parsable output is required. Use
264         <command>user-status</command> if you are looking for
265         formatted human-readable output.</para></listitem>
266       </varlistentry>
267
268       <varlistentry>
269         <term><command>enable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
270         <term><command>disable-linger</command> <optional><replaceable>USER</replaceable>...</optional></term>
271
272         <listitem><para>Enable/disable user lingering for one or more
273         users. If enabled for a specific user, a user manager is
274         spawned for the user at boot and kept around after logouts.
275         This allows users who are not logged in to run long-running
276         services. Takes one or more user names or numeric UIDs as
277         argument. If no argument is specified enables/disables
278         lingering for the user of the session of the caller.
279         </para></listitem>
280       </varlistentry>
281
282       <varlistentry>
283         <term><command>terminate-user</command> <replaceable>USER</replaceable>...</term>
284
285         <listitem><para>Terminates all sessions of a user. This kills
286         all processes of all sessions of the user and deallocates all
287         runtime resources attached to the user.</para></listitem>
288       </varlistentry>
289
290       <varlistentry>
291         <term><command>kill-user</command> <replaceable>USER</replaceable>...</term>
292
293         <listitem><para>Send a signal to all processes of a user. Use
294         <option>--signal=</option> to select the signal to send.
295         </para></listitem>
296       </varlistentry>
297     </variablelist></refsect2>
298
299     <refsect2><title>Seat Commands</title><variablelist>
300       <varlistentry>
301         <term><command>list-seats</command></term>
302
303         <listitem><para>List currently available seats on the local
304         system.</para></listitem>
305       </varlistentry>
306
307       <varlistentry>
308         <term><command>seat-status</command> <optional><replaceable>NAME</replaceable>...</optional></term>
309
310         <listitem><para>Show terse runtime status information about
311         one or more seats. Takes one or more seat names as parameters.
312         If no seat names are passed the status of the caller's
313         session's seat is shown. This function is intended to generate
314         human-readable output. If you are looking for
315         computer-parsable output, use <command>show-seat</command>
316         instead.</para></listitem>
317       </varlistentry>
318
319       <varlistentry>
320         <term><command>show-seat</command> <optional><replaceable>NAME</replaceable>...</optional></term>
321
322         <listitem><para>Show properties of one or more seats or the
323         manager itself. If no argument is specified, properties of the
324         manager will be shown. If a seat is specified, properties of
325         the seat are shown. By default, empty properties are
326         suppressed. Use <option>--all</option> to show those too. To
327         select specific properties to show, use
328         <option>--property=</option>. This command is intended to be
329         used whenever computer-parsable output is required. Use
330         <command>seat-status</command> if you are looking for
331         formatted human-readable output.</para></listitem>
332       </varlistentry>
333
334       <varlistentry>
335         <term><command>attach</command> <replaceable>NAME</replaceable> <replaceable>DEVICE</replaceable>...</term>
336
337         <listitem><para>Persistently attach one or more devices to a
338         seat. The devices should be specified via device paths in the
339         <filename>/sys</filename> file system. To create a new seat,
340         attach at least one graphics card to a previously unused seat
341         name. Seat names may consist only of a-z, A-Z, 0-9,
342         <literal>-</literal> and <literal>_</literal> and must be
343         prefixed with <literal>seat</literal>. To drop assignment of a
344         device to a specific seat, just reassign it to a different
345         seat, or use <command>flush-devices</command>.
346         </para></listitem>
347       </varlistentry>
348
349       <varlistentry>
350         <term><command>flush-devices</command></term>
351
352         <listitem><para>Removes all device assignments previously
353         created with <command>attach</command>. After this call, only
354         automatically generated seats will remain, and all seat
355         hardware is assigned to them.</para></listitem>
356       </varlistentry>
357
358       <varlistentry>
359         <term><command>terminate-seat</command> <replaceable>NAME</replaceable>...</term>
360
361         <listitem><para>Terminates all sessions on a seat. This kills
362         all processes of all sessions on the seat and deallocates all
363         runtime resources attached to them.</para></listitem>
364       </varlistentry>
365     </variablelist></refsect2>
366
367     <refsect2><title>System Commands</title><variablelist>
368     </variablelist></refsect2>
369     <varlistentry>
370       <term><command>poweroff</command></term>
371
372       <listitem>
373         <para>Print a wall message to all users, shut down and
374           power-off the system.</para>
375       </listitem>
376     </varlistentry>
377     <varlistentry>
378       <term><command>reboot <optional><replaceable>arg</replaceable></optional></command></term>
379
380       <listitem>
381         <para>Print a wall message to all users, shut down and
382           reboot the system.</para>
383
384         <para>If the optional argument
385         <replaceable>arg</replaceable> is given, it will be passed
386         as the optional argument to the
387         <citerefentry><refentrytitle>reboot</refentrytitle><manvolnum>2</manvolnum></citerefentry>
388         system call. The value is architecture and firmware
389         specific. As an example, <literal>recovery</literal> might
390         be used to trigger system recovery, and
391         <literal>fota</literal> might be used to trigger a
392         <quote>firmware over the air</quote> update.</para>
393       </listitem>
394     </varlistentry>
395
396     <varlistentry>
397       <term><command>suspend</command></term>
398
399       <listitem>
400         <para>Suspend the system.
401         </para>
402       </listitem>
403     </varlistentry>
404
405     <varlistentry>
406       <term><command>hibernate</command></term>
407
408       <listitem>
409         <para>Hibernate the system.
410         </para>
411       </listitem>
412     </varlistentry>
413
414     <varlistentry>
415       <term><command>hybrid-sleep</command></term>
416
417       <listitem>
418         <para>Hibernate and suspend the system.</para>
419       </listitem>
420     </varlistentry>
421   </refsect1>
422   <refsect1>
423     <title>Exit status</title>
424
425     <para>On success, 0 is returned, a non-zero failure code
426     otherwise.</para>
427   </refsect1>
428
429   <xi:include href="less-variables.xml" />
430
431   <refsect1>
432     <title>See Also</title>
433     <para>
434       <citerefentry><refentrytitle>elogind</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
435       <citerefentry><refentrytitle>systemctl</refentrytitle><manvolnum>1</manvolnum></citerefentry>,
436       <citerefentry><refentrytitle>logind.conf</refentrytitle><manvolnum>5</manvolnum></citerefentry>
437     </para>
438   </refsect1>
439
440 </refentry>