Categories: TutorialsUbuntu

How to install LXDE + VNC GUI on Ubuntu/Debian Server

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.

vncserver

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.

nano ~/.vnc/xstartup

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:

vncserver

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.

TLHD

Tech blogger, web developer. Using Android from January 2009 when I got my first T-Mobile G1. Since then used a handful amount of Android smartphones and tablets. Also, rooting and using custom ROM & MODs on my phones and tablets. Photography is my passion along with Cryptocurrency. Taking pictures with my Samsung NX1 & Canon 70D during free times. Enjoy reading anything interesting happening with technology. Currently using a Galaxy S7 Edge, OnePlus 3, Nexus 5X, Galaxy Tab PRO 12.2.

Share
Published by
TLHD

Recent Posts

How to Send Komodo or Any Smart Chain Funds from Your Address Without Rescanning the Wallet?

Rescan can take long time to finish if you have thousands of transactions in… Read More

4 years ago

UK Granted Huawei A Limited Role In 5G Network

The British government has introduced that it will continue to give Huawei minimal role… Read More

5 years ago

Use Komodo’s DEXP2P Tech for Live Streaming [How-to]

Introduction Komodo's lead developer/founder James Lee "jl777" recently started working on an exciting new tech… Read More

5 years ago

AtomicDEX Mobile Decentralised Exchange is Out for Public Beta Testing

Komodo, the pioneer of decentralised cross-chain Atomic Swap has released their new version of mobile… Read More

5 years ago

How to Check Your VerusCoin Mining Balance, Hash Power & Estimated Average Time to Mine Block

This script and guide is for users who checks their VerusCoin mining node often and… Read More

6 years ago

Claim BTG and Convert to BCH in Quick & Easy to Follow Guide

This is a step-by-step guide to claim your Bitcoin Gold (BTG) and convert them into… Read More

7 years ago