d70174720b7f3a4ecc6d1b862062a71cd41d0406
[platform/upstream/kbd.git] / openvt / openvt.1
1 .\" Copyright 1994-95 Jon Tombs (jon@gtex02.us.es, jon@robots.ox.ac.uk)
2 .\" May be distributed under the GNU General Public License
3 .TH OPENVT 1 V1.4 "19 Jul 1996" "Linux 1.x" "Linux Users' Manual"
4 .SH NAME
5 openvt \- start a program on a new virtual terminal (VT).
6 .SH SYNOPSIS
7 .B openvt 
8 [\-c vtnumber] [\-s] [\-u] [\-l] [\-v] [\-\-] command command_options
9 .SH DESCRIPTION
10 .B openvt
11 will find the first available VT, and run on it the given 
12 .BR command
13 with the given 
14 .BR "command options",
15 standard input, output and error are directed to that terminal. The current
16 search path ($PATH) is used to find the requested command. If no command is
17 specified then the environment variable $SHELL is used.
18 .SS OPTIONS
19 .TP
20 .I "\-c vtnumber" 
21 Use the given VT number and not the first available. Note you
22 must have write access to the supplied VT for this to work.
23 .TP
24 .I "\-s"
25 Switch to the new VT when starting the command. The VT of the new command
26 will be made the new current VT.
27 .TP
28 .I "\-u"
29 Figure out the owner of the current VT, and run login as that user.
30 Suitable to be called by init. Shouldn't be used with -c or -l.
31 .TP
32 .I "\-l"
33 Make the command a login shell. A \- is prepended to the name of the command
34 to be executed.
35 .TP
36 .I "\-v"
37 Be a bit more verbose.
38 .TP
39 .I "\-w"
40 wait for command to complete. If \-w and \-s are used together then
41 .B openvt
42 will switch back to the controlling terminal when the command completes.
43 .TP
44 .I "\-\-" 
45 end of options to
46 .BR openvt .
47 .SH NOTE
48 If
49 .B openvt
50 is compiled with a POSIX (GNU) getopt() and you wish to set
51 options to the command to be run, then you must supply
52 the end of options \-\- flag before the command.
53 .BR
54 .SH EXAMPLES
55 .B openvt
56 can be used to start a shell on the next free VT, by using the command:
57 .TP
58 .I "openvt bash"
59 .TP
60
61 To start the shell as a login shell, use:
62 .TP
63 .I "openvt -l bash"
64 .TP
65
66 To get a long listing you must supply the \-\- separator:
67 .TP
68 .I "openvt -- ls -l"
69 .BR
70
71 .SH HISTORY
72 Earlier,
73 .B openvt
74 was called
75 .BR open .
76 It was written by Jon Tombs <jon@gtex02.us.es or jon@robots.ox.ac.uk>.
77 The \-w idea is from "sam".
78
79 .SH "SEE ALSO"
80 .BR chvt (1),
81 .BR doshell (8),
82 .BR login (1)