lkml.org 
[lkml]   [1999]   [Feb]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    Date
    From
    SubjectRe: Changing the active console
    On Tue, 16 Feb 1999, Roberto Fasciolo wrote:

    > Hi.
    >
    > 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.
    >

    Well it might not exactly be a system call...but its an ioctl()...
    It would generally go something like...

    #include <sys/ioctl.h>
    #include <linux/vt.h>

    int main(char *argv, int argc)
    {
    int fd;
    open("/dev/tty", O_RDONLY);
    /* 3 is the VT you wish to switch to */
    ioctl(fd, VT_ACTIVATE, 3);
    close(fd);
    }


    -
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to majordomo@vger.rutgers.edu
    Please read the FAQ at http://www.tux.org/lkml/

    \
     
     \ /
      Last update: 2005-03-22 13:50    [W:4.739 / U:0.088 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site