1

I want to run vncserver in terminal, to automate it with several other commands I've put it inside a shell script. However, when you call vncserver for the first time, it asks you to set a password.

I tried:

vncserver -mychosenpass 

but this doesn't work and it's still asking me to set a password like i hadn't set a parameter at all. I know that running vncserver, will raise 3 prompts, the first to ask what password to set, the second will ask me to retype that password to confirm and the last prompt i want to reply with "n". How can i automate this through my shell script?

Qwertford
  • 283
  • 1
  • 2
  • 7
  • In the general case, you can script interactive sessions using the `expect` program. For this particular case however, see [Assign VNC password using script](https://askubuntu.com/questions/328240/assign-vnc-password-using-script) – steeldriver Jul 04 '19 at 14:56

0 Answers0