GUI Graphical Desktop LXDE http://www.lxde.org/ on Ubuntu VPS server with low RAM configuration. This works even in VPS1 plan with 256MB RAM!
This tutorial is just about how to install a graphical environment (GUI) on Linux VPS server and VNC server to let you connect to your VPS GUI desktop from your computer and to use VPS server as a desktop computer, run Firefox, Openoffice and other programs. This tutorial differs from Gnome GUI Desktop tutorial, because in this tutorial we will install LXDE desktop, which is more suitable for a low RAM VPS plans.
For LXDE desktop installation we choose any minimal Ubuntu version (latest recommended).
LXDE XWindows Desktop GUI uses less RAM than Gnome, so it is more suitable to a lower VPS plans with lower RAM available.
Reinstall your VPS with minimal Ubuntu OS and log in to your VPS server ssh command line as “root”.
1) Preparation of empty VPS server for GUI installation:
Uninstall and remove all unnecessary services (if really not needed):
root@server:~# apt-get purge apache2* bind9* samba*
Update existing packages:
root@server:~# apt-get update
root@server:~# apt-get upgrade
Install text editor “nano”:
root@server:~# apt-get install nano
2) GUI desktop installation:
root@server:~# apt-get install xorg lxde-core tightvncserver
Choose console country from the list, for example.: English (US)
Select keyboard layout, for example.: English (US)
3) Configuring LXDE VNC Server and create VNC connection password.
Creating configuration file and setting password for VNC session:
root@server:~# tightvncserver :1
This command starts server and asks you for a password. Important! This password will be used to connect to your VPS server GUI desktop, so use a secure and strong password (but not longer than 8 characters).
Also, if you want you can create additional, limited privileges connection password (read only password), with this read only password it is possible to connect to desktop, but can not do anything, just view.
If you want to create an additional read only password then for a question:
Would you like to enter a view-only password (y / n)
Answer … Y(es), and enter another password.
If the additional read only password you do not want, then respond, N.
root@server:~# tightvncserver -kill :1
Edit VNC configuration file:
root@server:~# nano ~/.vnc/xstartup
If you find uncommented, then comment-out with the character # line with:
And in the end of the file add 2 new lines:
/usr/bin/lxsession -s LXDE &
After changes files might look like this:
xsetroot -solid grey
#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &
# Fix to make GNOME work
/usr/bin/lxsession -s LXDE &
4) Restart VPS server (to see that everything is working fine)
5) Connect to your VPS server on the SSH console after reboot and start VNC server:
root@server:~# vncserver :1 -geometry 1024x768 -depth 16 -pixelformat rgb565
6) Download and install VNC program on your computer from here:
7) Run VNC program on your computer:
Enter in the VNC program address bar IP address of your VPS server and the end of address add a colon : with number 1 (as in this example, we launched VNC server, with the number 1), for example.:
TA-DA! You have connected to your VPS server GUI desktop
You can install additional programs and packages if you need, for example: Firefox
root@server:~# apt-get install firefox
If you want to change VNC password, then execute this command: