Markus Blog What’s going on Internet?

2Aug/0911

Installing VNC Remote Desktop on Ubuntu Linux VPS

I have a linux Ubuntu 8.10 VPS that I would like to have GUI and use it as remote desktop pc just like what we can do with Windows XP. Here are the steps that I run.

1. Most of the VPS that delivered by VPS hosting provider is minimal setup of linux, it means that most of the time it only have SSH server installed and the other services such as HTTP server, FTP server, Mail server must be installed by our self. The default setup of VPS linux also doesn’t have window manager (GUI) hence we must install it first:

sudo apt-get install ubuntu-desktop

2. Configure the Gnome Desktop Manager and XServer

sudo /etc/init.d/gdm start
sudo dpkg-reconfigure xserver-xorg

3. After we installed a window manager, next step is to install the remote desktop server, for linux we use TightVNC

sudo apt-get install tightvncserver

4. Next we need to configure the remote desktop server and create a password to access the VPS via its GUI. This command will start the server, you will be asked for a password, this password will be used as authentication when you connect to the VPS, make sure you have a strong password.

vncserver :1 -geometry 1024×768 -depth 16 -pixelformat rgb565

5. Now, if you execute command

ps aux

You should see an Xtightvnc process:

Xtightvnc :1 -desktop X –auth

This means the setting is OK and VNC server is running fine.

6. The default VNC server doesn’t use Gnome window manager as default, to run Gnome as default we must do some changes on the configuration file.

sudo nano ~/.vnc/xstartup

Add this on the end of file:

gnome-session &

7. Next, do a reboot. Usually a reboot is not needed, but just to make sure you can do it.

sudo reboot

8. Start the VNC server:

vncserver :1 -geometry 1024×768 -depth 16 -pixelformat rgb565

9. Download Tight VNC client here: http://www.tightvnc.com/download.html

10. After you install it, run the VNC client and insert your VPS IP address and VNC server number on the VNC Server field and click on “Connect”. In this tutorial the VNC server number is :1, so you must fill in :1

VNC client login

You will be asked for a password to access the remote desktop, this password is the one you set on step 4.

Bookmark and Share

Related Article

Comments (11) Trackbacks (7)
  1. Amazing!! thanks for the walkthrough! make my night!!

  2. This is certainly the most straight forward description I have seen. It worked for me first time, thanks!

  3. Please can you do a rtorrent tutorial i’m begging YOU

  4. @mysoogal I will check on it

  5. Thanks for a straight forward and simple guide!

    Cheers

  6. This quick little throw away kludge worked for me;

    #!/bin/bash
    #Install X
    sudo apt-get install ubuntu-desktop
    #
    #startx
    sudo /etc/init.d/gdm start
    #
    #Configure xserver
    sudo dpkg-reconfigure xserver-xorg
    #
    #Install tightvncserver
    sudo apt-get install tightvncserver
    #
    #Start vncserver to test
    sudo vncserver :1 -depth 16 -pixelformat rgb565
    #
    #Verify server is running
    ps -ef | grep Xtightvnc
    #Kill vncserver and reboot
    sudo tightvncserver -kill :1
    #
    #Switch vncserver Window Manager to Gnome
    sudo sed -i “s/x-window-manager/gnome-session/” /$HOME/.vnc/xstartup
    #
    #Get viewer message
    echo “Get vncviewer from here; http://www.tightvnc.com/download.html
    #
    #Reboot
    echo “Will reboot in 5 seconds, ctrl-c to exit.”
    sleep 5
    sudo reboot

  7. Cheers Markus, Haven’t tried your source above yet, but looks promising! :D

  8. I found your tutorial very thourough, but I am lost already on instruktion 2.

    When I write sudo /etc/init.d/gdm start I get:
    sudo: /etc/init.d/gdm: command not found

    I have googled this, but fail to find a next step forward. Any ideas here?

    Thanks

  9. Very useful, worked a treat! Thanks.


Leave a comment


*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word


Sideblog feed

  • Mozilla Released Thunderbird 3 9 December 2009
    The long waited open source email client Thunderbird 3 is now released! Upgrading from Thunderbird 2 to Thunderbird 3 is very easy and almost automatically. Once you finished installing version 3, you. […]
  • Microsoft Wireless Comfort Desktop 5000 Keyboard and Mouse 22 October 2009
    The Microsoft Wireless Comfort Desktop 5000 has been designed to enhance your Windows 7 experience. You can easily access programs in the task bar with convenient hot keys. Applications in the taskbar. […]
  • WooFunction: 178 Amazing Web Design Icons 28 September 2009
    The WooFunction Icon Set includes 178 amazing web-related icons in a sophisticated and glossy design style. All 178 icons are available as 32×32 pixel PNG files and we can assure you that they are in. […]
  • Moblin the Next Generation OS for Netbook 27 September 2009
    Moblin is an open source project that supports Linux-based software platform and is optimized for the next generation of mobile devices including netbooks, mobile Internet devices (MIDs), in-vehicle i. […]
  • Twitterify Your Wordpress Blog Using P2 Theme 21 September 2009
    Twitter is becoming more and more popular due to its requirement as micro blogging is not much, only 140 characters that even less than a text message limit which is 160 characters. Blogger that is no. […]