[Xcb] Problems with xcb in a vnc session

Jay Cralley Jay.Cralley at mathworks.com
Tue Jan 14 09:18:06 PST 2014


Hi Ran,

Thanks for your reply. When I try running "setxkbmap us" in the vnc viewer, I get the following:

Couldn't interpret _XKB_RULES_NAMES property
Use defaults: rules - 'xorg' model - 'pc105' layout - 'us'
Error loading new keyboard description

So it looks like setxkbmap has the same issue. I also tried starting vncserver with the -xkbmap switch set to "us". This did not help.

The reason I am doing this is because we use Qt heavily and want to upgrade to version 5.*, but they have switched to using xcb for their x11 bindings. I wrote the sample program to eliminate Qt's code as the problem. Right now I would be happy with any way to work around the issue. I am a bit out of my field of expertise, so I am not sure how much of their code I would need to change to go directly for the XKB APIs. Can you give me a nudge in the right direction?

Thanks,

JayC

-----Original Message-----
From: Ran Benita [mailto:ran234 at gmail.com] 
Sent: Tuesday, January 14, 2014 11:53 AM
To: Jay Cralley
Cc: xcb at lists.freedesktop.org
Subject: Re: [Xcb] Problems with xcb in a vnc session

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