How to disable short-cut key Ctrl+Alt-Fn switch to virtual terminal

Issues related to applications and software problems and general support
Post Reply
harrywangca
Posts: 107
Joined: 2016/01/12 23:27:04
Location: Vista California

How to disable short-cut key Ctrl+Alt-Fn switch to virtual terminal

Post by harrywangca » 2020/09/01 23:12:04

Hello everyone,

Does anyone know how to disable switch to virtual terminal via short cut keys: Ctrl+Alt+Fn?
Before I used X11 display server and just config as following and it will prevent switch to VT.
Section "ServerFlags"
Option "DontVTSwitch" "on"
EndSection

Right now if I want keep Wayland display server by default in the system. I modified file: /etc/systemd/loginf.conf file to uncomment 2 lines and changed to:
NAutoVTs=0
ReserveVT=N
then this will disable open a virtual terminal, but display still switch to virtual terminal even though it can not get any virtual terminal.
My question is: how to config prevent display switch (to VT)

Regards,

harrywangca
Posts: 107
Joined: 2016/01/12 23:27:04
Location: Vista California

Re: How to disable short-cut key Ctrl+Alt-Fn switch to virtual terminal

Post by harrywangca » 2020/09/03 06:35:43

So far I configure file: /etc/systemd/logind.conf as followings:
NAutoVTs=0 ---> disable auto allocate vertual terminal
ReserveVT=0 ---> disable reserve virtual terminal

reboot the machine it works. But when i enable it just Add # sign to both of them to reboot, then disable again, this time it won't get disable and all of them could be switch to virtual terminals (click Ctrl_Alt+f2.3.4.5.6). It is really a NIGHTMARE!

I am so depressed!

harrywangca
Posts: 107
Joined: 2016/01/12 23:27:04
Location: Vista California

Re: How to disable short-cut key Ctrl+Alt-Fn switch to virtual terminal

Post by harrywangca » 2021/09/09 23:34:56

Heat up!!

Any one help is very appreciated!!

Under Wayland display server, is there a way to configured preventing switch to virtual console?

Thanks

sml
Posts: 305
Joined: 2020/01/17 09:01:44

Re: How to disable short-cut key Ctrl+Alt-Fn switch to virtual terminal

Post by sml » 2021/09/10 06:56:02

Have a look at vlock that comes with the kbd package.

Post Reply