systemd-pty-forward — Run a command with a custom terminal background color or title
systemd-pty-forward [OPTIONS...] {COMMAND}
systemd-pty-forward can be used to run a command with a custom terminal background color or title.
The following options are understood:
--background=COLOR¶Change the terminal background color to the specified ANSI color as long as the
command runs. The color specified should be an ANSI X3.64 SGR background color, i.e. strings such as
"40", "41", …, "47", "48;2;…",
"48;5;…". See ANSI
Escape Code (Wikipedia) for details.
Example: "--background=44" for a blue background.
--title=TITLE¶Change the terminal title to the specified string as long as the command runs.
--quiet, -q¶Suppresses additional informational output while running.
--console=MODE¶Selects how the terminal for the invoked command is acquired and connected. Takes one
of "interactive", "read-only", "broker" or
"broker-log".
If "interactive" (the default) a pseudo TTY is allocated locally and the
calling terminal is forwarded to it interactively, i.e. both terminal output and user input are
forwarded. If "read-only" this is similar, but no user input from standard input is
forwarded to the command.
If "broker" or "broker-log" the pseudo TTY is not allocated
locally, but acquired from
systemd-ptybrokerd.service(8).
In both cases the broker retains the frontend (i.e. the "master") side of the pseudo TTY and the
command is invoked on the acquired backend (i.e. the "slave") side. With "broker"
the frontend output is discarded (unless monitored), with "broker-log" it is written
to the logs by systemd-ptybrokerd.service. The allocated pseudo TTY may
subsequently be monitored, listed or hung up with
ptyctl(1).
--system, --user¶When --console=broker or --console=broker-log is
used, selects whether to talk to the system-wide instance or the per-user instance of
systemd-ptybrokerd.service(8).
Defaults to --system. Has no effect in the other console modes.
--pty-name=NAME¶When --console=broker or --console=broker-log is
used, registers the newly allocated pseudo TTY under the specified name with
systemd-ptybrokerd.service(8);
if not specified (the default) the broker picks a randomized name. Has no effect in the other console
modes.
--no-ask-password¶Do not query the user for authentication for privileged operations.
-h, --help¶--version¶Print a short version string and exit.