apt-get install tightvncserver xtightvncviewer
Create a new user:
useradd -c "Tightvnc user" -m -r -s /bin/bash vncuser sudo -iu vncuser bash unset XAUTHORITY vncserver
Create the password and you are done.
Note that 5901 is the default port.
Now, everytime you do:
sudo -iu vncuser bash
vnc server will start as that user. You should never run it as root.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.