I thought of automating the part when i first run vncserver, since it ask for a password (and while i know there a flag to pass a passwd file, i prefer to generate a new one every time i need/want to):
I have a network full of Linux machines. In this network, I have a user as user1 with the password as password in all the machines.
While building a small expect script I noticed that, after executing the script, some characters were automatically on the input of bash. I have seen that on other programs before, but here I have something reproducable.
I am using Mac OS X 10.9.4, following is my script to copy files from local machine to different host