Tuesday, March 24, 2015

How To Install GUI in Linux[Works on Less RAM Linux Too]

LXDE XWindows Desktop GUI requires less RAM , so it is more suitable to a lower VPS plans with lower RAM available.

Connect To Your VPS server via ssh command line

1.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 updateroot@server:~# apt-get upgrade

---Install text editor “nano”---

root@server:~# apt-get install nano

2)  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.

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).

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)
 Y(es), and enter another password.
If the additional read only password you do not want, then respond, N.

---Stopping VNC----

root@server:~# tightvncserver -kill :1

---Edit VNC configuration file----

root@server:~# nano ~/.vnc/xstartup


In the end of the file add 2 new lines:

lxterminal &/usr/bin/lxsession -s LXDE &

After changes files might look like this:

#!/bin/sh
xrdb $HOME/.Xresourcesxsetroot -solid grey#x-terminal-emulator -geometry 80x24+10+10 -ls -title "$VNCDESKTOP Desktop" &#x-window-manager &# Fix to make GNOME workexport XKL_XMODMAP_DISABLE=1/etc/X11/Xsessionlxterminal &/usr/bin/lxsession -s LXDE &


4) Restart VPS server

root@server:~# reboot

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:

Download VNC

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.:
192.168.0.1:1
Press “Connect” button and enter VNC password you have set before:

Done!!Enjoy

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:
root@server:~# vncpasswd


Happy GUI, Avi Rizal

No comments:

Post a Comment