vnc server for 16.04

I have couple laptops. Try to setup vncserver on one those so that I can access it convenient from another one. Followed the guide from digitalocean and here are something I like to jot down

    • Initially I got port 22 connection refused error. That should be due to the default firewall setting (port 22 not open)
      sudo apt-get update
      sudo apt-get install openssh-server
      sudo ufw allow 22
    • Get connected by “ssh -L 5901:127.0.0.1:5901 -N -f -l username server_ip_address” but it just appeared nothing happened. So I tried to connect again. The second time I will get “Address already in use” error (of course!). We can kill the previous connected client with 
      lsof -ti:5901 | xargs kill -9
    • I thought nothing happened. But actually connection has already been made. I should use a vnc client locally to interact with the server. I eventually used vinagre. Simply select vnc for protocol and localhost:5901 as host. Everything should work fine.
    • One can setup Gnome instead of Xfce4 as described in this post. Note that we need to add gnome-session as in the final post.

Leave a Reply

Your email address will not be published. Required fields are marked *