Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 acpi 中运行一个脚本,如果当前显示的虚拟终端,切换回终端 X11 正在运行;否则切换到 tty1。
所以唯一的问题是,我如何使用程序来获取当前显示终端的名称?
有什么建议么 ?tty无济于事,因为它只获取终端,它正在运行,而不是显示终端。
tty
非常感谢 !
我想知道为什么你需要这样做,但你可能需要编写一个使用VT_* ioctl()s in的程序console_ioctl(4)。
VT_*
ioctl()
console_ioctl(4)