Tightvnc - Create and Access a Remote
Desktop On Your Instance
https://community.hpcloud.com/article/tightvnc-create-and-access-remote-desktop-your-instance
By Scott Heuer, 5 months 1 week ago
TightVNC coupled with Gnome, KDE, or other options is a way for your to
access a desktop GUI for your instance. These are 3rd party tools and while we are providing you some working examples in this document please
understand that these are not officially supported. We will always do our best to assist you if you run into issues though so don't hesitate to reach out to Supportif you need assistance.
You can find a lot of great resources on the internet for setting up VNC on Linux!
NOTE: Prior to these instructions you will need to open port 5901 on your security groups. Please ensure that once you open up Port 5901 that you reboot your instance as well. Instructions can be found here.
There are two steps to setting up a remote desktop.
Step 1 - Installing & Setting up the VNC Server on your HPCloud Instance Step 2 - Installing & Setting up the VNC Viewer on your Local Machine
Step 1 - Installing & Setting up the VNC Server on your HPCloud Instance Using Ubuntu 11.04 & Debian Squeeze:
sudo apt-get update
sudo apt-get install gnome-desktop-environment x-window-system-core sudo apt-get install tightvncserver
sudo vncserver
It will then prompt you to create a password that will be needed to access your remote desktop:
Password: YourPassword Verify: YourPassword
Once you enter the password and your vnc configurations are complete, it will display what path the startup file had been written to as shown below. Take note of this startup file path location, you will need it for the next couple steps. Here is the example output showing were the vnc startup file has been written to:
Next, shut down the vnc server to further configure the startup file:
vncserver -kill :1
Take note of the path name displayed for the startup file, because you will need it for the following step, and it will vary image to image. Open the startup file using the same path displayed right after you entered a password for tightvnc. Here is an example of opening the startup file with the previously stated path:
sudo nano /root/.vnc/xstartup
Add the following two lines to the bottom of the startup file:
unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc
Exit and Save the file
sudo vncserver
Skip down to Step #2 at the bottom
Using Ubuntu 12.04 sudo apt-get update
sudo apt-get install gnome-desktop-environment x-window-system-core sudo apt-get install tightvncserver
sudo vncserver
It will then prompt you to create a password that will be needed to access your remote desktop:
Password: YourPassword Verify: YourPassword
Once you enter the password and your vnc configurations are complete, it will display what path the startup file had been written to as shown below. Take note of this startup file path location, you will need it for the next couple steps. Here is the example output showing were the vnc startup file has been written to:
Next, shut down the vnc server to further configure the startup file:
vncserver -kill :1
Take note of the path name displayed for the startup file, because you will need it for the following step, and it will vary image to image. Open the startup file using the same path displayed right after you entered a password for tightvnc. Here is an example of opening the startup file with the previously stated path:
sudo nano .vnc/xstartup
Erase everything in the file and replace it with the following text:
#!/bin/sh unset SESSION_MANAGER gnome-session --session=gnome-classic & [ -x
/etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources xsetroot -solid grey vncconfig -iconic &
Exit and Save the file
Skip down to Step #2 at the bottom
Using CentOS 5.6 or 6.2:
CentOS has provided step-by-step instructions on their Wiki page:
CentOS - How To - VNC Server
Skip down to Step #2 at the bottom
Using Fedora: yum update
yum install tigervnc-server
yum groupinstall "Desktop" "X Window System" "Fonts" vncserver
It will then prompt you to create a password that will be needed to access your remote desktop:
Password: YourPassword Verify: YourPassword
Run this to kill your current session:
vncserver -kill :1
This will Install KDE:
yum install @kde
Now we need to edit the VNC startup file: nano /root/.vnc/xstartup Erase the entire contents of the file and replace with this:
#!/bin/sh unset SESSION_MANAGER exec /etc/X11/xinit/xinitrc [ -x
/etc/vnc/xstartup ] && exec /etc/vnc/xstartup [ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources startkde &
Then type vncserver to start up a new session:
vncserver
Skip down to Step #2 at the bottom
Step 2 - Installing & Setting up the VNC Viewer on your Local Machine Using Ubuntu & Debian Squeeze:
sudo apt-get update
sudo apt-get install xtightvncviewer xtightvncviewer
You will need to input the password you used when setting up your remote desktop on the instance.
VNC Server: PublicIPAddress:1 Password: YourPassword Example:
VNC Server: 15.185.1.1:1 Password: password
Using Windows O/S:
1. Download and Install Tight VNC Viewer (Right-click, save as the link or you can go to the TightVNC Download page and choose the Self-installing
Package for Windows download)
You will need to input the following information: VNC Server: PublicIPAddress:1
Password: YourPassword Example:
VNC Server: 15.185.1.1:1 Password: password