The script ConnectWithVNC (on Windows) opens multiple VNC connections to the same computer. For instance, I tell the script connect to: pc1,pc2,pc3,pc4 and then hit OK, I get 4 VNC windows all each connected to pc4. I’m no python-pro but I came up with 2 work arounds. I wanted to get some input, see if anyone else was having the same issue. Everything the script is doing is correct, but it seems that the script is running faster than the spawnProcess command. The script writes a files called config.vnc to the Deadline temp. What I believe is happening is the script writes the instructions to connect to pc1 then goes to spawn VNC using those settings. Before VNC gets to the config file its overwritten to connect to pc2, then pc3 the finally pc4. And as a result all 4 VNC processes end up reading the config.vnc pointing to pc4.
Solution 1: Make unique config files for each machine.
configFile = Path.Combine( ClientUtils.GetDeadlineTempPath(), 'config_'+slaveName+'.vnc')
This works fine but would have to implemented for each OS and their various viewers (ie - Windows RealVNC and TightVNC)
You could do anything unique, doesn’t have to be the slaveName.
Solution 2: Add a slight pause after each spawnProcess to give the viewer a moment to read the config file before it gets changed.
process = ProcessUtils.SpawnProcess(vncViewer, arguments)
time.sleep(.1)
But you need to make sure you import that library
import time
This is the best I could come up with since it wouldn’t need customizing for various OSes and VNC viewers.
I was wondering if my PC was running slow (slow to launch the spawnProcess), my test bed is not peppy at all. So I tested the script (as provided in the deadline 6.1 install) on our fastest machine in the house and got the same results, several connections to the same machine. I’ve only tested this on Windows. Am I the only one with this issue? I can recreate the issue on several different machines in the house. We are running various versions of RealVNC v5 Enterprise 64bit (v5.0.5 up to v5.1.0).
I find myself frequently jumping on to farm machines for various reasons. I very much enjoyed the ease that Deadline 5 and prior versions integrated VNC, ctrl+V was second nature. I’m learning to make do with the new method but not nearly as fast since its a right click nested option. And the fact that I can only connect to 1 machine at a time has really slowed me down.
brad