Separate password for each VNC session

I often setup VNC sessions for various uses, one being – I keep a “personal” session where my emails, browsing & other documents are – the things I typically don’t want to share with my coworkers, but then there are other sessions where I want to share, collaborate & let someone else work out a problem. Having same VNC session password isn’t optimal (true you can use VNC session port to obfuscate things, but that’s not ‘complete’).

You can setup different passwords, tuck them away in different files and when you start a VNC session you can specify which file to use for which session. Here’s how to …

Step 1: Generate a password

$ vncpasswd ~/.vnc/personal-pwd
Password: <type your password here>
Verify: <type same password as earlier>

Step 2: Specify the password file to use when starting a VNC session

$ vncserver:34  -rfbauth ~/.vnc/personal-pwd

This will start a VNC session secured by the password you setup on port :34
$ vncserver:1 

This will start a VNC session by using whatever default password you have (assuming you have one) on port :1

Leave a Reply