I'm having some strange issues with a fresh VNC server install. I recently built a new Plex server, and it's running gnome Ubuntu 16.04. So far, I've gotten the openSSH server up and running with Google 2FA authentication. Now I'm working on getting vnc working so that I can ultimately run this headless, and remote into it with vnc through SSH when need be.
I started out running just:
sudo apt-get install vnc4server
then, ran vncserver to configure it and set the password, so far, so good.
I then went to my client PC (Windows 10), and attempted to connect without SSH, just to make sure it's working. That's the first issue, upon connecting, I'm getting just a grey screen, which I think is due to the desktop environment not coming up correctly with the connection is made, which I think I can fix by modifying the ~/.vnc/xstartup file.
So back on the server, I ran:
sudo gedit ~/.vnc/xstartup
Now I'm receiving an error, anytime I try to open a gui application as sudo, that error is:
[sudo] password for username: No protocol specified Failed to connect to Mir: Failed to connect to server socket: No such file or directory Unable to init server: Could not connect: Connection refused (gedit:12145): Gtk-WARNING **: cannot open display: :0
Now I'm lost. I'm 100% sure this is related to VNC, but even shutting down the VNC server doesn't fix it.
Anyone got any ideas? I'm just spinning my wheels and getting frustrated at this point.