Getting remote access to Linux host – VPS – vnc

 

This is what worked for me (For GNOME Fallback instead of Unity):

Update:

apt-get update apt-get upgrade 

Install Ubuntu Desktop & Gnome-fallback

apt-get install ubuntu-desktop 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

and choose GDM

service gdm start 

Install TightVNCServer and set password

apt-get install tightvncserver 
vncserver -geometry 1024x768 :1 //It will ask for a password 
vncserver -kill :1 

Edit ~/.vnc/xstartup (This is what worked for me):

nano ~/.vnc/xstartup 

Paste this in:

#!/bin/sh

def

export XKL_XMODMAP_DISABLE=1

unset SESSION_MANAGER

unset DBUS_SESSION_BUS_ADDRESS

 

gnome-panel &

gnome-settings-daemon &

metacity &

nautilus &

gnome-terminal &

Then set proper permissions

  • The .vnc/xstartup file was owned by root, so I changed ownership to user:
    chown user /home/user/.vnc/xstartup
  • The .vnc/xstartup file was 664 (-rw-rw-r–.) – I assume vnc uses the ‘other’ permissions to connect and allow interactions, so I changed the permissions to 755:
    chmod 755 /home/user/.vnc/xstartup

 

  • Restart the vncserver daemon:
  • vncserver -kill :1

 

Then start a new vnc connection:

vncserver -geometry 1024x768 :1 

 

Use this client, connect with SSH for enhanced security

apt-get install ssvc

http://onkea.com/ubuntu-vnc-grey-screen/

http://askubuntu.com/questions/330983/no-desktop-showing-in-ubuntu-13-04-via-vnc-on-a-vps

Leave a Reply