Subject: Re: PCVT questions / Virtual Terminals
To: netbsd-help@netbsd.org, Sean Murphy <033197m@acadiau.ca>
From: William O Ferry <WOFerry+@CMU.EDU>
List: netbsd-help
Date: 10/11/1998 00:34:10
Excerpts from internet.computing.netbsd.netbsd-help: 10-Oct-98 Virtual
Terminals by Sean Murphy@acadiau.ca 
> I've commented out pc0 and uncommented vt0 to enable them, ran
> /dev/MAKEDEV ttyv* and /dev/MAKEDEV pty*.  When i press alt-F11, it gives
> me a bunch of terminal options at the  bottom of the screen as well as a
> [X] line where X is the number of the VT (0-7) that i'm working on.
> However, the only screen where it shows me anything is 0.  Any other
> screen is just blank no matter how many times i hit enter or any other
> key.  The options set under ALT-F11 are the same for all 8 terminal
> screens. 

    Never knew about the Alt-F11 trick, thanks!

    What I'd imagine you're missing is the magic in /etc/ttys to
activate the other consoles.  If you look at /etc/ttys, you'll see a
line like:

ttyv0    "/usr/libexec/getty Pc"    pc3    on secure

    You want one of these lines for each of ttyv0-ttyv7.  Might want to
tweak some other values too.  Here's the relevant lines from my file,
I'm not sure if I set them ideally or not but it works for me...  =)

ttyv0    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv1    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv2    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv3    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv4    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv5    "/usr/libexec/getty Pcvt"    vt220    on secure
ttyv6    "/usr/libexec/getty Pcvt"    vt220    off insecure  # X11
ttyv7    "/usr/libexec/getty Pcvt"    vt220    off insecure  # X11

    Once you have edited /etc/ttys, reboot or do a "kill -HUP 1", which
will kick init to re-read the file.  Once it's done so, all of the
devices marked as "on" should have login prompts.  Note that you will
have to leave at least one set to off in order to use X.  I run xdm set
to -vt8 (ttyv7), and occasionally just do a startx, which opens on
ttyv6.  As I said, it works for me...  =)

    As far as the PCVT questions go:

1) Ctrl-Alt-F1 to F8 should switch between ttyv0 and ttyv7.  The keys F9
to F12 (no modifiers) will take you between ttyv0 and ttyv3.  Note that
you also have to do the edit to /etc/ttys mentioned above, and for good
measure do a "(cd /dev ; ./MAKEDEV all)" and make sure that you have
files such as /dev/ttyv0, /dev/ttyv1, etc, although I believe these
should already be there.  I assume you have also built a kernel
switching from the default pc0 to vt0?

2) I belive it should "just work".  I never had any troubles just
running the binaries at XFree86.org.  If you built from the xsrc tree I
am not sure if there is a configuration value to change or something.

3) Unfortunately I have no clue what the answer is for this one.

    Hope that helps.

                                                          Will Ferry