Running VNC from batch

Corne Beerse cbeerse "at" gmail.com
Mon May 7 10:42:00 2007


Marc Cram wrote:

>I wanted to run VNC from a batch file, but I can't figure out how to
>enter the password from the batch after the connection has been made.
>Does anyone know how to do this.
>
>  
>

What do you want to do from batch? On what system?

`vncserver` on unix is a script to call `Xvnc`. You can peek in there to 
see how it works and have your script do these things a little more 
hardcoded.

`vncserver` on a windows machine comes with shortcuts that can be used. 
Peek in the properties on how this is used. The command line can be used 
in your script.

`vncviewer` on both unix and windows has a bunch of options. Start it 
from the commandline with the -help option and you see the options you 
can use. One of the options is to use a *.vnc file. You can create this 
from a running session under the <F8> menu. You will be prompted to 
include the password for the session, if you do so, the password is 
encrypted in the file, however, the entire file is usable for everyone, 
so keep it on a save place.


CBee