LinuxCommandLibrary

openvt

Start a program in a new virtual terminal

SYNOPSIS

openvt [options] [--] [command [arguments...]]

PARAMETERS

-c vtn
    Use the specified virtual terminal vtn.

-f
    If a free VT cannot be found, use the last used VT. This is useful for applications that require a VT, but should not start more than one.

-l
    Make the new VT a login shell. This may affect the way the shell initializes its environment.

-n
    Do not switch to the new VT.

-s
    Switch to the new VT.

-u
    Determine the owner of the new VT based on the current user's ID.

-v
    Be verbose.

--
    Signals the end of options. Any arguments after this will be treated as part of the command to be executed.

DESCRIPTION

The openvt command allows you to start a command on a new virtual terminal (VT). This is useful for running programs in the background or for switching between different tasks without having to use multiple login sessions. It attempts to find the first available VT and starts the specified command there. If no command is given, openvt starts a new shell on the VT. Several options allow specifying which VT to use, whether to switch to it, and to modify the user's environment during the new terminal's launch. The command is valuable for automation scripts or environments where running tasks in separate, isolated terminals enhances organization and stability. It provides a simple and efficient way to manage multiple tasks without cluttering the primary display.

EXIT STATUS

openvt returns the exit status of the command it executes.
If the command execution fails (e.g., the specified VT cannot be opened or the command cannot be found), openvt returns a non-zero exit status.

SEE ALSO

chvt(1), xinit(1), login(1)

Copied to clipboard