禁止用户使用ctrl+alt+Fn进行tty1-ttyn切换的设置

1.生成xorg.conf文件

在Ubuntu12.04中, 系统默认是不会生成xorg.conf文件的,需要使用命令手动生成xorg.conf文件(注意:需要在真正的终端里面运行,并非X环境下的终端模拟器)

1)停止display manager 

     sudo service gdm stop

2) 生成新的xorg.conf文件, 此时生成的文件只是为xorg.conf.new

      sudo Xorg -configure :1

3) 将新生成分xorg.conf 文件移动到/etc/X11目录下

     sudo mv xorg.conf.new xorg.conf

2.修改xorg.conf文件

 vi /etc/X11/xorg.conf 在最后添加如下内容

     Section "ServerFlags"

     Option  "DontVTSwitch" "true"

     EndSection

保存并退出 

3.重启 

    sudo reboot


本文出自 “石破天惊” 博客,转载请与作者联系!

你可能感兴趣的:(linux,tty)