• Home
  • Archive
  • Tools
  • Contact Us

The Customize Windows

Technology Journal

  • Cloud Computing
  • Computer
  • Digital Photography
  • Windows 7
  • Archive
  • Cloud Computing
  • Virtualization
  • Computer and Internet
  • Digital Photography
  • Android
  • Sysadmin
  • Electronics
  • Big Data
  • Virtualization
  • Downloads
  • Web Development
  • Apple
  • Android
Advertisement
You are here:Home » Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

By Abhishek Ghosh July 4, 2014 6:55 pm Updated on July 4, 2014

Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

Advertisement

This Guide describes how to install VNC Server on Ubuntu 14.04 on Rackspace Cloud with step by step commands. The server becomes a desktop. Previously we described how to Install VNC Server on Ubuntu 12.04 on Rackspace Cloud Server, also we did it with a special version of Debian named NeuroDebian; also we explained the terminology – VNC – Virtual Network Computing. Also, we explained the differences between Server OS and Desktop OS. Both, Ubuntu 12.04 and Ubuntu 14.04 are LTS, that means both will enjoy Long Term Support.

 

Frequently Asked Questions Related to Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

 

Users often ask whether running VNC is legal or illegal. As we are NOT the provider, you must comply with the rules of your country and the country where the Server datacenter is located. Additionally, you must not perform illegal works which are described by the provider, in our case it is Rackspace. For example, as it becomes a desktop, your IP address on the remote server’s browser becomes of Rackspace. VNC or Virtual Network Computing is fully legal in most of the countries. VNC or Virtual Network Computing is intended for good work, not for destructive works.

Please do not change firewall or other security related settings from graphical desktop interface without knowing what you are doing. We will recommend to keep the fresh installation as an image so that you can easily spin up a new instance in case you can not handle the problems out of experiments. In any case of difficulty to login, you always can access the server from console provided by Rackspace.

Advertisement

---

Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

 

Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

 

If you are using Windows OS, use PuTTY like SSH/Telnet client for initial command line works. Create a server from your account. Then select Ubuntu 14.04for this guide to install VNC Server. Choose RAM according to your need. 2 GB RAM will be a sufficient to start, you can use more RAM if you need. After clicking the create button, the server building process will start and you will get the prompt of password proving window. Copy it to a text editor like notepad and after the build process is complete. The step by step screenshots are shown in older guide, new users can follow them.

Now we will SSH to the server once the build process has been completed. First update and upgrade your instance :

Vim
1
2
3
4
5
ssh root@your-IP-address
# change your-IP-address
# accept the prompt
# do update and upgrade
apt-get update && apt-get upgrade

Perform a soft reboot :

Vim
1
reboot

Now open the sources.list file to Edit it :

Vim
1
sudo nano /etc/apt/sources.list

commented out lines will have hash before them, enable the universe and multiverse repositories only from one source (either mirror.rackspace or official ubuntu repo; if you use mirror.rackspace, you will not get charged for the bandwidth as it is within ServiceNet). Run apt-get update and apt-get dist-upgrade to check if it throws any error or not.

Vim
1
apt-get update && apt-get dist-upgrade

We will install GNOME and vnc4server this time :

Vim
1
apt-get install gnome-core xfce4 firefox && apt-get install vnc4server

If you want to share the setup with multiple users, you should add users like we do for normal SSH usage :

Vim
1
2
3
adduser your-username
# force to add password if you are not getting password prompt
passwd your-username

It will ask hundreds of questions, type and complete the process. The command vncserver will start VNC session :

Vim
1
vncserver

The above is for root user. If you want to do it as user, you have to run these commands :

Vim
1
2
3
4
5
su - your-username
# start vmc
vncserver
# kill / stop vmc
vncserver -kill :1

As UNIX or Linux are intended for multiple users by default, the configuration file will be located at :

Vim
1
2
3
4
5
6
7
/home/your-username/.vnc/xstartup
# change your-username
# to take a backup of the file before editing
cp ~/.vnc/xstartup ~/.vnc/xstartup.bak
# edit it
nano .vnc/xstartup
# save it with ^ + O and exit with ^ + X

We should edit it like to like this :

Vim
1
2
3
4
5
6
7
8
9
#!/bin/sh
unset SESSION_MANAGER
unset DBUS_SESSION_BUS_ADDRESS
startxfce4 &
[ -x /etc/vnc/xstartup ] && exec /etc/vnc/xstartup
[ -r $HOME/.Xresources ] && xrdb $HOME/.Xresources
xsetroot -solid grey
vncconfig -iconic &

We will create a configuration file in etc directory and create a file :

Vim
1
2
3
4
5
6
7
8
mkdir -p /etc/vncserver
nano /etc/vncserver/vncservers.conf
# save it with ^ + O and exit with ^ + X
# port are 5901 with resolution 1024x768
# add these two lines
[..]
VNCSERVERS="1:your-username"
VNCSERVERARGS[1]="-geometry 1024x768"

By default vncserver will not start after a reboot as daemon. We said about how to write bash scripts and this is a situation where we will need a bash script to automate the start process by default by editing the file :

Vim
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
nano /etc/init.d/vncserver
** Script Starts With # up to end**
 
#!/bin/bash
unset VNCSERVERARGS
VNCSERVERS=""
[ -f /etc/vncserver/vncservers.conf ] && . /etc/vncserver/vncservers.conf
prog=$"VNC server"
start() {
. /lib/lsb/init-functions
REQ_USER=$2
echo -n $"Starting $prog: "
ulimit -S -c 0 >/dev/null 2>&1
RETVAL=0
for display in ${VNCSERVERS}
do
export USER="${display##*:}"
if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
echo -n "${display} "
unset BASH_ENV ENV
DISP="${display%%:*}"
export VNCUSERARGS="${VNCSERVERARGS[${DISP}]}"
su ${USER} -c "cd ~${USER} && [ -f .vnc/passwd ] && vncserver :${DISP} ${VNCUSERARGS}"
fi
done
}
stop() {
. /lib/lsb/init-functions
REQ_USER=$2
echo -n $"Shutting down VNCServer: "
for display in ${VNCSERVERS}
do
export USER="${display##*:}"
if test -z "${REQ_USER}" -o "${REQ_USER}" == ${USER} ; then
echo -n "${display} "
unset BASH_ENV ENV
export USER="${display##*:}"
su ${USER} -c "vncserver -kill :${display%%:*}" >/dev/null 2>&1
fi
done
echo -e "n"
echo "VNCServer Stopped"
}
case "$1" in
start)
start $@
;;
stop)
stop $@
;;
restart|reload)
stop $@
sleep 3
start $@
;;
condrestart)
if [ -f /var/lock/subsys/vncserver ]; then
stop $@
sleep 3
start $@
fi
;;
status)
status Xvnc
;;
*)
echo $"Usage: $0 {start|stop|restart|condrestart|status}"
exit 1
esac

We should chmod it properly to make it executable for the next step :

Vim
1
chmod +x /etc/init.d/vncserver

We should do two last steps :

Vim
1
2
3
update-rc.d vncserver defaults 99
# reboot
reboot

After the server boots again, for Windows, follow our older guide; for OS X 10.9 upwards, we can directly use vmc:// with IP address, followed by :port-number to open the VNC session; for Linux, we can use Vino VNC Client. There are client apps for mobile devices like those running Android. Default settings will work out of the box. If does not work, please refer to the OS specific websites. Please check the steps yourself and report us if we have missed any step as it really difficult to remember the steps later after really checking. We will do the needed change after creation of corresponding video guide.
Please do not follow multiple guides as custom filename, path, user name might not match.

Tagged With Could not install VNC Server: 1603 , how to install vnc on ubuntu server , ubuntu 14 04 vnc
Facebook Twitter Pinterest

Abhishek Ghosh

About Abhishek Ghosh

Abhishek Ghosh is a Businessman, Surgeon, Author and Blogger. You can keep touch with him on Twitter - @AbhishekCTRL.

Here’s what we’ve got for you which might like :

Articles Related to Guide to Install VNC Server on Ubuntu 14.04 on Rackspace Cloud

  • Rackspace & HP Cloud Server VNC Remote Desktop (Ubuntu 14.04)

    Here is Updated Guide For Using Rackspace & HP Cloud Server VNC Remote Desktop on Ubuntu 14.04 LTS With Step by Step Commands With TightVNC.

  • Ubuntu with GUI on Rackspace Cloud Server as VNC Remote Desktop

    Ubuntu with GUI on Rackspace Cloud Server as VNC Remote Desktop is a guide to install and work on powerful server with up to 48 GB of RAM and GUI from devices.

  • How to set VNC up on A Linux Server With Rackspace Cloud

    How to set VNC up on a Linux Server with Rackspace Cloud Unmanaged Server plus tips on suitable Linux distro, which clients to use – all in one compact article.

  • Installing Guacamole Browser VNC on Rackspace Cloud Server

    Installing Guacamole Browser VNC on Rackspace Cloud Server is actually not very difficult. You can install easily to enable a VNC Server as remote desktop.

performing a search on this website can help you. Also, we have YouTube Videos.

Take The Conversation Further ...

We'd love to know your thoughts on this article.
Meet the Author over on Twitter to join the conversation right now!

If you want to Advertise on our Article or want a Sponsored Article, you are invited to Contact us.

Contact Us

Subscribe To Our Free Newsletter

Get new posts by email:

Please Confirm the Subscription When Approval Email Will Arrive in Your Email Inbox as Second Step.

Search this website…

 

Popular Articles

Our Homepage is best place to find popular articles!

Here Are Some Good to Read Articles :

  • Cloud Computing Service Models
  • What is Cloud Computing?
  • Cloud Computing and Social Networks in Mobile Space
  • ARM Processor Architecture
  • What Camera Mode to Choose
  • Indispensable MySQL queries for custom fields in WordPress
  • Windows 7 Speech Recognition Scripting Related Tutorials

Social Networks

  • Pinterest (24.3K Followers)
  • Twitter (5.8k Followers)
  • Facebook (5.7k Followers)
  • LinkedIn (3.7k Followers)
  • YouTube (1.3k Followers)
  • GitHub (Repository)
  • GitHub (Gists)
Looking to publish sponsored article on our website?

Contact us

Recent Posts

  • Hybrid Multi-Cloud Environments Are Becoming UbiquitousJuly 12, 2023
  • Data Protection on the InternetJuly 12, 2023
  • Basics of BJT TransistorJuly 11, 2023
  • What is Confidential Computing?July 11, 2023
  • How a MOSFET WorksJuly 10, 2023
PC users can consult Corrine Chorney for Security.

Want to know more about us?

Read Notability and Mentions & Our Setup.

Copyright © 2023 - The Customize Windows | dESIGNed by The Customize Windows

Copyright  · Privacy Policy  · Advertising Policy  · Terms of Service  · Refund Policy