Spyder: No keyboard responding for Spyder when started through VNC

Created on 20 Nov 2016  路  22Comments  路  Source: spyder-ide/spyder

I installed the python env by using Anaconda 4.2.0 (64-bit).
But cannot use spyder.
There is no keyboard responding for spyder.

Any ideas for this problem?

  • Spyder Version: 3.0.1
  • Python Version: 2.7.12
  • Operating system: ubuntu 16.04

Most helpful comment

Hi, @ccordoba12

The error is

QXcbConnection: Failed to initialize XRandr
Qt: XKEYBOARD extension not present on the X server.
Qt: Could not determine keyboard configuration data from X server, will use hard-coded keymap configuration.
Qt: Failed to compile a keymap!
Current XKB configuration data search paths are: 
/home/lab/anaconda2/lib
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

I export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb to solve this problem. It works.

All 22 comments

What do you mean by

There is no keyboard responding for spyder.

Hi, @ccordoba12

The error is

QXcbConnection: Failed to initialize XRandr
Qt: XKEYBOARD extension not present on the X server.
Qt: Could not determine keyboard configuration data from X server, will use hard-coded keymap configuration.
Qt: Failed to compile a keymap!
Current XKB configuration data search paths are: 
/home/lab/anaconda2/lib
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

I export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb to solve this problem. It works.

Ok, thanks for letting us know about it :-)

hi,
I have the same problem.
I installed the python env by using Anaconda 4.3.0 (64-bit).
There is no keyboard responding for spyder.

this is the error that i get:

Qt: XKEYBOARD extension not present on the X server.
Qt: Could not determine keyboard configuration data from X server, will use hard-coded keymap configuration.
Qt: Failed to compile a keymap!
Current XKB configuration data search paths are: 
/home/eliyahus/Program_Files/python/anaconda/anaconda2/lib
Use QT_XKB_CONFIG_ROOT environmental variable to provide an additional search path, add ':' as separator to provide several search paths and/or make sure that XKB configuration data directory contains recent enough contents, to update please see http://cgit.freedesktop.org/xkeyboard-config/ .

I made this export: export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
but than got another problem - i don't get the letter that i want to type.
getting the same error ...

Qt: XKEYBOARD extension not present on the X server.

I am login with a vncserver to ubuntu 14.04.
can someone help?

regards,
Eli.

@esason, I also observed this behavior of having incorrect key mappings. It's not Spyder-specific though, it is (as I understand it) a disconnect between older X servers and QT5 in general. The best discussion I could find on this is here: https://bugreports.qt.io/browse/QTBUG-44938. That posting may offer a workaround for you ... or, maybe you can do something similar to what I did:

In my case, I experienced this problem using the OpenText Exceed 14 server on a Windows 7 machine to log into a Linux machine. The fix for me was literally to click on the XKEYBOARD extension in the Exceed program: Tools->Configuration->X Server Protocol->Extensions. I hope newer servers have this turned on by default.

Good luck!

@esason me too. I had also faced this problem. Do you fix it?

hi,
I fix some of the problems, but no all of them.
now, spyder is respond to my keyboard correctly,
but it still mention the next error:

QXcbConnection: Failed to initialize XRandr
Qt: XKEYBOARD extension not present on the X server.

1) I uninstall tightvncserver and install vnc4server
2) export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
as mentioned before.

it seems that the problem is reletaed to vncserver issues not spyder as twmacro mentioned.
still I am not sure how to configure a vnc server which supports xkeyboard extention...

@esason Thanks for your response. Now, I use the pycharm to replace the spyder. PyCharm can been used in the vnc situation.

Before open spyder
export XKB_DEFAULT_RULES=base
following https://bugreports.qt.io/browse/QTBUG-44938

I found the only way to type in Spyder over VNC was to use TurboVNC client. Even the things above didn't work for me with TightVNC, but I could type with TurboVNC. I was using Ubuntu 16.04 on both ends.

For those using Exceed X Server, you may also need to change Xconfig setting. Go to Xconfig --> Settings --> Protocol... --> Extensions --> check XKEYBOARD and save the settings.

I鈥榤 using ssh to connect the server.(not VNC) And the spyder with no response. Can you help me?

I'm using TightVNC with Ubuntu 14.04.
It works on my machine with:
export XKB_DEFAULT_RULES=base
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
The set rules has to come first.

I'm using Xmanager5. After the two export actions, the keyboard was responding but had incorrect mappings. Then I did the following: Xconfig->Default Profile->Properties->Advanced->X Extensions-> check the 'XKEYBOARD'. It worked.

@xgniu I faced this problem about a mouth ago, I fix it following yours, thx.

Hello,
I am using ssh to connect to my server. When i type spyder in the terminal it gives me the following error

QXcbConnection: Could not connect to display
Aborted (core dumped)

I tried uinstalling and reinstalling spyder but all of no use. I even tried XKB_DEFAULT_RULES=base but no success.
Does anybody have an idea what's going wrong.

@AbNeil, you need to create a ssh tunnel to your X remote server to start Spyder there. That's not easy (I don't even remember how that's done).

Please use VNC or something like that to do it.

I got the same problem in ubuntsu 14.04.

I did
export QT_XKB_CONFIG_ROOT=/usr/share/X11/xkb
export XKB_DEFAULT_RULES=base
to solve the problem.

I have got the same issue.
I am using Ubuntu 16.04 as OS and tight VNC server. I
I have tried with @arutema47's approach, but the problem remains. Any other ideas?

Hi All,
Any update on the above issue. I am using Ubuntu 16.04.4 LTS (Xenial Xerus) on Amazon AWS instance (AMI- https://aws.amazon.com/marketplace/pp/B07MGHCWTB?qid=1556607966309&sr=0-5&ref_=srh_res_product_title) and facing the same issue.
Have tried everything mentioned above but spyder is still not mapping right keys.
Other editors on the system (e.g. gedit etc.) are correctly working and mapping correct keys to the display.

I'm using Xmanager5. After the two export actions, the keyboard was responding but had incorrect mappings. Then I did the following: Xconfig->Default Profile->Properties->Advanced->X Extensions-> check the 'XKEYBOARD'. It worked.

@xgniu - having the same use with incorrect key mapping even after setting the rules. Where do I find Xconfig? I am using TightVNC..

Hi all,

I'm facing the same issue: incorrect key mapping in Spyder when running through VNC (TightVNC on the server side, RealVNC on the client side). I've installed Spyder4 (with Python 3.7) under Miniconda3, on Ubuntu 20.04. Other applications work fine.

Should I switch to a different VNC-server? And if so, which one would you recommend?
Or should I try this Xconfig->Default Profile->Properties->Advanced->X Extensions-> check the 'XKEYBOARD' ? In that case, where do I find Xconfig?

Many thanks!
Sita

Was this page helpful?
0 / 5 - 0 ratings

Related issues

CAM-Gerlach picture CAM-Gerlach  路  75Comments

goanpeca picture goanpeca  路  106Comments

ckaldemeyer picture ckaldemeyer  路  48Comments

jeffak picture jeffak  路  115Comments

Diti24 picture Diti24  路  47Comments