cannot connect to vnc after vncserver install and restart

I used the instructions on this site:

https://www.howtoforge.com/how-to-install-vnc-server-on-ubuntu-14.04

to install VNC server on my Ubuntu 14.04. It worked fine. I could login using VNC Viewer 5.1.1 from Windows. Today I did apt-get upgrade and restarted. After restarting the machine, I could not login either using VNC (Connection Refused 10061) or on the console. syslog showed a problem reading ~/.ICEauthority so I chowned that and now can login on the console but VNC still gives 'Connection refused.'

When I try to start vncviewer from a shell, I get:

Wrong type or access mode of /home/jjen009/.vnc.

jj


Solution 1:

There is a known bug https://bugs.launchpad.net/ubuntu/+source/vnc4/+bug/1200451 This means that even a super use can't start vnc if the relevant configuration files are owned by a regular user. Check with ls -la . on the home directory e.g. in my case:

ls -la .
drwxr-xr-x  2 wf   users      4096 Nov 10 10:57 .vnc

when I went out of super use mode i could run:

vncserver

to get:

New 'X' desktop is capri:1

Starting applications specified in /home/wf/.vnc/xstartup
Log file is /home/wf/.vnc/capri:1.log