The great thing about Linux servers is that they’re lightweight and considerably cheaper than Windows servers. The downside is that they’re not typically used with a GUI so they’re not readily set up to remotely control them like you would a Windows server using Remote Desktop Connection.
Even though that’s the case, you’ll find that it’s easy and fun to set up your server to remotely control it just like you would a Windows server. So let’s get to it.
Setting up VNC for remote desktop connection on Ubuntu 16.04 is easier than on Ubuntu 14.04. So you might want to follow that tutorial instead. A couple of days back, I had posted a tutorial that will help you turn Ubuntu 14.04 server to a Seedbox with Transmission. Ubuntu-desktop and gnome-session-fallback will install a desktop environment, tightvncserver will install a VNC server and xrdp will install an RDP server that you can connect to with Remote Desktop (it uses the RDP protocol).
Get a High RAM VPS at Entry-level PricingStarting with 2GB RAM at $6.99/monthTake your pick from our KVM VPS that offer a generous amount of RAM at an affordable price. We've got 5 plans for you to choose from, our smallest featuring 2GB RAM at $6.99/mo.[Main Features]
- SSD Drives
- KVM Virtualization
- 1Gbps Shared Uplink
- Location: Chicago, ILPick one of our KVM plansGet started now
Step 1: Install xRDP
We’ll assume this is the first interaction with your server.
After you’ve logged in via SSH into your Ubuntu server, go ahead and update the package index using:
sudo apt-get update
Next, we’ll install xRDP. With xRDP installed on our Ubuntu server we’ll be able to connect to it using popular remote desktop clients such as the remote desktop connection on Windows, r-desktop, free RDP and others.
Install xRDP by running the following command:
sudo apt-get install xrdp
Step 2: Install Your Preferred Desktop Environment
Now it’s time to install our preferred desktop environment. You’ve got quite a few choices available, such as XFCE, Lubuntu, Xubuntu & MATE. We’ll be using XFCE since that is what I prefer to use since it is lightweight and it goes great on budget servers.
To install XFCE run:
sudo apt-get install xfce4
Now everything should be ready for us to connect to our server using Remote Desktop Connection from Windows and Mac (you can find it in the App Store). To connect from Linux, I use Remmina.
Step 3: Connect to it using Remote Desktop Connection
To connect to your server just launch the Remote Desktop Connection application and input your hostname or IP:
If this is your first time connecting, then you’ll receive some security warnings. Assuming this is your server and it is secure then just go ahead and confirm them.
And the last step is to input your username and password and connect using Xorg session:
And now you should have successfully connected to your Ubuntu Server using Remote Desktop Connection.
Should you have any troubles with this tutorial, just leave us a comment or contact us on Reddit/Contact Form and we’ll try to help as soon as possible.
Need Help?Have a server from a different provider and need help? Hit us up!We offer various services to assist you in achieving your business goal. Working in the industry, we've gained proficiency various areas related to hosting.[Proficiencies Include]
- RADIUS
- WHMCS
- LAMP Stack
- LEMP Stack
- VPN Protocols
- SMTP
- Remote Desktop Solutions
- Linux in general
Hire UsHIT US UP
Share this:
Related
Categories: Linux BasicsUbuntuTags: RDPRemminaXFCEVlad
Leave a Comment
Important Note :
If you want to use xRDP in conjunction with the Unity Desktop interface, please check the following post : XRDP – How To Remote Connect to Unity Desktop on Ubuntu 16.04
Hello World,
In our previous post, we have quickly provided a step by step instructions on how to perform a fresh installation of Ubuntu 16.04. If you are working with Ubuntu since a long time, you know that no major changes have been introduced in the setup process and wizard. It’s quite straightforward.
xrdp is a great solution when you need to have coexistence between Windows machines and Linux machine. xrdp is basically a piece of software that allows you to remote desktop into your Ubuntu machine from a Windows computer. On the Windows machine, you do not need to install any tools, you simply use the standard and builtin tool Remote Desktop Connection.
In the past, we have described how to install xrdp on the previous releases of Ubuntu( 15.10,15.04,14.10,14.04,..). The process described to install xrdp on Ubuntu 16.04 is exactly the same as the one described for machines running Ubuntu 15.10. So, instead of going really deep into details, we will provide hereafter the necessary steps needs to be performed in order to have xrdp installed on your system.
So, let’s go
Assumptions
For this post, we have make some assumptions.
- Ubuntu 16.04 (Final Release version) is used
- The Mate-desktop will be installed on the machine (as alternative desktop environment)
- We will configure our system to match on localized version (i.e. we are using a Belgian french keyboard)
- Since Ubuntu 15.04, upstart has been replaced by systemd component. The systemd component is used in our scenario
- No additional configuration is needed to reconnect to the same session if you are using the latest version of the xrdp package found in the Ubuntu Repository
Installation Process
Step 1 – Install XRDP Package from Ubuntu Repository
A standard installation for us means that we will be using the xrdp package available within the Ubuntu repository. To install the xrdp software from Ubuntu repository, you will need to issue the following command in a terminal.
sudo apt-get install xrdp
Because of the sudo command, you will be prompted for a password. After entering your password, you will be asked to confirm your action by pressing Y (see screenshot below)
Click on picture for better resolution
Step 2 – Install an alternative Desktop
xrdp and Unity desktop (or Gnome 3) are not working well together. If you do not install another desktop environment, when you will try to connect to your Ubuntu machine, you will see only a gray screen. The workaround to this situation is to install an alternate desktop that can work with xrdp software solution.
Our preferred desktop alternative is Mate-Desktop. This post will show you how to install the Mate-Desktop and have it working with the xrdp software solution.
To install the Mate-desktop, issue the following command from the Terminal Session
sudo apt-get update
sudo apt-get install mate-core mate-desktop-environment mate-notification-daemon
Note :
Desktop interface such as xfce, LXDE,LXQT, KDE are all potential candidates. Check the following links for more information and installation and configuration procedures
- Ubuntu 14.04 – How to install xrdp in Ubuntu 14.04 (for xfce interface)
Step 3 – Configuring xRDP to use your desktop environment
At this stage, we need to configure our system in order to tell xrdp that an alternate desktop needs to be used. In our case, we have to tell xrdp that we want to use Mate-Desktop as alternate desktop. With the previous version of Ubuntu, you would need to create the ~/.xsession file. In Ubuntu 16.04, it seems that this approach is not working anymore. We need to configure the system differently when working with Ubuntu 16.04
Starting the alternate desktop environment
Important Note :
In our scenario, we have installed mate-desktop, If you have installed another Desktop alternative, you will have to adapt the configuration of the startwm.sh file to reflect your settings.
If you use the ~/.xsession file approach, you will experience the same symptoms as before i.e. grey screen. We will need to configure the system in a different way. To have xRDP working in Ubuntu 16.04, you will need to update the /etc/xrdp/startwm.sh file. To configure this, issue the following command in your Terminal console
Click on picture for better resolution
Note :
Remember that the command above is to be used when you have installed the Mate-Desktop. If you have installed a different desktop environment, you will need to adapt the command accordingly. Please check the following links
- Ubuntu 14.04 – How to install xrdp in Ubuntu 14.04 (for xfce interface)
Step 4 – Configuring xRDP Keyboard
By default, the xRDP login screen will use an en-us keyboard layout. You remote session will also be using the en-us keyboard layout. If you are using a different keyboard layout than the english one, you need to perform the following actions in order to update the configuration of the xrdp software.
In my case, I’m using a Belgian French keyboard, so I had to tell xrdp to use the belgian french keyboard as well. To do that, you need to perform the following actions :
Step 1 : You go to the /etc/xrdp directory
Step 2 : you issue the command setxkbmap -layout <%your layout%> to define which keyboard map/layout to use
Click on Picutre for better Resolution
Step 3 : create a copy of the km-0409.ini file into the same directory. It seems that this is the default file used by xrdp to define the keyboard layout. You will need to use sudo in order to be able to write into the directory
Step 4 : Check that you have a backup of your file by typing the dir or ls command
Step 5 : update the file by issuing the following command sudo xrdp-genkeymap km-0409.ini
Click on Picutre for better Resolution
Step 5 – Reconnect to the Same Session
Since Ubuntu 14.10, a new xrdp package has been made available in the Ubuntu repository. This package fixes a long time issue related to the fact that users could not reconnect to the same session. If you are using the package xrdp 0.6.1-1, you do not need to perform any customization, you will reconnect automatically to the same session.
As we can see, the installation process has not changed much and after performing all the necessary configuration steps, you should be able to connect remotely to your Ubuntu machine using the Remote Desktop Connection tool.
Some people are still facing some issues while using xrdp. If you have any issues, connecting or using xrdp, please leave a comment and will contact you back in order centralize and collect as much information possible about the issue and publish the workaround founded (if any) for the mentioned problem.
That was an easy post ?
Till next time
See ya