How to Install KDE Environment and VNC remote desktop connection to Ubuntu 14.04 Linux server

13 November 2015, Friday 0 Comments

With KDE desktop window manager, you can establishe a remote connection to your Ubuntu Linux VPS and use it like a windows server. Try it with a VPS has more than 1 GB Ram therefore Desktop window managers requires more ram instead of normal usage.


KDE Desktop Environment and VNC Server Installation

Execute the one line code shown in below. This command will update first, and then TightVNC Server Software will be installed that provides you KDE and VNC connections:

sudo apt-get update && sudo apt-get install -y kubuntu-desktop tightvncserver

After setup completion, start TightVNC server:

vncserver

VNC server asks you a password to connect on first run. And then it will ask you View only password. With press 'n' button you can pass.

With the message shown in below, your server will be ready to connect.

New 'X' desktop is ip-10-0-0-53:1 
Creating default startup script /home/ubuntu/.vnc/xstartup Starting applications specified in /home/ubuntu/.vnc/xstartup Log file is /home/ubuntu/.vnc/ip-10-0-0-53:1.log

You can make remote desktop connection with any of a VNC client. You can join your server with vnc:// protocol, server IP with 5901 port.

Note: Vncserver,  listen 5891 port with  :1 service name.  eg: :2 => 5892, ..   You can see vncserver which listening ports on realtime with this command: "ps aux | grep vnc"

Example: vnc://52.31.81.68:5901

If you are using a Windows, you will need a VNC software. Write your server IP just like shown in below and connect by using Real VNC Client. RealVNC can be used with Windows, MacOS X and other Linux operating systems.



Visit this site to download Free RealVNC Viewer.



Congratulations! You have installed KDE desktop environment and VNC Server to Ubuntu Linux server and ready to use.


To configure VNC Server to auto start when server starts (reboot)

To confiure VNC server runs at server starts and works as a service, follow the instructions shown in below.


First of all, download service script file from siterobot.io:

sudo wget -O /etc/init.d/vncserver https://siterobot.io/assets/uploads/scripts/vncserver-daemon

Give execute permission to this file:

sudo chmod +x /etc/init.d/vncserver

Before using VNS Service script, we need to stop VNC servers first to prevent any unwanted collusion.

vncserver -kill :1

Note: Vncserver,  listen 5891 port with  :1 service name.  eg: :2 => 5892, ..   You can see vncserver listening ports on realtime with this command: "ps aux | grep vnc"

Let's start VNC Service:

sudo service vncserver start

Add in to system services list to start this service automaticly on every server start:

sudo update-rc.d vncserver defaults


Share this


Comments