Answer the question
In order to leave comments, you need to log in
Why doesn't ALT-CTRL-Fx work?
Hello.
Linux CentOS 7
I go to the console via SSH via Putty. I want to switch to TTY2 for example. I press CTRL + ALT + F2, but in the console only [12 ~
Or
Under a simple user, I enter chvt 2:
[[email protected] ~]$ chvt 2
Couldn't get a file descriptor referring to the console
[[email protected] user]# chvt 2
[[email protected] user]#
Answer the question
In order to leave comments, you need to log in
I go to the console via SSH through Putty. I want to switch to TTY2 for example. I press CTRL+ALT+F2, but the console only shows [12~
What am I doing wrong?
Under a simple user, I enter chvt 2:
If under root, then the command is executed and that's it.
What am I doing wrong?
$ strace -iv chvt 2
...
[00007f96b99d56f0] open("/proc/self/fd/0", O_RDWR) = 3
[00007f96b99da80a] ioctl(3, TCGETS, {c_iflags=0x5500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
[00007f96b99db017] ioctl(3, KDGKBTYPE, 0x7fff06db6d67) = -1 ENOTTY (Inappropriate ioctl for device)
[00007f96b99d5f30] close(3) = 0
[00007f96b99d56f0] open("/dev/tty", O_RDWR) = 3
[00007f96b99da80a] ioctl(3, TCGETS, {c_iflags=0x5500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
[00007f96b99db017] ioctl(3, KDGKBTYPE, 0x7fff06db6d67) = -1 ENOTTY (Inappropriate ioctl for device)
[00007f96b99d5f30] close(3) = 0
[00007f96b99d56f0] open("/dev/tty0", O_RDWR) = -1 EACCES (Permission denied)
...
$ sudo strace chvt 2
...
[00007f591848c6f0] open("/proc/self/fd/0", O_RDWR) = 3
[00007f591849180a] ioctl(3, TCGETS, {c_iflags=0x5500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
[00007f5918492017] ioctl(3, KDGKBTYPE, 0x7fffe5e72d17) = -1 ENOTTY (Inappropriate ioctl for device)
[00007f591848cf30] close(3) = 0
[00007f591848c6f0] open("/dev/tty", O_RDWR) = 3
[00007f591849180a] ioctl(3, TCGETS, {c_iflags=0x5500, c_oflags=0x5, c_cflags=0xbf, c_lflags=0x8a3b, c_line=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
[00007f5918492017] ioctl(3, KDGKBTYPE, 0x7fffe5e72d17) = -1 ENOTTY (Inappropriate ioctl for device)
[00007f591848cf30] close(3) = 0
[00007f591848c6f0] open("/dev/tty0", O_RDWR) = 3
[00007f591849180a] ioctl(3, TCGETS, {c_iflags=0x5, c_oflags=0, c_cflags=0xbf, c_lflags=0, c_line=0, c_cc[VMIN]=1, c_cc[VTIME]=0, c_cc="\x03\x1c\x7f\x15\x04\x00\x01\x00\x11\x13\x1a\x00\x12\x0f\x17\x16\x00\x00\x00"}) = 0
[00007f5918492017] ioctl(3, KDGKBTYPE, 0x7fffe5e72d17) = 0
[00007f5918492017] ioctl(3, VT_ACTIVATE, 0x2) = 0
[00007f5918492017] ioctl(3, VT_WAITACTIVE, 0x2) = 0
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question