13.4. Disabling Command-Line Access
- Set the
org.gnome.desktop.lockdown.disable-command-lineGSettings key, which prevents the user from accessing the terminal or specifying a command line to be executed (the Alt+F2 command prompt).
- Disable switching to virtual terminals (VTs) with the Ctrl+Alt+function key shortcuts by modifying the X server configuration.
- Remove Terminal and any other application that provides access to the terminal from the menu and
Activities Overviewin GNOME Shell. This is done by removing menu items for those applications. For detailed information on how to remove a menu item, see Section 12.1.2, “Removing a Menu Item for All Users”.
13.4.1. Setting the org.gnome.desktop.lockdown.disable-command-line Key
- Create a
localdatabase for machine-wide settings in
[org/gnome/desktop/lockdown] # Disable command-line access disable-command-line=true
- Override the user's setting and prevent the user from changing it in
# Lock the disabled command-line access /org/gnome/desktop/lockdown
- Update the system databases:
- Users must log out and back in again before the system-wide settings take effect.
13.4.2. Disabling Virtual Terminal Switching
DontVTSwitchoption to the
Serverflagssection in an X configuration file in the
Procedure 13.4. Disabling Access to Virtual Terminals
- Create or edit an X configuration file in the
NoteBy convention, these host-specific configuration file names start with two digits and a hyphen and always have the .conf extension. Thus, the following file name can be
Section "Serverflags" Option "DontVTSwitch" "yes" EndSection
- Restart the X server for your changes to take effect.