[Guide] To Install GUI in Linux VPS

IAmDaze

Junior Member
Joined
Sep 2, 2017
Messages
162
Reaction score
163
Hey Guys! Do you want to use a graphical version of Linux and use it as a regular computer? If yes, then this guide is for you guys. Some of you might be more comfortable with graphical version of Linux then you might want to do this. Since almost none of the VPS provider install regular GUI linux in your VPS you have to follow these steps.

Step 1: First connect to your VPS through SSH and log in.

Step 2: Update your packages first by entering the following command:
Code:
apt-get update

Step 3: Install the standard XRDP package from the Ubuntu repository by entering following command:
Code:
apt-get install xrdp

Step 4: After installing XRDP, you need to install the alternate desktop environment. We are going to install the xfce4. Since xfce4 is light and fast it will not be much of burden to your VPS.
Code:
apt-get install xfce4

Step 5: Configure the Ubuntu server for xrdp to know that the xfce desktop environment will be used instead of Gnome or Unity. To configure these settings, you have to type the following command in terminal.
Code:
echo “xfce4-session” > ~/.xsession

Step 6: Start the xrdp service by typing:
Code:
/etc/init.d/xrdp start

DONE

Now to connect, just open Remote Desktop Connection and enter your server details with username and you can login.
 
What about centos
You can install xrdp on centos7 but you need Gnome to be installed first.

xrdp is available in EPEL repository only, so Install and configure EPEL repository by using the following command

Code:
rpm -Uvh https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

Use YUM command to install xrdp package on CentOS 7 / RHEL 7.

Code:
yum -y install xrdp tigervnc-server

Once xrdp is installed, start the xrdp service using the following command.

Code:
systemctl start xrdp

xrdp should now be listening on 3389. You can confirm this by using netstat command.
If netstat not install you can install it first

Code:
netstat -antup | grep xrdp
Output should be:

Code:
tcp        0      0 0.0.0.0:3389            0.0.0.0:*               LISTEN      1508/xrdp
tcp        0      0 127.0.0.1:3350          0.0.0.0:*               LISTEN      1507/xrdp-sesman

By default, xrdp service won’t start automatically after a system reboot. Run the following command in the terminal to enable the service at system startup.

Code:
systemctl enable xrdp

You might have to configure firewall to accept the connection on port 3389, following commands will add the rules to firewall:

Code:
firewall-cmd --permanent --add-port=3389/tcp
firewall-cmd --reload

I suggest you to disable selinux.

after that just run remote desktop from your windows computer and access the server via IP,
Use root login details to login
 
Back
Top