src/script.c: fix bug that prevented script dependencies from being read
[vlock.git] / man / vlock.1
blob627f4f0e4de14ea693919f60b2ec3a073e9db705
1 .TH VLOCK 1 "28 July 2007" "Linux" "Linux User's Manual"
2 .SH NAME
3 vlock \- Virtual Console lock program
4 .SH SYNOPSIS
5 .B vlock [ -hv ]
6 .PP
7 .B vlock [ -acns ] [ -t <timeout> ] [ plugins... ]
8 .SH DESCRIPTION
9 .B vlock
10 is a program to lock one or more sessions on the Linux console.  This is
11 especially useful for Linux machines which have multiple users with access
12 to the console.  One user may lock his or her session(s) while still allowing
13 other users to use the system on other virtual consoles.  If desired, the
14 entire console may be locked and virtual console switching disabled.
15 .PP
16 By default, only the current VC (virtual console) is locked.  With the
17 \fB-a,--all\fR option all VCs are locked.  The locked VCs cannot be unlocked
18 without the invoker's password or the root password.  The root password will
19 always be able to unlock any or all sessions, unless disabled at compile time.
20 .PP
21 Please note that it is entirely possible to completely lock yourself out of
22 the console with the \fB-a,--all\fR option if you cannot remember your
23 password!  Unless you are able to kill vlock by logging in remotely via a
24 serial terminal or network, a hard reset is the only method of ``unlocking''
25 the display.
26 .PP
27 When locking the entire console display it is sometimes still possible to kill
28 vlock using the Secure Access Key (SAK) or other commands that are available
29 through the SysRq mechanism.  When the \fB-s,--disable-sysrq\fR and
30 \fB-a,--all\fR options are given the SysRq mechanism is disabled while vlock is
31 running.  See /usr/src/linux/Documentation/sysrq.txt for more details.
32 .PP
33 \fBvlock\fR works for console sessions primarily.  To lock the entire console
34 display from an X session use the \fB-n,--new\fR option. \fBvlock\fR will then
35 switch to an empty virtual console before locking.  Giving this option implies
36 the \fB-a,--all\fR option.
37 .PP
38 The options \fB-n,--new\fR, \fB-s,--disable-sysrq\fR, and \fB-t,--timeout\fR
39 only work if vlock is compiled with plugin support.  See the PLUGINS section
40 for more information.
41 .SH OPTIONS
42 .B -a,--all
43 .IP
44 Lock all console sessions and disable VC switching.
45 .PP
46 .B -c,--current
47 .IP
48 Lock the current session (this is the default).
49 .PP
50 .B -n,--new
51 .IP
52 Switch to a new virtual console before locking all console sessions.
53 .PP
54 .B -s,--disable-sysrq
55 .IP
56 Disable sysrq while consoles are locked.  Does not have effect unless
57 the \fB-a,--all\fR option is also specified.
58 .PP
59 .B -t,--timeout <seconds>
60 .IP
61 Run screen saver plugins after the given timeout.  See the PLUGINS section for
62 more information.
63 .PP
64 .B -h,--help
65 .IP
66 Print a brief help message.
67 .PP
68 .B -v,--version
69 .IP
70 Print the version number of \fBvlock\fR.
71 .PP
72 .SH PLUGINS
73 If vlock is compiled with plugin support, it is possible to trigger custom
74 actions at certains points vlock locks the virtual console.  A plugin may be
75 called before or after vlock locks the console.  It may also be called while
76 the console is locked after the timeout given through the \fB-t,--timeout\fR
77 option or the Escape key is pressed.
78 .PP
79 The plugins that should be loaded by vlock may be given as command line
80 arguments or specified through enviroment variable \fBVLOCK_PLUGINS\fR (see
81 below).
82 .SH "ENVIRONMENT VARIABLES"
83 .B USER
84 .IP
85 When \fBvlock\fR is run as root (uid 0) and the \fBUSER\fR environment variable
86 is set, \fBvlock\fR prompts for this user's password.
87 .PP
88 .B VLOCK_MESSAGE
89 .IP
90 If this variable is set it will be printed before each password prompt.
91 .PP
92 .B VLOCK_ALL_MESSAGE
93 .B VLOCK_CURRENT_MESSAGE
94 .IP
95 Like \fBVLOCK_MESSAGE\fR but if you set these variables instead, \fBvlock\fR will
96 automatically choose the message.  \fBVLOCK_ALL_MESSAGE\fR is printed when all
97 sessions are locked and console switching is disabled. Otherwise
98 \fBVLOCK_CURRENT_MESSAGE\fR is printed.  These variables will only be used
99 if \fBVLOCK_MESSAGE\fR is unset.
101 .B VLOCK_PLUGINS
103 Set this variable to a space separated list of plugins that should be loaded
104 every time you run vlock.
106 .B VLOCK_PROMPT_TIMEOUT
108 Set this variable to specify the amount of time (in seconds) you will have to
109 enter your password at the password prompt.  \fBWarning\fR: If this value is too
110 low, you will have trouble unlocking your machine.
112 .B VLOCK_TIMEOUT
114 Set this variable to specify the timeout (in seconds) after which the screen
115 saver plugins (if any) will be invoked.
117 .SH FILES
118 .B ~/.vlockrc
120 If existent, this file is read by \fBvlock\fR on startup.  All the 
121 variables mentioned above can be set here.
122 .SH SECURITY
123 See the SECURITY file in the \fBvlock\fR distribution for more information.
125 .SH NOTES
126 Long options depend on the availability of an enhanced getopt(1) command.  On
127 systems without it only the short options will work and long options will cause
128 errors.
130 .SH "SEE ALSO"
131 .BR vlock-main (8),
132 .BR getopt (1)
133 .SH AUTHORS
134 Michael K. Johnson <http://danlj.org/mkj/>
136 Frank Benkstein <frank-vlock@benkstein.net>