29
rated 0 times
[
29]
[
0]
/ answers: 1 / hits: 54025
/ 3 Years ago, sat, may 15, 2021, 2:18:02
How do I disable switching to virtual terminals (TTYs) using(Ctrl+Alt+F1...F6) in Ubuntu?
More From » tty
How do I disable switching to virtual terminals (TTYs) using(Ctrl+Alt+F1...F6) in Ubuntu?
I found three methods. I'm listing to help others if they need:
sudo tee -a /etc/init/tty{1..6}.override <<<"manual"
Open/create the file /etc/X11/xorg.conf
using the following command:
sudo -i gedit /etc/X11/xorg.conf
and add the following lines inside:
Section "ServerFlags"
Option "DontVTSwitch" "true"
EndSection
sudo -i
vi /etc/default/console-setup
change ACTIVE_CONSOLES="/dev/tty[1-6]"
to your choice. Lets say if you want only two TTY or virtual console then change to ACTIVE_CONSOLES="/dev/tty[1-2]"
cd /etc/event.d
Comment on all the lines in ttyX
file that you don't need. In this example tty3-tty6
Reboot to see the change.