[Xcb] Problems with xcb in a vnc session

Ran Benita ran234 at gmail.com
Tue Jan 14 08:53:13 PST 2014

On Tue, Jan 14, 2014 at 02:35:32PM +0000, Jay Cralley wrote:
> Hi All,
> I have a sample program that uses XCB to get the _XKB_RULES_NAMES property. This program seems to work when I run it from my physical display, but not when I run it in a vnc viewer. I originally thought that the problem was that our vncserver version (xvnc4server, version 4.1.1) does not support the XKEYBOARD extension. So I installed realvnc-vnc-server (version 5.1.0), which does support XKEYBAORD, but the program still fails in the vnc viewer. I have attached the program. When run in a vnc session, it seems to fail on the xcb_get_property_reply() call. The struct it returns has a value length of 0 and non-zero bits in the padding. The error pointer that I pass in remains NULL, so it doesn't appear that xcb registered an error.
> Can anyone tell me why it won't work for me in vnc? I am running Debian 6 64-bit.

This property is initially set by the X server, and then further
maintained by setxkbmap. I'm not very familiar with vnc things, but my
guess is it just doesn't set it.

What happens if you do e.g. 'setxkbmap us' and run your program?

Btw, may I also ask what you need the property for, if you can tell? It
is kind of an hack IMO, and hopefully we can make it unnecessary for XCB
applications, by using the XKB protocol to get the keymaps instead.

More information about the Xcb mailing list