ponty / PyVirtualDisplay

Python wrapper for Xvfb, Xephyr and Xvnc
BSD 2-Clause "Simplified" License
697 stars 78 forks source link

Using backend 'xvnc' emits error 'Unrecognized option: -SecurityTypes' #87

Open James4Ever0 opened 11 months ago

James4Ever0 commented 11 months ago

Code:

from pyvirtualdisplay import Display
with Display(backend='xvnc') as disp:
    ...

Error:

start failed 10
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 155, in start
    self._start1()
  File "/usr/local/lib/python3.9/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 286, in _start1
    raise XStartError(msg % self)
pyvirtualdisplay.abstractdisplay.XStartError: Failed to start process: <pyvirtualdisplay.xvnc.XvncDisplay object at 0x7fe735f12fa0>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/media/root/Toshiba XG3/works/agi_computer_control/software_capture_hid_control/test_control.py", line 76, in <module>
    with SmartDisplay(backend=backend) as disp:
  File "/usr/local/lib/python3.9/dist-packages/pyvirtualdisplay/display.py", line 86, in __enter__
    self.start()
  File "/usr/local/lib/python3.9/dist-packages/pyvirtualdisplay/display.py", line 72, in start
    self._obj.start()
  File "/usr/local/lib/python3.9/dist-packages/pyvirtualdisplay/abstractdisplay.py", line 162, in start
    raise XStartError(
pyvirtualdisplay.abstractdisplay.XStartError: No success after 10 retries. Last stderr: b'Unrecognized option: -SecurityTypes\nuse: X [:<display>] [option]\n-a #                   mouse acceleration (pixels)\n-ac                    disable access control restrictions\n-audit int             set audit trail level\n-auth file             select authorization file\nbc                     enable bug compatibility\n-bs                    disable any backing store support\n-c                     turns off key-click\nc #                    key-click volume (0-100)\n-cc int                default color visual class\n-co file               color database file\n-core                  generate core dump on fatal error\n-dpi int               screen resolution in dots per inch\n-deferglyphs [none|all|16] defer loading of [no|all|16-bit] glyphs\n-f #                   bell base (0-100)\n-fc string             cursor font\n-fn string             default font name\n-fp string             default font path\n-help                  prints message with these options\n-I                     ignore all remaining arguments\n-ld int                limit data space to N Kb\n-lf int                limit number of open files to N\n-ls int                limit stack space to N Kb\n-nolock                disable the locking mechanism\n-logo                  enable logo in screen saver\nnologo                 disable logo in screen saver\n-nolisten string       don\'t listen on protocol\n-p #                   screen-saver pattern duration (minutes)\n-pn                    accept failure to listen on all ports\n-nopn                  reject failure to listen on all ports\n-r                     turns off auto-repeat\nr                      turns on auto-repeat \n-s #                   screen-saver timeout (minutes)\n-su                    disable any save under support\n-t #                   mouse threshold (pixels)\n-terminate             terminate at server reset\n-to #                  connection time out\n-tst                   disable testing extensions\nttyxx                  server started from init on /dev/ttyxx\nv                      video blanking for screen-saver\n-v                     screen-saver without video blanking\n-wm                    WhenMapped default backing-store\n-x string              loads named extension at init time \n-query host-name       contact named host for XDMCP\n-broadcast             broadcast for XDMCP\n-indirect host-name    contact named host for indirect XDMCP\n-port port-num         UDP port number to send messages to\n-once                  Terminate server after one session\n-class display-class   specify display class to send in manage\n-cookie xdm-auth-bits  specify the magic cookie for XDMCP\n-displayID display-id  manufacturer display ID for request\n-geometry WxH          set framebuffer width & height\n-depth D               set framebuffer depth\n-pixelformat format    set pixel format (BGRnnn or RGBnnn)\n-udpinputport port     UDP port for keyboard/pointer data\n-rfbport port          TCP port for RFB protocol\n-rfbwait time          max time in ms to wait for RFB client\n-nocursor              don\'t put up a cursor\n-rfbauth passwd-file   use authentication on RFB protocol\n-httpd dir             serve files via HTTP from here\n-httpport port         port for HTTP\n-deferupdate time      time in ms to defer updates (default 40)\n-economictranslate     less memory-hungry translation\n-lazytight             disable "gradient" filter in tight encoding\n-desktop name          VNC desktop name (default x11)\n-alwaysshared          always treat new clients as shared\n-nevershared           never treat new clients as shared\n-dontdisconnect        don\'t disconnect existing clients when a new non-shared\n                       connection comes in (refuse new connection instead)\n-viewonly              let clients only to view the desktop\n-localhost             only allow connections from localhost\n-interface ipaddr      only bind to specified interface address\n-inetd                 Xvnc is launched by inetd\n-compatiblekbd         set META key = ALT key as in the original VNC\n-version               report Xvnc version on stderr\n'
James4Ever0 commented 11 months ago

Versions:

X.Org X Server 1.21.1.3 Xvnc version TightVNC-1.3.10 PyVirtualDisplay 3.0 Python 3.9.12

ponty commented 10 months ago

I used TigerVNC for tests, I didn't know that TightVNC has XVnc too. I fix the code for it.

ponty commented 10 months ago

https://en.wikipedia.org/wiki/TightVNC "TightVNC 1.3.10, released in March 2009, is the last version to support Linux/Unix." . https://en.wikipedia.org/wiki/TigerVNC "started as a fork of TightVNC in 2009. Stable release 1.13.1 / March 6, 2023"

I think TigerVNC is the preferred.