keyboard command to reset GNOME

Latest response

I hate asking stupid questions, but I've got a couple hopefully easy ones maybe someone can solve. Here's the first:
On 6.5 you could easily reset the display manager by using control-alt-backspace at the console. That seems to have been disabled in 7. Although it is sloppy to allow users to leave themselves logged on, it's easier to just log them off using control-alt-bs than to chase after them in an academic environment, where students often leave themselves logged in and the display locked. Although a new user can 'switch user', it incurs the overhead of another login session, and since we are using NFS-mounted home directories, it keeps a mount active and can cause problems when the errant student later logs into another workstation and tries to run such programs as firefox. Although a cron job resets the display manager nightly, by then there can be several GUI logins active on some workstations. It is easier to just log them all off using control-alt-backspace.

Does anyone know if there is a similar capability in 7? (I know control-alt delete is supposed to log you off, but it doesnt work if the display is locked.)

thanks

Responses

Hi Greg,

There are a number of ways to enable this shortcut. For a system-wide setting, you can add an appropriate rule to the /etc/X11/xorg.conf.d directory. My testing machine with RHEL7 already has a 00-keyboard.conf file in that directory. If that's the case for you, you can modify the contents to look like this:

Section "InputClass"
        Identifier "system-keyboard"
        MatchIsKeyboard "on"
        Option "XkbLayout" "us"
        Option "XkbOptions" "terminate:ctrl_alt_bksp" # <-- added this line
EndSection

Just add that line, restart X, and it should work.

If there's no file with keyboard rules, create one (same name, same contents).

To set this shortcut for specific users, you can add the following command to the ~/.xinitrc file (or create one if it doesn't exist):

setxkbmap -option terminate:ctrl_alt_bksp

Finally, you can also set it (for the current user) through the gnome-tweak-tool GUI app. The option is in the Typing section.

thanks a lot, robert. i'll test out your solution this week and add it to kickstart! this is the sort of thing that would take me a lot of research to figure out. you saved me a lot of time.

works like a champ! thanks!

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.