When I got my new dedicated server setup with Ubuntu server 12.04 LTS, I wanted to use it both for website hosting and multiple users remote desktop work.
It took me some time to arrange all the steps to have the above completed, and as far as the hosting part was pretty easy, the multiple Ubuntu users desktop setup needed some jugs of coffee before start working as I wanted it.

So, I presume you have logged in to your server with some user already, so we will stat with updating the system:

Shell

1

sudo apt-getupdate

Next, as I want all Gnome desktop features, will install it completely with:

Shell

1

sudo apt-getinstall ubuntu-desktop

Unity looks fancy, but I want the old Gnome panel, and I do not need “compiz”, so:

Shell

1

2

3

sudo apt-getremove compix unity

sudo apt-getinstall gnome-panel

Next what we need is a VNC server.

Shell

1

sudo apt-getinstall vnc4server

The tricky part here is that you have to create several configuration files for the Ubuntu Remote Desktop user. This is really time consuming if you have to read all the settings and creating the files by yourself.

It is more easy to start the VNC server which will create the files automatically:

Shell

1

vnc4server:2

You will be asked for a password so enter it, and then kill the server as we have to make some configuration changes:

Shell

1

vnc4server-kill:2

Edit the xstartup configuration file:

Shell

1

vi.vnc/xstartup

And make it looks like this:

Shell

1

2

3

4

5

6

7

8

9

#!/bin/sh

[-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup

[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources

xsetroot-solid grey

vncconfig-iconic&

x-window-manager&

gnome-panel&

gnome-session&

Now you can start the vnc server with this:

Shell

1

vnc4server:2-geometry1024x768-depth24

Certainly you can change the settings if you want different Remote Desktop geometry.

Now use your preferred VNC client – http://remmina.sourceforge.net/ (Linux) and http://www.tightvnc.com/download.php (Windows) are my suggestions – and connect to the Ubuntu Remote Desktop server using x.x.x.x:2 as (:2) is the number of display used to run for the client. If you have more than one running you should use different number at the end.

As I saying different desktops, I am going to add another user to my Ubuntu Remote Desktop server.
For this I will need to repeat the above steps for creating (and starting) the VNC profile for each user. This one is not yet automatically implemented, but it is not a big deal.
First I will add another user:

Shell

1

sudo adduser newuser

Complete the several steps for creating the user which is including creating the password and user personal information.
(A little trick when you want to add user with administrative privileges is to type the command as : adduser admin
)
Then start the VNC server once to create the VNC password:

Shell

1

2

sudo su newuser vnc4server:3

sudo su newuser vnc4server-kill:3

Open VNC startup file for the ‘newuser’

Shell

1

sudo vi/home/newuser/.vnc/xstartup

And paste the same configuration as for the first user:

C++

1

2

3

4

5

6

7

8

9

#!/bin/sh

[-x/etc/vnc/xstartup]&&exec/etc/vnc/xstartup

[-r$HOME/.Xresources]&&xrdb$HOME/.Xresources

xsetroot-solid grey

vncconfig-iconic&

x-window-manager&

gnome-panel&

gnome-session&

Save the file and start the service

Shell

1

sudo su newuser vnc4server:3-geometry1024x768-depth24

Now using VNC client you can connect to the new user Desktop as going to x.x.x.x:3 address.

The next step is to automate a little bit the start-up precess for these Ubuntu Remote Desktop users. Otherwise you have to start vnc4server for each user when the server is rebooted.

So, switch to root (it is just more easier) and then create vncserver folder and create file as vncservers.conf:

Shell

1

2

3

sudo su-

mkdir-p/etc/vncserver

vi/etc/vncserver/vncservers.conf

Inside put the following massive:

Shell

1

2

3

VNCSERVERS="2:user 3:newuser"

VNCSERVERARGS[2]="-geometry 1024x768 -depth 24"

VNCSERVERARGS[3]="-geometry 1024x768 -depth 24"

Where ‘user’ is the main user you are dealing with (the one we configured VNC for initially) and ‘newuser’ which is the second user are we have created. If you have more users created and the above steps for settings passwords and vnc4srver start-up completed, add more lines accordingly wit (:4),(:5) etc. screens.

About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.