Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

This question already has an answer here:

Related: Disable CTRL+ALT+F4 switching to virtual terminal

I would like to use Ctrl+Alt+F4 for a program instead of Ubuntu's TTYs.

The previous question, I saw suggested command xmodmap -pke | sed -n 's/ = .*VT_4.*/ = /p' | xmodmap - which did not work for me. I ran it with Alt+F2.

share|improve this question

marked as duplicate by Eliah Kagan, Eric Carvalho, Basharat Sialvi, user68186, Stephen Myall Jul 21 '13 at 22:06

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
Try not running it with Alt+F2 try running it in a terminal –  Marco Ceppi Jun 27 '11 at 22:41

1 Answer 1

up vote 4 down vote accepted

This will disable a few more key sequences than just the Ctrl+Alt+F# shortcuts, but should do what you want.

  1. Open the Keyboard configuration tool.

    enter image description here

  2. Switch to the Layouts tab and click the Options... button.

    enter image description here

  3. Expand the Miscellaneous compatibility options section and check the box next to
    Special keys (Ctrl+Alt+) handled in a server.

    enter image description here

    The effect should be instant and persist when you log in again.

This also disables a few other server shortcuts such as Ctrl+Alt++ / - to switch video modes.

share|improve this answer

Not the answer you're looking for? Browse other questions tagged or ask your own question.