54

In ubuntu 11.04 there was a workaround using gconf-editor and setting key /apps/gnome_settings_daemon/plugins/xrandr/active to false.

However there is no such key in gconf-manager using ubuntu 11.10 (gnome 3).

aculich
  • 918

6 Answers6

62

On Ubuntu 18.04, I found two different keybindings for SUPER+P, which can be disabled with dconf-editor.

First, you need to install dconf-editor, if it's not already installed. This can be done in the terminal with the following command:

sudo apt install dconf-editor

Then you can launch it from the terminal:

dconf-editor

Within dconf-editor:

  • Navigate to: /org/gnome/mutter/keybindings/switch-monitor
  • If the "Custom value" field contains ['<Super>p', 'XF86Display'], then:
    • Disable "Use default value"
    • In the "Custom value" field, type the following: []
  • Navigate to: /org/gnome/settings-daemon/plugins/media-keys/video-out
  • If the "Custom value" field contains '<Super>p', then:
    • Disable "Use default value"
    • In the "Custom value" field, delete everything.
David
  • 721
  • 1
    This is just the same as the other answer.s – fosslinux May 22 '18 at 02:26
  • 10
    I don't agree. You have edited out an important info : the fact that my answer is specific to Ubuntu 18.04. Also, the accepted answer is irrelevant to 18.04, and none of the other answers fully fixes the issue with 18.04. – David May 22 '18 at 14:36
  • This worked on Bionic. Very annoying that there are two different settings for the same shrotcut. The mutter one worked for me – chaz Oct 12 '18 at 00:09
  • Thank you so much, this actually worked for me. At first i only had the media-keys/video-out disabled and it still was happening. I couldn't stand it. when I hit the combo accidentally (it's too close to my alt+p bind i use for paste mode in vim) it completely borks my multi monitor setup, requiring painful resetting. – Steven Lu Feb 12 '21 at 22:16
  • 3
    This works on 20.04 as well. – Paul McMillan Dec 02 '21 at 03:47
  • you can keep the ['XF86Display'] – premek.v Jun 11 '23 at 16:13
20

The new version of gnome-settings-daemon stores its configuration information in dconf rather than gconf.

To do the equivalent of what you were doing on 11.04, try the following:

  1. Install the dconf-tools package, and then run dconf-editor.
  2. In the tree on the left, navigate org -> gnome -> settings-daemon -> plugins -> xrandr.
  3. Uncheck the active checkbox.
  • It worked nicely, thanks! The actual name of the package is dconf-tools – Dovydas Sabonis Oct 18 '11 at 13:04
  • 1
    I've fixed up the answer now. Would you mind marking it as accepted if it solved your problem? – James Henstridge Oct 19 '11 at 01:23
  • 2
    The way to do this from the command line is: dconf write /org/gnome/settings-daemon/plugins/xrandr/active false – aculich Nov 07 '12 at 02:26
  • 1
    I found that w/ Ubuntu 13.04 it's also necessary to do dconf write /org/gnome/settings-daemon/plugins/media-keys/active false – Mark Aug 20 '13 at 20:46
  • In Ubuntu 14.04 all was needed: dconf write /org/gnome/settings-daemon/plugins/media-keys/active false from the command line :) – Leo Gallucci May 09 '14 at 16:22
  • 4
    @elgalu: doing this will disable all media keys - including volume up, down, screenshots, etc. Certainly not what the OP wanted. – Gui Ambros Jun 28 '14 at 21:28
  • 1
    Yes @GuiAmbros it sucks, i still have no solution for this issue on Ubuntu 14.04 – Leo Gallucci Jul 01 '14 at 16:56
  • @LeoGallucci: see my answer, or scroll down (?). – setempler Feb 13 '15 at 17:52
  • Lovely! @setempler you finally solved my Super+P nightmare – Leo Gallucci Feb 13 '15 at 21:17
  • 1
    Warning for anyone considering this solution using Xenial (16.04) and using dual monitors: unchecking the active checkbox made it impossible for me to set correctly place the monitors (Settings -> Displays) and place the launcher on my desired monitor. – david Jun 19 '17 at 07:36
  • 1
    @ruquay Here's an answer that gives more context into what's really happening, here. It notes that disabling XRandR is unlikely to work for newer versions of Ubuntu. – jpaugh Jan 11 '18 at 17:27
  • 1
    This is not working anymore on more recent gnome environments. This key does not exist anymore. org.gnome.mutter.keybindings switch-monitor is the new key holding this functionality. See https://askubuntu.com/a/1287582/938922 – Jan Nov 10 '23 at 14:43
19

Here's how to disable it with gsettings from your terminal

gsettings set org.gnome.mutter.keybindings switch-monitor "[]"

If you want to restore the shortcut

gsettings set org.gnome.mutter.keybindings switch-monitor "['<Super>p']"
Slim
  • 507
9

In order to disable global <Super>p keybindings, and NOT any other media keys (tested in Ubuntu 15.04) I had to 'emtpy' the following dconf keys. I ran (in a terminal):

dconf write /org/gnome/settings-daemon/plugins/media-keys/video-out ''
dconf write /org/gnome/settings-daemon/plugins/media-keys/screenshot ''

Before, I searched with the next bash commands for values that contained '<Super>p':

b="/org/gnome/settings-daemon/plugins/media-keys/"
for i in `dconf list $b | sort`; do echo -n "$i: "; dconf read $b$i; done

To search all dconf keys, use the command:

dconf dump / | grep '<Super>p'

If you want to avoid the terminal, run the program dconf-editor and search for the key(s) there...

Edit:

After some upgrades and restarts, I had the keybinding not working any more. I found, that there is/was a bug in gnome-settings-daemon that defines <Super>p. A hack is described here.

In the startup process, /usr/bin/xbindkeys_autostart is executed on login. This script searches for the file in $HOME/.xbindkeysrc and loads the settings.

Since I wanted to map gnome-screenshot -c to <Super>p, I created the this file with the following content (and unmapped the settings in ubuntu/compiz):

# Content of $HOME/.xbindkeysrc
"gnome-screenshot -c"
mod4 + p
setempler
  • 510
7

This is still an issue as of Ubuntu 12.10 released October 18, 2012. A bug fix for this seemed to be in the works so that at least there is an easier way to re-configure the key bindings, but it has since been marked invalid because this was supposedly fixed in gnome-settings-daemon.

Ultimately this problem is supposedly due to some hardware vendors hard-coding video out to Super-P.

There have been updated conversations on the bug tracker since the currently-accepted answer that suggest not turning off xrandr, but instead turning off media-keys:

Try the following:

  1. Install the dconf-tools package, and then run dconf-editor.
  2. In the tree on the left, navigate org -> gnome -> settings-daemon -> plugins -> media-keys.
  3. Uncheck the active checkbox.

Or the command-line version of this is:

dconf write /org/gnome/settings-daemon/plugins/media-keys/active false

aculich
  • 918
  • This disables a lot more than just <super>P. If you just want to disable that, go to the location above, find video-out, and just change that. Doing this answer is throwing out the baby with the bathwater. – mlissner Oct 03 '17 at 16:56
5

Even if disabling the xrandr plugin isn't working for you (like me), I suggest you to try this (it works for me):

Go in the dconf-editor via the command "dconf-editor" in a terminal, then go at:

/org/gnome/mutter/keybindings/switch-monitor

and disable "use default value" and delete:

'<Super>p',