Proxmox XFCE4 Setup with Ubuntu + VNC Server

Configure your instance using this guide to install the necessary packages and setup VNC to start on reboot.

Tip: You will want to connect via SSH tunnel to your VNC server. That is the safest way to do it.

Specify the resolution using this format

vncserver :1 -geometry 1600x1200

 

Credit: https://stackoverflow.com/questions/15816/changing-the-resolution-of-a-vnc-session-in-linux#1083668

Proper VNC Configuration on Modern Ubuntu 16.04

Note we use TigerVNC here as it is more secure and the new recommended vnc gold standard. TigerVNC makes use of encryption and is a much improved VNC server and client combo. Comparatively, TightVNC has not been updated in 8 years.

Download

Download the TigerVNC Ubuntu Release files using the following links:

amd64

i386

 

Install

sudo dpkg -i tigervnc*.deb && sudo apt install -f

 

Create Config File

sudo nano /etc/systemd/system/vncserver@.service

Insert these contents into /etc/systemd/system/vncserver@.service.

Replace the bolded user with your own username.

[Unit]
Description=Start TigerVNC Server at startup
After=syslog.target network.target

[Service]
Type=forking
User=user
PAMName=login
PIDFile=/home/user/.vnc/%H:%i.pid
ExecStartPre=-/usr/bin/vncserver -kill :%i > /dev/null 2>&1
ExecStart=/usr/bin/vncserver :%i -depth 24 -geometry 1280x1024
ExecStop=/usr/bin/vncserver -kill :%i

[Install]
WantedBy=multi-user.target

Save the file.

 

Enable the service

sudo systemctl enable vncserver@1.service

 

Start the service

sudo systemctl start vncserver@1

 

Credits:

https://askubuntu.com/questions/948774/configure-tigervnc-server-to-start-with-system-in-ubuntu-gnome-16-04

 

https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-vnc-on-ubuntu-16-04

Ubuntu VNC Server – vncserver – vnc4server

Follow

apt-get install gnome-session-fallback

Install and start GDM (I choose GDM instead of lightgdm when it gave me the choice)

apt-get install gdm

if you already installed GDM ,gnome before use

dpkg-reconfigure gdm

 

Follow

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

 

Then edit 

~/.vnc/xstartup

 

with the following:

 

#!/bin/sh
def
export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
 
gnomepanel&
gnomesettingsdaemon&
metacity&
nautilus&
gnometerminal&


Then 
Reboot