3

I am running a Python GUI based in PySide2 on a remote desktop (VNC) using a Python 3.8 linux installation and running into some issues.

The GUI does indeed pop up and appears operational, however, the command prompt displays the following errors:

qt.qpa.xcb: failed to initialize XRandr
qt.qpa.xcb: X server does not support XInput 2
qt.qpa.xcb: QXcbConnection: XCB error: 1 (BadRequest), sequence: 168, resource id: 53,
major code: 131 (Unknown), minor code: 47

I do not have admin/root access and the DISPLAY environment variable appears to be set to :3.0 (DISPLAY=:3.0) (DISPLAYNUM=3).

It does not seem this should be a limitation as I can run other software interfaces in the remote viewer.

I do not know if this is the intended use case, however, I tried appending a platform VNC flag after the command line call to the Python GUI:

/usr/python/linux/bin/python /usr/python/linux/scripts/GUI.py -platform vnc

From here, the error message goes away and I get:

QVncServer created on port 5900

However, no GUI or window shows up this time. This is also the case for using the offscreen or minimal options.

Jlehr
  • 31
  • 1
  • 3

1 Answers1

0
  1. By default, your Qt application runs as a client of an X server that you've configured to act as a VNC server. The Qt application doesn't care nor know anything VNC. It interacts with the X server, and how the server then exposes the screen to the world is an unrelated matter. The errors you see are probably inconsequential.

  2. When you use the VNC platform plugin, your Qt application becomes a VNC server itself - it doesn't use the X server anymore. Nothing will "appear" on the screen, since there's no screen. Providing a screen is up to you: connect to it using a VNC client :)

Kuba hasn't forgotten Monica
  • 95,931
  • 16
  • 151
  • 313