| 1 |
.\" Copyright 1994-95 Jon Tombs ([email protected], [email protected]) |
| 2 |
.\" May be distributed under the GNU General Public License |
| 3 |
.TH OPENVT 1 "24 October 2024" "kbd" |
| 4 |
.SH NAME |
| 5 |
openvt \- start a program on a new virtual terminal (VT). |
| 6 |
.SH SYNOPSIS |
| 7 |
.B openvt |
| 8 |
[\-c vtnumber] [OPTIONS] [\-\-] command |
| 9 |
.SH DESCRIPTION |
| 10 |
.B openvt |
| 11 |
will find the first available VT, and run on it the given |
| 12 |
.B command |
| 13 |
with the given |
| 14 |
.B "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 |
\fB\-c\fR, \fB\-\-console\fR=\fI\,VTNUMBER\/\fR |
| 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 |
\fB\-f\fR, \fB\-\-force\fR |
| 25 |
Force opening a VT without checking whether it is already in use. |
| 26 |
.TP |
| 27 |
\fB\-e\fR, \fB\-\-exec\fR |
| 28 |
Directly execute the given command, without forking. |
| 29 |
This option is meant for use in |
| 30 |
.IR /etc/inittab . |
| 31 |
If you want to use this feature in another context, be aware that |
| 32 |
.B openvt |
| 33 |
has to be a session leader in order for \-e to work. See |
| 34 |
.BR setsid (2) |
| 35 |
or |
| 36 |
.BR setsid (1) |
| 37 |
on how to achieve this. |
| 38 |
.TP |
| 39 |
\fB\-s\fR, \fB\-\-switch\fR |
| 40 |
Switch to the new VT when starting the command. The VT of the new command |
| 41 |
will be made the new current VT. |
| 42 |
.TP |
| 43 |
\fB\-u\fR, \fB\-\-user\fR |
| 44 |
Figure out the owner of the current VT, and run login as that user. |
| 45 |
Suitable to be called by init. Shouldn't be used with \fI\-c\fR or \fI\-l\fR. |
| 46 |
.TP |
| 47 |
\fB\-l\fR, \fB\-\-login\fR |
| 48 |
Make the command a login shell. A \- is prepended to the name of the command |
| 49 |
to be executed. |
| 50 |
.TP |
| 51 |
\fB\-v\fR, \fB\-\-verbose\fR |
| 52 |
Be a bit more verbose. |
| 53 |
.TP |
| 54 |
\fB\-w\fR, \fB\-\-wait\fR |
| 55 |
wait for command to complete. If \-w and \-s are used together then |
| 56 |
.B openvt |
| 57 |
will switch back to the controlling terminal when the command completes. |
| 58 |
.TP |
| 59 |
\fB\-V\fR, \fB\-\-version\fR |
| 60 |
print program version and exit. |
| 61 |
.TP |
| 62 |
\fB\-h\fR, \fB\-\-help\fR |
| 63 |
show this text and exit. |
| 64 |
.TP |
| 65 |
\fB\-\-\fR |
| 66 |
end of options to |
| 67 |
.BR openvt . |
| 68 |
.SH NOTE |
| 69 |
If |
| 70 |
.B openvt |
| 71 |
is compiled with a getopt_long() and you wish to set |
| 72 |
options to the command to be run, then you must supply |
| 73 |
the end of options \-\- flag before the command. |
| 74 |
.SH EXAMPLES |
| 75 |
.B openvt |
| 76 |
can be used to start a shell on the next free VT, by using the command: |
| 77 |
.TP |
| 78 |
.I "openvt bash" |
| 79 |
.TP |
| 80 |
|
| 81 |
To start the shell as a login shell, use: |
| 82 |
.TP |
| 83 |
.I "openvt -l bash" |
| 84 |
.TP |
| 85 |
|
| 86 |
To get a long listing you must supply the \-\- separator: |
| 87 |
.TP |
| 88 |
.I "openvt -- ls -l" |
| 89 |
.SH HISTORY |
| 90 |
Earlier, |
| 91 |
.B openvt |
| 92 |
was called |
| 93 |
.BR open . |
| 94 |
It was written by Jon Tombs <[email protected]> or <[email protected]>. |
| 95 |
The \fI\-w\fR idea is from "sam". |
| 96 |
|
| 97 |
.SH "SEE ALSO" |
| 98 |
.BR chvt (1), |
| 99 |
.BR deallocvt (1), |
| 100 |
.BR vlock (1), |
| 101 |
.BR login (1) |