Skip to content

Instantly share code, notes, and snippets.

@itsPG
Last active November 12, 2015 01:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itsPG/4d6ccf47f31b31a096c9 to your computer and use it in GitHub Desktop.
Save itsPG/4d6ccf47f31b31a096c9 to your computer and use it in GitHub Desktop.
Setup vncserver on ubuntu 14.04.3

Tested on Ubuntu 14.04.3 (2015/11/11)

install gnone related packages

apt-get install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal

install vnc server

apt-get install vnc4serve

start & stop vncserver to generate config

vncserver :1
vncserver -kill :1

:1 is the screen number to find which port is used: lsof -i -P | grep -i listen

You'll be asked for password at the first time starting vnc server.

edit config

vim ~/.vnc/xstartup


#!/bin/sh

export XKL_XMODMAP_DISABLE=1
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS

[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

gnome-panel &
gnome-settings-daemon &
metacity &
nautilus &
gnome-terminal &

start vnc server

vncserver :1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment