如何在 Wayland 服务器下运行 Ubuntun 20.04 时禁用 VT 控制台

如何在 Wayland 服务器下运行 Ubuntun 20.04 时禁用 VT 控制台

我现在运行 Ubuntu 20.04,并使用服务器:Wayland。我不知道如何在 Wayland 下禁用虚拟控制台开关。

在 X.org 服务器下添加以下内容:Option "DontVTSwitch" "True"/etc/X11/xorg.conf防止虚拟控制台切换。

答案1

在 Gnome Wayland 上,您可以通过设置以下 dconf 属性来取消设置虚拟终端切换的键绑定:

dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-1 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-2 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-3 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-4 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-5 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-6 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-7 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-8 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-9 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-10 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-11 "['']"
dconf write /org/gnome/mutter/wayland/keybindings/switch-to-session-12 "['']"

相关内容