I primarily use my Pi2 as a low powered server and access it via SSH. However, periodically I will use VNC to access the device's desktop remotely. Historically, it has worked perfectly, but I have not logged on for a couple of months, and now I have an issue. Here is my script to start the VNC server:
/usr/bin/vncserver :0 -geometry 1920x1080 -depth 16 -dpi 96
It runs perfectly. However, when I execute this as the user "pi", I end up at a blank desktop with nothing on it but the trash can. But, if I enter the following:
sudo /usr/bin/vncserver :0 -geometry 1920x1080 -depth 16 -dpi 96
Everything works as expected which brings me to my question. My script has worked flawlessly for months and now it doesn't. It feels like there could be a permission issue here, but I have no idea where to start.
Is there something that I need to do to enable the Pi user to have a desktop? I prefer not to run VNC as root for security reasons. (I also followed the instructions here and starting it with:
su - pi -c "/usr/bin/vncserver :0 -geometry 1920x1080 -depth 16 -dpi 96"
results in the same problem.)
Thank you in advance for any feedback