From owner-freebsd-questions Thu Dec 28 13:14:51 1995 Return-Path: owner-questions Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id NAA29738 for questions-outgoing; Thu, 28 Dec 1995 13:14:51 -0800 (PST) Received: from winky.reno.nv.us (winky.reno.nv.us [140.174.194.250]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id NAA29728 for ; Thu, 28 Dec 1995 13:14:45 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by winky.reno.nv.us (8.6.12/8.6.9) with SMTP id NAA02322; Thu, 28 Dec 1995 13:13:48 -0800 Message-Id: <199512282113.NAA02322@winky.reno.nv.us> X-Authentication-Warning: winky.reno.nv.us: Host localhost didn't use HELO protocol To: James FitzGibbon cc: questions@freebsd.org Subject: Re: Commandline switch vty ? In-reply-to: Your message of "Thu, 28 Dec 1995 13:12:30 EST." Date: Thu, 28 Dec 1995 13:13:48 -0800 From: Eric Blood Sender: owner-questions@freebsd.org Precedence: bulk In message you write: >Does anyone know of a way to change the current vty from the command line? Upon examining the source for syscons (/usr/src/sys/i386/isa/syscons.c), it recognizes ANSI character sequences. One of the codes is ESC[nz. This will change to the nth console. With this following program, you can switch to a given console at the command line: escape.c void main(int argc, char **argv) { if (argc == 2) printf("%c%s\n", '\x1b', argv[1]); } In order to switch to the second console (ttyv1) you would do "escape [1z". Good luck. Eric Blood eblood@cs.unr.edu, http://www.cs.unr.edu/~eblood