How to install VNC on Ubuntu

From Ubiquity Server Wiki

Jump to: navigation, search

Time to complete: < 1 hour
Skill level: Easy


This tutorial also assumes that you are a Windows user with an Ubuntu 8.10 VPS from Ubiquity. You should be able to do everything in this tutorial on non-Windows operating systems if you have the right tools (you'll need an SSH client and a VNC client.)


Before Starting:

You'll need to order a VPS or dedicated server from UbiquityServers.com with Ubuntu Linux installed. The Baby VPS plan is inexpensive and is adequate for web surfing. You'll notice performance increases with each increasingly powerful VPS plan and big jumps in performance with progressively more powerful dedicated servers. This tutorial is written for a VPS with Ubuntu 8.10, although it should work on 8.04. As of writing this, there is an unpatched keyboard mapping error with 9.10, so you may run into problems if you go that route. Unlike Windows server, Ubuntu is free!

You'll also need to download Putty. Putty is a free program and is available here. Just click the link for putty.exe.


In your welcome email from Ubiquity Servers, you received two IP addresses. Open your SSH client (Putty). In the Host Name field, enter the first IP listed in your welcome email. At the login prompt, type the word root and hit enter. Now type your password.

File:putty.jpg

You won't be able to see anything, but rest assured it's being typed. When you're done typing your password, hit enter. You're now logged into your server and ready to begin.

File:logged_in.jpg

Contents

Step 1: Update apt-get

Run the following command by typing it in at the SSH prompt and hitting enter:

sudo apt-get update

This ensures you'll be able to run other commands. It's possible that you're already up to date and this command might not do much. It doesn't hurt to run it either way. You may need to type "y" and then enter to confirm the download. When you have a blinking cursor at a console prompt, you're ready to continue.


Step 2: Install the GUI

Now you get to decide which desktop you want. Pick from either Gnome or KDE and run one of the commands below. If you don't know the difference, flip a coin.

For Gnome:

sudo apt-get install ubuntu-desktop

Or for KDE:

sudo apt-get install kubuntu-desktop

You'll need to type "y" and then enter to confirm the download. It will likely take 15-20 minutes to download this part. There should be a countdown timer at the bottom right of your SSH window. Feel free to leave it unattended. It should look like this:

File:installing_the_gui.jpg

When the timer gets to 0, it means the software has been downloaded. You'll need to hit "enter" once to select your dictionary, the default should work fine for most people. You can walk away again for 15 minutes. When you have a blinking cursor at a console prompt, you're ready to continue. The amount of time this step takes is directly related to how powerful your VPS or dedicated server is.

If for some reason your VPS freezes during Step 2, close Putty and log back in. Run the following command:

dpkg --configure -a

It will occasionally freeze on very small VPSs and that should fix it. There is no need to run that command if you successfully returned to the SSH prompt.

Step 3: Install VNC

Now you'll need VNC. Run this command to install it:

sudo apt-get install tightvncserver

When you have a blinking cursor at a console prompt, you're ready to continue.

Step 4: Start VNC

The next step is to start the VNC server. To start VNC, type:

vncserver -geometry 1024x768 -depth 24 :1

You will be prompted to make a password for your VPS, use something secure and easy to remember. There's no need to create a view-only password unless you really want to, you can hit "n" at that prompt.

Step 5: Connect to your Ubuntu VPS with VNC

Install the VNC client of your choice. If you're unfamiliar, TightVNC is a very basic client. Install it and open the VNC viewer. Connect to your VPS IP with a trailing :1, for example:

10.10.45.23:1

Enter your password and you're ready to go!

File:VNCwithUbuntu.jpg

Personal tools