Subject: Re: Changing the active console

From: [email-masked] (Zygo Blaxell)
Date: 18 Feb 1999 15:15:15 -0500

In article <[email-masked]>,
Roberto Fasciolo  <[email-masked]> wrote:
>I'd like to know if it's possible changing the active console (the same thing that pressing CTRL+ALT+Fx) with a system call, and, if it's possible, how can I do that.

See the source code for the 'kbd' package.  chvt does exactly this.
To simulate Ctrl-Alt-F3 you'd use something  like this:

	int fd = open("/dev/console", O_WRONLY);
	ioctl(fd, VT_ACTIVATE, 0x3);
-- 
Zygo Blaxell, Linux Engineer, Corel Corporation, [email-masked] (work),
[email-masked] (play).  It's my opinion, I tell you! Mine! All MINE!
Size of 'diff -Nurw [...] winehq corel' as of Thu Feb 18 14:14:01 EST 1999
Lines/files:  In 3905 / 14, Out 30668 / 391, Both 34339 / 394
-
Kernel-doc, Linux kernel documentation list.
http://mail.nl.linux.org/lists/