man-pages/man1/openvt.1.html
2021-03-31 01:06:50 +01:00

181 lines
4.1 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD><TITLE>Man page of OPENVT</TITLE>
</HEAD><BODY>
<H1>OPENVT</H1>
Section: Linux 1.x (1)<BR>Updated: V1.4<BR><A HREF="#index">Index</A>
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
<A NAME="lbAB">&nbsp;</A>
<H2>NAME</H2>
openvt - start a program on a new virtual terminal (VT).
<A NAME="lbAC">&nbsp;</A>
<H2>SYNOPSIS</H2>
<B>openvt </B>
[-c vtnumber] [OPTIONS] [--] command
<A NAME="lbAD">&nbsp;</A>
<H2>DESCRIPTION</H2>
<B>openvt</B>
will find the first available VT, and run on it the given
<B>command</B>
with the given
<B>command options,</B>
standard input, output and error are directed to that terminal. The current
search path ($PATH) is used to find the requested command. If no command is
specified then the environment variable $SHELL is used.
<A NAME="lbAE">&nbsp;</A>
<H3>OPTIONS</H3>
<DL COMPACT>
<DT id="1"><I>-c, --console=VTNUMBER</I>
<DD>
Use the given VT number and not the first available. Note you
must have write access to the supplied VT for this to work;
<DT id="2"><I>-f, --force</I>
<DD>
Force opening a VT without checking whether it is already in use;
<DT id="3"><I>-e, --exec</I>
<DD>
Directly execute the given command, without forking.
This option is meant for use in
<I>/etc/inittab</I>.
If you want to use this feature in another context, be aware that
<B>openvt</B>
has to be a session leader in order for -e to work. See
<B><A HREF="/cgi-bin/man/man2html?2+setsid">setsid</A></B>(2)
or
<B><A HREF="/cgi-bin/man/man2html?1+setsid">setsid</A></B>(1)
on how to achieve this.
<DT id="4"><I>-s, --switch</I>
<DD>
Switch to the new VT when starting the command. The VT of the new command
will be made the new current VT;
<DT id="5"><I>-u, --user</I>
<DD>
Figure out the owner of the current VT, and run login as that user.
Suitable to be called by init. Shouldn't be used with -c or -l;
<DT id="6"><I>-l, --login</I>
<DD>
Make the command a login shell. A - is prepended to the name of the command
to be executed;
<DT id="7"><I>-v, --verbose</I>
<DD>
Be a bit more verbose;
<DT id="8"><I>-w, --wait</I>
<DD>
wait for command to complete. If -w and -s are used together then
<B>openvt</B>
will switch back to the controlling terminal when the command completes;
<DT id="9"><I>-V, --version</I>
<DD>
print program version and exit;
<DT id="10"><I>-h, --help</I>
<DD>
show this text and exit.
<DT id="11"><I>-- </I>
<DD>
end of options to
<B>openvt</B>.
</DL>
<A NAME="lbAF">&nbsp;</A>
<H2>NOTE</H2>
If
<B>openvt</B>
is compiled with a getopt_long() and you wish to set
options to the command to be run, then you must supply
the end of options -- flag before the command.
<A NAME="lbAG">&nbsp;</A>
<H2>EXAMPLES</H2>
<B>openvt</B>
can be used to start a shell on the next free VT, by using the command:
<DL COMPACT>
<DT id="12"><I>openvt bash</I>
<DD>
<DT id="13"><DD>
To start the shell as a login shell, use:
<DT id="14"><I>openvt -l bash</I>
<DD>
<DT id="15"><DD>
To get a long listing you must supply the -- separator:
<DT id="16"><I>openvt -- ls -l</I>
<DD>
<P>
</DL>
<A NAME="lbAH">&nbsp;</A>
<H2>HISTORY</H2>
Earlier,
<B>openvt</B>
was called
<B>open</B>.
It was written by Jon Tombs &lt;<A HREF="mailto:jon@gtex02.us.es">jon@gtex02.us.es</A> or <A HREF="mailto:jon@robots.ox.ac.uk">jon@robots.ox.ac.uk</A>&gt;.
The -w idea is from &quot;sam&quot;.
<P>
<A NAME="lbAI">&nbsp;</A>
<H2>SEE ALSO</H2>
<B><A HREF="/cgi-bin/man/man2html?1+chvt">chvt</A></B>(1),
<B><A HREF="/cgi-bin/man/man2html?8+doshell">doshell</A></B>(8),
<B><A HREF="/cgi-bin/man/man2html?1+login">login</A></B>(1)
<P>
<HR>
<A NAME="index">&nbsp;</A><H2>Index</H2>
<DL>
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
<DL>
<DT id="20"><A HREF="#lbAE">OPTIONS</A><DD>
</DL>
<DT id="21"><A HREF="#lbAF">NOTE</A><DD>
<DT id="22"><A HREF="#lbAG">EXAMPLES</A><DD>
<DT id="23"><A HREF="#lbAH">HISTORY</A><DD>
<DT id="24"><A HREF="#lbAI">SEE ALSO</A><DD>
</DL>
<HR>
This document was created by
<A HREF="/cgi-bin/man/man2html">man2html</A>,
using the manual pages.<BR>
Time: 00:05:21 GMT, March 31, 2021
</BODY>
</HTML>