Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@asimzeeshan
Created November 4, 2012 09:22
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save asimzeeshan/4011035 to your computer and use it in GitHub Desktop.
Save asimzeeshan/4011035 to your computer and use it in GitHub Desktop.
Install VNC w/ GNOME on Debian VPS
#!/bin/bash
# Install and configure VNC for Ubuntu Linux
#
# Tested on Ubuntu 12.04
# Tested on Virtualization type: OpenVZ, KVM
#
# Script by: Asim Zeeshan
# http://www.asim.pk/
#
# Original Posted by VPS6.NET (https://vps6.net)
# Post URL: http://www.lowendtalk.com/discussion/1065/how-to-install-vnc-w-gnome-on-debian-vps
#
apt-get clean all
apt-get update
apt-get upgrade
# ##########################################################
# Install GNOME
apt-get install gnome-desktop-environment
# ##########################################################
# Install required fonts
apt-get install xfonts-100dpi
apt-get install xfonts-100dpi-transcoded
apt-get install xfonts-75dpi
apt-get install xfonts-75dpi-transcoded
apt-get install xfonts-base
# ##########################################################
# Install TightVNCServer and setup VNC password
apt-get install tightvncserver
tightvncserver :1
# ##########################################################
# Kill VNC instance at 5901 to continue with the configuration
tightvncserver -kill :1
# ##########################################################
# Edit the xstartup file
cat > ~/.vnc/xstartup <<END
#!/bin/shxrdb $HOME/.Xresources
xsetroot -solid grey
x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# x-window-manager &
gnome-session &
END
# ##########################################################
# Finally, start the first VNC session
# Its accessible at XXX.XXX.XXX.XXX:5901 with the same
# password that you have set in the config above
tightvncserver -geometry 1024x768 :1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment