Linux 使用tty0 显示10分钟自动关闭功能

  • 如果用屏幕显示控制台,10分钟左右会自动关闭,有如下方法可以解决

  • 在应用层调用如下代码:

    #include <fcntl.h>
    #include <stdio.h>
    #include <sys/ioctl.h>
    #include <unistd.h>

    int main(int argc ,char *argv[])
    {
        int f0;
        f0 = open("/dev/tty0", O_RDWR);
        write(f0, "33[9;0]", 8);

        close(f0);
        return 0;
    }
原文地址:https://www.cnblogs.com/chenfulin5/p/8349510.html