Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add VNC -rfbauth option #19

Closed
ottothecow opened this issue Nov 17, 2016 · 1 comment
Closed

Add VNC -rfbauth option #19

ottothecow opened this issue Nov 17, 2016 · 1 comment

Comments

@ottothecow
Copy link

Due to a bug (here and here) with selenium/chromedriver/chrome not correctly sending keystrokes when running tightvnc server, I had to switch to using vnc4server if I wanted to peek at what was happening while running PyVirtualDisplay.

I believe vnc4server requires a password (at least on my systems it does) and whatever password file it defaults to when called by PyVirtualDisplay was not accessible.

So on import, I redifined XvncDisplay._cmd to specify a password file location (set by running vncpasswd):

from pyvirtualdisplay.xvnc import XvncDisplay
@property
def _cmd(self):
        cmd = ['Xvnc',
               '-depth', str(self.color_depth),
               '-geometry', '%dx%d' % (self.size[0], self.size[1]),
               '-rfbport', str(self.rfbport), '-rfbauth', '/etc/vncpasswd',
               self.new_display_var,
               ]
        return cmd
XvncDisplay._cmd =_cmd

I'd suggest adding this as an option available when creating a Display (or providing a more universal option to add any additional arguments when calling Xvnc).

The same syntax applies to tightvncserver as well as vnc4server (and I believe RealVNC and x11vnc as well, since they all default themselves to the Xvnc executable on install).

@ponty
Copy link
Owner

ponty commented May 26, 2019

Implementation in #36

@ponty ponty closed this as completed May 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants