7

How do I stop D from showing the Desktop?

When I RDP (xrdp) or VNC (built-in or x11vnc, client-side UltraVNC), pressing 'D' shows the desktop.

Please tell me how to remove this binding.

1
  • I have had the exact same thing happen - curious to see the answer. Sep 22, 2011 at 19:12

4 Answers 4

6

enter image description hereenter image description here

As an alternative to the above answer, what I did in my remote session was edit the dconf for ubuntu 12.10 on the gnome-fallback ui.

open Applications\System Tools\dconf Editor

navigate to org\gnome\desktop\wm\keybindings

then change the show-desktop keybinding to [].

I then rebooted the machine, but you probably could just restart the service, and everything worked.

2
  • 1
    Finally, someone talking about gnome-fallback! This problem is everywhere on askubuntu, but Jeremy's solution is one of the only ones that works with the fallback ui. [Edit: Worked for me on 13.04]
    – fernferret
    Sep 15, 2013 at 1:30
  • I was having a similar problem with the 's' key on gnome-flashback in 14.04. It opened the Applications menu, making the remote session completely unusable. In the same menu described above under the panel-main-menu keybinding. Getting rid of '<Super>s' from the default list ['<Super>s','<Alt>F1'] solved my problem. Not sure why just the 's' key alone would be interpreted as '<Super>s' by the system.
    – scottgwald
    Oct 3, 2014 at 17:58
5

I've had the same thing happen. Here's what I do to solve:

  • Go to System menu -> Preferences -> Keyboard Shortcuts
  • Under the Window Management catagory, select the entry for Hide all normal windows and set focus to the desktop and press the Backspace key to clear the entry
  • Restart the vncserver session

An alternative option is to use the command line within the session. Paste the following in the terminal:

gconftool-2 -t str -s /apps/metacity/global_keybindings/show_desktop ""
3

So I have seen the same question asked on 5 different stackexchange sites, and all the answers say to just remove the hotkey, which does work, but isn't the root of the problem (at least it wasn't for me). The real problem is that the windows super key is not mapped correctly, as is described here:

i3 ignores mod4 (windows key) when in VNC session

Basically just run these two commands

xmodmap -e "clear mod4"
xmodmap -e "add Mod4 = Super_L"

That should do it. Now the desktop should only be shown if you hold down the super (windows) key as well. The "d" key (and other keys with super shortcuts) should now work as expected.

You may need to replace Super_L with something else depending on your keyboard, check the link above for details.


Edit: I stumbled back across this answer and given that I am not sure if the link will be valid for very long I copied the post in a block below so you can reference that if the link doesn't work.

First make sure that your local session is not capturing away the shortcuts from your remote session. I like using this trick: faq.i3wm.org/question/1679/toggle-i3s-listening-behavior/ on my local session but you can also use whatever method your vnc client provides (e.g. Remmina has a keyboard icon that when pressed will send all all keys directly to your remote session)

Then at the remote server make sure that xev reports key events when pressing and releasing the windows key. Run xev from a terminal, make sure your mouse pointer rests on xev's window and hit the windows/super key. You should see something like this:

KeyPress event, serial 27, synthetic NO, window 0x2000001,
    root 0x25, subw 0x0, time 378034015, (-1,97), root:(515,117),
    state 0x0, keycode 89 (keysym 0xffeb, Super_L), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

Take note of the description of the key next to its keysym: Super_L in this case.

Next run xmodmap -pm and look at the line starting with mod4. Next to mod4 it will print what ever key is bind to mod4. If everything is OK you should see this line among the output:

mod4        Super_L (0x59)

But since you're reading these lines it probably displays nothing next to mod4 or it displays some other key (e.g. Meta_L). To fix it run these two commands:

xmodmap -e "clear mod4"  # un-bind mod4 from what ever other key
xmodmap -e "add Mod4 = Super_L" # <--- again replace Super_L with whatever xev gave you
0

I had the problem with d showing the desktop and other single key issues. I found that I made a mistake in my ~/.vnc/xstartup. I had 2 window managers configured: startxfce4 & and x-window-manager &. After I removed the later, I no longer had the single key issues.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .