Portal Home > Knowledgebase > 06. How-to/Tutorials (VPS and Seedbox) > Ubuntu: xfce4 desktop with VNC

Ubuntu: xfce4 desktop with VNC

This tutorial is how to get an xfce4 desktop up and running with VNC on ubuntu, we'll also include how to install firefox and flash plugin.

First log in as root using your favorite SSH client. You'll want to start with the desktop so lets do:

apt-get install xfce4

(there are other packages you can install to add more features, i generally also apt-get install xfce4-goodies, and apt-get install xfce4-terminal)

now that our desktop is installed, we need to install vnc. do this by doing:

apt-get install vnc4server

Great! now we need to su to the user who will run the vnc desktop:

su - username

what we want to do now is start up the vnc to do 2 things, 1) create all the vnc files in our home directory and 2) set a password, so we want to do this:
vnc4server :1

now our directories and files are created, and our password is set, we want to shut the vnc server down so that we can configure it to work with our xfce4 so we kill it like this:
vnc4server -kill :1

so lets go begin the configurating (for this tutorial i choose to use nano as my editor, modify that to whatever editor you choose to use):
cd .vnc
nano xstartup

Now in our editor we see the xstartup script, we want to unset SESSION_MANAGER so we need to uncomment this line. so it should go:



Next we go down to the last line in the xstartup script and we want to comment it out. so it will go:
x-window-manager &

#x-window-manager &


Ok, now we want to add 1 more line to the bottom of our xstartup script that should look like this:
startxfce4 &

Save the file.

Next we decided we want our vnc to start any time our vps is rebooted so we open the crontab file like this:
crontab -e

find an empty line in the crontab file and add this:
@reboot vnc4server :1

Save the file.

next we know we want a web browser and flash plugin so we'll do 
apt-get install firefox
apt-get install flashplugin-installer

Thats all there is to it, now we want to start our vnc server up with:
vnc4server :1

Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article

Also Read

Powered by WHMCompleteSolution