Re: Quake and getvc
Brian Skreeg wrote:
> Trouble is I need a program called getvc.
> Is there a debian package with this in it?
This is amusing, becuase I'm a debian developer, and the author of getvc and
of the script below, and yet getvc is not in debian. :-)
> #!/bin/sh
> # Run something on a VC, from X, and switch back to X when done.
> # GPL Joey Hess, Thu, 10 Jul 1997 23:27:08 -0400
> # EDIT THIS FILE TO WORK WITH YOUR SYSTEM..
>
> exec open -s -- sh -c "glqwcl -nocdaudio -mem 32 $* ; chvt `getvc`"
Here is the code for getvc. I'll consider adding this to the open package or
something.
/* Prints the number of the current VC to stdout. Most of this code
* was ripped from the open program, and this code is GPL'd
*
* Joey Hess, Fri Apr 4 14:58:50 EST 1997
*/
#include <sys/vt.h>
#include <fcntl.h>
main () {
int fd = 0;
struct vt_stat vt;
if ((fd = open("/dev/console",O_WRONLY,0)) < 0) {
perror("Failed to open /dev/console\n");
return(2);
}
if (ioctl(fd, VT_GETSTATE, &vt) < 0) {
perror("can't get VTstate\n");
close(fd);
return(4);
}
printf("%d\n",vt.v_active);
}
--
see shy jo
--
TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word "unsubscribe" to
debian-user-request@lists.debian.org .
Trouble? e-mail to templin@bucknell.edu .
Reply to: