Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm creating an application for our helpdesk guys. Long story short, part of their job is to remotely administer boxes we install at client sites, and I'm trying to make that as painless as possible. To do this, I need to be able to start RealVNC from the command line, feeding it the server:port, username and password it will use to connect. The desired end result is that they hit a button in my app, and they get the remote viewer connected to the site and ready to go.

I can do this with UltraVNC, however I cannot connect to all VNC boxes using that viewer (the ones using RealVNC Server use a security config not supported by the latest version of Ultra). The only documentation I can find on RealVNC command-line configuration is to specify a config file using the -config flag.

Is there a way to pass credential information to RealVNC using the command line?

share|improve this question
What platform/OS? Which RealVNC (Personal/Free/Enterprise)? – Dennis Williamson Jan 20 '11 at 0:47
Helpdesk guys are using Enterprise. I'm currently testing with the Free version cause it was easy to get when I needed it. OS is Windows; a hodgepodge of WinXP and Win7 boxes. – KeithS Jan 20 '11 at 18:52
up vote 1 down vote accepted

I thought I remembered that you could save the configuration(and the password in it) to be used later. I did some searching and found a good step-by-step instruction for you. Credit goes to "Angelo" for these steps.

  • Connect to the Host
  • Type in the password
  • After you are connected successfully, bring up the vnc menu - thats F8 by default or right click on title bar or in tray.
  • Choose Options
  • Click on the defaults tab
  • Click Save Configuration file as
  • After picking a location and a file name it will ask you if you want to save the password

Then you will have a file that you can double click to connect.

IMPORTANT - you are storing the password in that file, lose the file and your security is compromised.

I hope this helps!

share|improve this answer
I can; however using a config file requires it to be persisted somewhere, which adds an extra dimension of complexity in trying to automate these connections. However, if the password can be stored AT ALL, I can persist it in the DB in whatever form is necessary, and create a simple config with the credentials on the fly (it's just a text file; not even XML). – KeithS Jan 20 '11 at 17:15
OK, this looks like the way to go; the users will have to save the config file, and then open it up and copy the password hash into the app. This should be a one-time thing, after which I can generate a VNC config file to connect to that box on the fly. – KeithS Jan 20 '11 at 18:42
Sounds good. I wish I could direct you to a simple -pw CLI option, but it doesn't exist for RealVNC. It sounds like you have a workable solution, so that's great. – Russ Jan 22 '11 at 2:01

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.