aboutsummaryrefslogtreecommitdiffstats
path: root/doc/info/chap/invoking.texinfo
blob: 008c883299fdabf57082ff965fd1065a43524eca (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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
@node Invoking
@chapter Invoking

Example usages:
@example
/sbin/sleeping-getty 15 /sbin/got tty15 TERM=linux

/sbin/sleeping-getty 16 /sbin/got tty16 TERM=linux

/sbin/sleeping-getty 20 /sbin/agetty -8 -s 38400 tty20 linux
@end example

The first argument shall be the number of the
virtual terminal the process waits for to be
be brought to the foreground.

The second argument shall be pathname of the
getty program that shall be started once the
virtual terminal is in the foreground. Note
that @env{PATH} is probably not set up, and
a full pathname is required.

The rest of the arguments shall be those that
are passed to the getty program.

For example,
@example
/sbin/sleeping-getty 15 /sbin/got tty15 TERM=linux
@end example
@noindent
shall wait for virtual terminal number 15
(on which you will find @file{/dev/tty15})
to become active. Then the processes is
switch to, without forking,
@command{/sbin/got tty15 TERM=linux},
which is Gates of Tartaros on @file{/dev/tty15}
with the environment variable @env{TERM} set
to @command{linux}.

Note that @command{sleeping-getty} works on
VT:s, not TTY:s. It cannot wait for a serial
console to become, active, only virtual terminals.

Also note, @command{sleeping-getty} does not acquire
the TTY. That would be a waste of CPU cycles. This
means, if naïvely used, that if you start your
computer, log in on @file{tty1}, and start @command{X},
and have @command{startx} configured to start @command{X}
on the next available VT. @command{X} will start on
VT@tie{}2. This is probably not want you want. Instead
you should edit startx to ensure that a VT lower than
a preferred number (customarily 7) will not be used.