0

I am trying to install tigervnc-server from a bash script with a password under Centos 6. I want to do this because I want to automate VPS installations. Does anybody know how to do this? Tried adding two lines in the script with the password because it requires you to enter a password 2 times but it didnt worked, it said command not found and I didnt got past it.

  • 1
    You should say exactly what you tried that didn't work. – RalfFriedl Aug 22 '18 at 18:46
2

The vncpasswd command can be used to encrypt a password so that you don't have to specify it manually. Just use the -f option and feed the password on stdin.

Use

echo "mypassword" | vncpasswd -f > $HOME/.vnc/passwd

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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