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.
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.
echo "mypassword" | vncpasswd -f > $HOME/.vnc/passwd