Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm running vnc4server on an Ubuntu 10.10 box, and connecting to it from an Ubuntu 8.04 machine using TightVNC Viewer 1.3.9. I'm unable to type anything with the character d within the VNC session, as the d causes all windows to be minimised.

Following reports of a successful solution on many online fora, I disabled the keyboard shortcut for hiding all windows, but the problem persists.

Output of xev is given below. It includes two presses of d because the first press minimised all windows. I didn't know what to keep and what to remove, so this output includes everything from the first key-press to when the windows came back up on the second key-press:

FocusOut event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyGrab, detail NotifyAncestor               

FocusOut event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyWhileGrabbed, detail NotifyNonlinear      

FocusIn event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyWhileGrabbed, detail NotifyPointer       

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  0   0   0   0   0   1   0   0   0   0   0   0   0   0   0   0   
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   

LeaveNotify event, serial 29, synthetic NO, window 0xa00001,
    root 0x2e, subw 0x0, time 581275388, (100,64), root:(111,572),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,    
    focus YES, state 0                                            

UnmapNotify event, serial 29, synthetic NO, window 0xa00001,
    event 0xa00001, window 0xa00001, from_configure NO      

PropertyNotify event, serial 29, synthetic NO, window 0xa00001,
    atom 0xc7 (WM_STATE), time 581275388, state PropertyNewValue

PropertyNotify event, serial 29, synthetic NO, window 0xa00001,
    atom 0xae (_NET_WM_STATE), time 581275388, state PropertyNewValue

MapNotify event, serial 29, synthetic NO, window 0xa00001,
    event 0xa00001, window 0xa00001, override NO          

VisibilityNotify event, serial 29, synthetic NO, window 0xa00001,
    state VisibilityUnobscured                                   

Expose event, serial 29, synthetic NO, window 0xa00001,
    (0,0), width 178, height 10, count 3               

Expose event, serial 29, synthetic NO, window 0xa00001,
    (0,10), width 10, height 58, count 2               

Expose event, serial 29, synthetic NO, window 0xa00001,
    (68,10), width 110, height 58, count 1             

Expose event, serial 29, synthetic NO, window 0xa00001,
    (0,68), width 178, height 110, count 0             

EnterNotify event, serial 29, synthetic NO, window 0xa00001,
    root 0x2e, subw 0x0, time 581276874, (100,64), root:(111,572),
    mode NotifyNormal, detail NotifyAncestor, same_screen YES,
    focus NO, state 0

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  4294967283 0   0   0   0   1   0   0   0   0   0   0   0   0   0  0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

PropertyNotify event, serial 29, synthetic NO, window 0xa00001,
    atom 0xc7 (WM_STATE), time 581276874, state PropertyNewValue

PropertyNotify event, serial 29, synthetic NO, window 0xa00001,
    atom 0xae (_NET_WM_STATE), time 581276874, state PropertyNewValue

FocusIn event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyWhileGrabbed, detail NotifyNonlinear

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  68  0   0   0   0   1   0   0   0   0   0   0   0   0   0   0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0

FocusOut event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyUngrab, detail NotifyPointer

FocusIn event, serial 29, synthetic NO, window 0xa00001,
    mode NotifyUngrab, detail NotifyAncestor

KeymapNotify event, serial 29, synthetic NO, window 0x0,
    keys:  4294967214 0   0   0   0   0   0   0   0   0   0   0   0   0   0  0
           0   0   0   0   0   0   0   0   0   0   0   0   0   0   0   0
share|improve this question
    
Run xev from a terminal inside the VNC session. Press d in the xev window. Copy-paste the output (if any) into your question. –  Gilles Apr 4 '11 at 21:09
    
Given the xev output, the d key is caught by your window manager. What window manager or desktop environment are you running? Try launching a minimal or no window manager (just an xterm) in the VNC server: create ~/.vnc/xstartup containing just xterm&, and try xev there. –  Gilles Apr 4 '11 at 23:12
    
Thank you, and sorry for your trouble, @Gilles. –  Icarus Apr 5 '11 at 16:37
    
In my case, Cairo-dock's logout icon had registered 'Super-L' as a short-cut to logout with the same 'Grab/Ungrab' results in xev. Removing that shortcut (which I never use anyway) resolved the matter. –  android.weasel Nov 7 '12 at 16:03
add comment

2 Answers 2

up vote 3 down vote accepted

The problem is solved now. I had made the silly assumption that the key bindings were global when in fact, they are per-user. I had changed the key bindings logged in as root, but was logging into a VNC session created by another user. The 'hide all normal windows…' shortcut was set to Mod4+D for this user. The standard solution—changing it to something else, such as Ctrl+Alt+D—fixed the problem.

share|improve this answer
add comment

Also you can use openbox as window manager instead of metacity for VNC sessions.
Metacity shortcuts will not work, and Mod4+D does not break anything.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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