In this tutorial I’ll share how I installed very minimalistic LXDE and Tightvncserver to use graphical desktop in one of my VPS running Ubuntu 14.04. LXDE is a very lightweight graphical user interface (GUI) for Ubuntu or Debian based operating systems. VNC server manages the back-end and lets you connect to your VPS remotely with any VNC client and lets you use your server with GUI. These software requires minimum system requirements and will run on almost all low-end VPS.
Install & Access Graphical Desktop on Ubuntu/Debian VPS
Note: It is better not to run these commands as root user. Add a new user and give them
sudo permission. Install and run these from the user account, more secured.
Check and do system update with the two following commands
sudo apt-get update
sudo apt-get upgrade
Installing the required packages.
sudo apt-get install nano xorg lxde-core tightvncserver
We can start our
tightvncserver with the following command.
This will ask you for a password. When it asks if you want read only access, type ‘
n‘ and press Enter. The server will start at
your_ip_or_domain:1. Don’t try to access it yet. First kill the vncserver using the following command.
vncserver -kill :1
Then we need to change the config file.
Add the following two lines at the end of the file.
lxterminal & /usr/bin/lxsession -s LXDE &
After the edit the config file will look like this:
#!/bin/sh xrdb $HOME/.Xresources xsetroot -solid grey #x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" & #x-window-manager & # Fix to make GNOME work export XKL_XMODMAP_DISABLE=1 /etc/X11/Xsession lxterminal & /usr/bin/lxsession -s LXDE &
Save and close the file by pressing
ctrl + x, then
y and press
Enter. Restart your vncserver with the following command:
Now use any VNC-client software in your computer, phone or tablet to connect to your Linux VPS. You can use your domain name or ip ending with :1 and the password your entered earlier. And, the here you go. GUI enabled on your Ubuntu / Debian server or VPS.
Extras you might want to install:
If you want a GUI file editor, browser and an FTP client, type the following in your terminal and use them in your Ubuntu/Debian/Linux GUI environment.
sudo apt-get install leafpad firefox filezilla
This is just to start with. You can install more apps if you need them. Though servers are best to manage in Command Line Interface (CLI), but GUI cam make an amateur Linux user’s life easy.