- Microsoft Remote Desktop Linux Server
- Linux Remote Desktop Server
- Microsoft Rdp Linux
- Microsoft Rdp Client Download
Linux on Windows: WSL with Desktop Environment via RDP WSL (Windows Subsystem for Linux) is very common these days especially with the new that Windows will ship a Linux kernel with WSL 2.0! Installing a Linux distro as WSL is easy via the Microsoft App Store and there are plenty of tutorials out there for it. What Microsoft is doing with WSL is fascinating and the endless possibility of having Linux and Windows in such deep marriage is beyond my wildest dream. In today’s guide, we will use Window’s native RDP client to remote connect into your local WSL2 Ubuntu on the same machine. To use RDP, the instructor must: Enable remote desktop connection; this is specifically needed to open the VM's port for RDP. Install the RDP remote desktop server. Install a Linux graphical desktop environment (such as MATE, XFCE, and so on). You can control a remote PC by using a Microsoft Remote Desktop client. The client can run on almost any device, including on your mobile smartphone. The client gives you the same powers you would have if you could reach the PC's keyboard. Through the client, you can.
Linux virtual machines (VMs) in Azure are usually managed from the command line using a secure shell (SSH) connection. When new to Linux, or for quick troubleshooting scenarios, the use of remote desktop may be easier. This article details how to install and configure a desktop environment (xfce) and remote desktop (xrdp) for your Linux VM running Ubuntu.
The article was writen and tested using an Ubuntu 18.04 VM.
Prerequisites
This article requires an existing Ubuntu 18.04 LTS VM in Azure. If you need to create a VM, use one of the following methods:
- The Azure CLI
- The Azure portal
Install a desktop environment on your Linux VM
Most Linux VMs in Azure do not have a desktop environment installed by default. Linux VMs are commonly managed using SSH connections rather than a desktop environment. There are various desktop environments in Linux that you can choose. Depending on your choice of desktop environment, it may consume one to 2 GB of disk space, and take 5 to 10 minutes to install and configure all the required packages.
The following example installs the lightweight xfce4 desktop environment on an Ubuntu 18.04 LTS VM. Commands for other distributions vary slightly (use yum to install on Red Hat Enterprise Linux and configure appropriate selinux rules, or use zypper to install on SUSE, for example).
First, SSH to your VM. The following example connects to the VM named myvm.westus.cloudapp.azure.com with the username of azureuser. Use your own values:
If you are using Windows and need more information on using SSH, see How to use SSH keys with Windows.
Next, install xfce using apt as follows:
Install and configure a remote desktop server
Now that you have a desktop environment installed, configure a remote desktop service to listen for incoming connections. xrdp is an open source Remote Desktop Protocol (RDP) server that is available on most Linux distributions, and works well with xfce. Install xrdp on your Ubuntu VM as follows:
Tell xrdp what desktop environment to use when you start your session. Configure xrdp to use xfce as your desktop environment as follows:
Restart the xrdp service for the changes to take effect as follows:
Set a local user account password
If you created a password for your user account when you created your VM, skip this step. If you only use SSH key authentication and do not have a local account password set, specify a password before you use xrdp to log in to your VM. xrdp cannot accept SSH keys for authentication. The following example specifies a password for the user account azureuser:
Note
Specifying a password does not update your SSHD configuration to permit password logins if it currently does not. From a security perspective, you may wish to connect to your VM with an SSH tunnel using key-based authentication and then connect to xrdp. If so, skip the following step on creating a network security group rule to allow remote desktop traffic.
Create a Network Security Group rule for Remote Desktop traffic

To allow Remote Desktop traffic to reach your Linux VM, a network security group rule needs to be created that allows TCP on port 3389 to reach your VM. For more information about network security group rules, see What is a network security group? You can also use the Azure portal to create a network security group rule.
The following example creates a network security group rule with az vm open-port on port 3389. From the Azure CLI, not the SSH session to your VM, open the following network security group rule:
Connect your Linux VM with a Remote Desktop client
Open your local remote desktop client and connect to the IP address or DNS name of your Linux VM.
Enter the username and password for the user account on your VM as follows:
After authenticating, the xfce desktop environment will load and look similar to the following example:
If your local RDP client uses network level authentication (NLA), you may need to disable that connection setting. XRDP does not currently support NLA. You can also look at alternative RDP solutions that do support NLA, such as FreeRDP.
Troubleshoot
If you cannot connect to your Linux VM using a Remote Desktop client, use netstat on your Linux VM to verify that your VM is listening for RDP connections as follows:
The following example shows the VM listening on TCP port 3389 as expected:
If the xrdp-sesman service is not listening, on an Ubuntu VM restart the service as follows:
Review logs in /var/log on your Ubuntu VM for indications as to why the service may not be responding. You can also monitor the syslog during a remote desktop connection attempt to view any errors:
Other Linux distributions such as Red Hat Enterprise Linux and SUSE may have different ways to restart services and alternate log file locations to review.
If you do not receive any response in your remote desktop client and do not see any events in the system log, this behavior indicates that remote desktop traffic cannot reach the VM. Review your network security group rules to ensure that you have a rule to permit TCP on port 3389. For more information, see Troubleshoot application connectivity issues.
Next steps
For more information about creating and using SSH keys with Linux VMs, see Create SSH keys for Linux VMs in Azure.
For information on using SSH from Windows, see How to use SSH keys with Windows.
Have you ever used the Windows app Remote Desktop Connection? This app, included in all Windows installations, allows you to remotely access another Windows PC or a server with Windows Server. For this purpose, it employs the Remote Desktop Protocol (RDP).
Organizations can install applications on a central server instead of various computers. To use those applications, employees must remotely access that server. Such centralization can make maintenance and troubleshooting easier. This technology was formerly known as Terminal Services (TS). Currently, web systems are more common. But, in some scenarios, Windows remote apps are still needed.
In those scenarios, Linux users can remotely access Windows computers and servers from their favorite system using an RDP client.
There are a few RDP clients available for Linux and we are going to talk about them today:
You can choose the one you like best or the one that best suits your needs.
Out of curiosity, FreeRDP is both an app and a library, which provides reusable features for other apps. Except for rdesktop, all of the other clients above use the FreeRDP library.
Enabling remote desktop on Windows
First of all, you must set up the computer you want to connect to so it allows remote connections. On the Windows machine you want to connect to, logged on with an administrator account, open the Start menu and click Settings. To do that, on the window that appears, open the System category, and then Remote Desktop. Finally, enable it:
Note that you can’t connect to computers running a Windows Home edition (for instance, Windows 10 Home). This screen informs you, if that is the case:
Microsoft Remote Desktop Linux Server
Your Home edition of Windows 10 doesn't support Remote Desktop.
Source of the image: Digital Citizen
If you want more information about remote desktop on Windows, take a look at:
Linux Remote Desktop Server
Remmina is a remote desktop client that supports many remote access protocols such as RDP, VNC, NX, XDMCP and SSH. It aims to be useful for system administrators and travellers, who need to work with lots of remote desktops and/or servers. Remmina is included in the Ubuntu Linux distribution and is its default remote desktop client.
To install Remmina on Linux Kamarada and openSUSE, run:
Once installed, to start Remmina, if you use the GNOME desktop environment, open the Activities menu, on the top-left screen corner, type remmina and click its icon:
To quickly start a remote access, select the RDP protocol, type the hostname or IP address of the computer you want to connect to (e.g. 10.0.0.251) and hit Enter:
If it’s the first time you connect to this computer, Remmina asks whether to trust its certificate, click Yes:
On the next screen, enter your User name and Password on the remote computer. Also inform the Domain, if necessary. Optionally, you can choose to Save password. Click OK:
You will see the remote computer’s desktop in the Remmina window:
From now on, you are using that computer, but remotely, without sitting in front of it. Each clicking and typing is sent to be processed on the remote computer.
If the remote computer is a Windows desktop, its screen is locked during remote access.
If you are going to access this computer often, consider saving the connection settings, so that remote access can be easily initiated. To do this, click the Create a new connection profile button on the top-left corner of the Remmina main window:
On the next screen, give a Name to identify the connection, select RDP in the Protocol field and enter the connection settings: Server, User name, User password and Domain (if necessary). When you’re finished, click Save:
After that, the connection becomes listed on the Remmina main window:
When you want to remotely access that computer, just double-click it on the list.
FreeRDP is a free implementation of the Remote Desktop Protocol following the Microsoft Open Specifications. This implementation provides both the client and the server applications as well as a library, which allows other applications to use the RDP protocol. Today, we are interested in the FreeRDP client application.
To install the FreeRDP client on Linux Kamarada and openSUSE, run:
The FreeRDP client does not have a main screen like Remmina. To start a remote access using the FreeRDP client, run this command from a terminal:
Making the appropriate substitutions. For example:
If you need to inform the computer’s domain, use the /d parameter:
If it’s the first time you connect to this computer, the FreeRDP client asks whether to trust its certificate:
Type Y (yes) and hit Enter. Then type your user password on the remote computer and hit Enter:
After that, the remote desktop connection is initiated:
If you have ever started the remote desktop connection on Windows by the Command Prompt (using the mstsc command), you may have noticed that the FreeRDP client uses the same command syntax. It was implemented that way on purpose, to keep compatibility.
Microsoft Rdp Linux
If you are a curious person and want to check it out by yourself:
- on Windows, run:
- on Linux, run:
rdesktop was the first RDP client for Linux and, for many years, it was the most used. But since November 2019, the project is looking for a new maintainer.
In contrast, FreeRDP was born in 2009 as a fork of rdesktop, when Microsoft decided to open the RDP specifications. As time passed and the FreeRDP project evolved, it became the standard RDP client on systems where no native Microsoft client is available.
I present rdesktop here for information purposes only. Unless you have a good reason to use it, you are advised to use one of the other RDP clients, based on FreeRDP.
To install rdesktop on Linux Kamarada and openSUSE, run:
Then, to start a remote access using rdesktop, invoke it from a terminal followed by the hostname or IP address of the computer you want to connect to. For example:
In the past, that would suffice and rdesktop would just work. But now we face a problem that comes from the lack of proper maintenance and updates:
At some point, Microsoft released an Windows update that has since made the use of Network Level Authentication (NLA) required by default. FreeRDP does support NLA, while rdesktop does not. You can still use rdesktop for remote access, as long as you disable NLA on the computer you want to connect to. Note that this makes the connection less secure.
To disable NLA on the Windows machine you want to connect to, logged on with an administrator account, open the Control Panel, open the System and Security category, then click the System icon. On the next screen, click the Remote settings link by the left. On the dialog box that appears, select the Remote tab. Finally, disable the option Allow connections only from computers running Remote Desktop with Network Level Authentication and click OK:
With NLA disabled, back to the Linux computer that will start the remote access, try again:
This time, rdesktop will work. A window presents the Windows logon screen. Enter your username and password and press Enter to start the remote access:
If you want more information about that rdesktop bug, see:
Vinagre is the default remote desktop client for the GNOME desktop. That’s why it is also the default remote desktop client for Linux Kamarada 15.1, the current stable release. Like Remmina, it supports some connection protocols: SSH, RDP, SPICE and VNC. However, like rdesktop, Vinagre is unmaintained for some time now.
When trying a RDP access, Vinagre only displays a black screen, as I reported on the openSUSE mailing list some time ago:
On some distributions, like Debian, Vinagre works. I believe that those distributions applied some patch to Vinagre.
Probably, the next Linux Kamarada release will come with Remmina instead of Vinagre, following the Ubuntu Linux distribution.
Because of that, I present Vinagre here just for information purposes as well.
Vinagre comes already installed by default on Linux Kamarada and openSUSE, if you chose the GNOME desktop, but if you need or want to install it, you can do this by running:
To start Vinagre, which appears as Remote Desktop Viewer on the applications list, open the Activities menu, on the top-left screen corner, type remote or vinagre and click the corresponding icon:
On the Vinagre main screen, click Connect:
Fill in the next screen fields with the connection settings:
Microsoft Rdp Client Download
- on the Protocol field, select RDP;
- on the Host field, enter the hostname or IP address of the computer to connect to;
- enter your Username on the remote computer; and
- enter the Domain, if necessary.
When you are finished, click Connect.
If it’s the first time you connect to this computer, Vinagre asks whether to trust its certificate:
Tell it to do so by clicking Connect.
Enter your Password, optionally enable Remember this credential and click Authenticate:
At this point, you should see the remote computer’s desktop. You can notice it has its screen locked (as it normally does during RDP accesses). But, as I said, Vinagre only displays a black screen:
Like Remmina, Vinagre allows you to memorize the connection settings, to easily connect to the same computer again in the future. To do this, during the remote access, open the Bookmarks menu and click Add Bookmark.
After you created the bookmark, it will now be listed on the Bookmarks menu. When you want to remotely access this computer again, just open this menu and click the bookmark.
References
Since it’s not possible to remotely access computers running Windows 10 Home, to write this how-to I used a VirtualBox virtual machine with a Windows 10 Enterprise evaluation version legally downloaded from:
