aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info/chap/invoking.texinfo
blob: 53fae77151a94e4c188c202dfc3e7bad9766e6e4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
@node Invoking
@chapter Invoking

@command{vtchs} ignores the command line
and the environment variables. You cannot
control its behaviour.

However, it is required that standard input
is a @file{/dev/tty} device. If this programs
is running under root,
@example
vtchs < /dev/tty1
@end example
@noindent
is sufficient. Non-root users need to find
a TTY that they have access to. If your
shell is GNU Bash, you can use
@example
vtchs < "/dev/tty$( i=1;
                    while true; do
                      if ! test -e /dev/tty$i; then
                        exit 1;
                      fi;
                      exec < /dev/tty$i &&
                      echo $i &&
                      exit 0 ||
                      : $(( i++ ));
                    done 2>/dev/null
                  )"
@end example