Connecting to windows desktop from linux

Digital Citizen

Connect to a Windows PC from Ubuntu using Remote Desktop Connection

    tutorial by Codrut Neagu published on 01.11.2019

One useful feature of Windows is that you can connect to your desktop from another location to remotely manage your computer. Fortunately, major Linux distributions also offer this feature and Ubuntu is one of them. If you want to connect to your Windows computers from Ubuntu remotely, you can use the default RDP client found in it, called Remmina. Here is how to create, configure and establish a remote desktop connection from Ubuntu to Windows:

NOTE: This tutorial was created on Ubuntu 18.04 LTS (Bionic Beaver). However, it works in other versions of Linux too.

Step 1: Enable Remote Desktop Connections on your Windows PC

If you want to allow other computers to connect remotely to your Windows PC, you must first configure it to accept remote desktop connections. To learn how to do it, read this tutorial: How to enable Remote Desktop Connections in all versions of Windows.

Step 2: Launch the Remmina Remote Desktop Client

By default, Ubuntu comes with a remote desktop client app that supports the Remote Desktop Protocol (RDP) used by Windows operating systems for remote connections. You can find it in Ubuntu’s Apps list.

If you prefer to search, you can find the default Ubuntu RDP client by using the RDP search term.

Step 3: Configure and establish the Ubuntu remote desktop session to Windows

Once you open the Remmina Remote Desktop Client, you should see something like this:

Click the «Create a new connection profile» button.

Its icon is a green plus sign which is easy to spot in the top-left corner of the window.

The previous action opens a window called Remote Desktop Preference. Here you can configure the remote desktop Ubuntu to Windows connection that you are going to establish.

In the Profile section, type the Name that you want to use for the connection. It can be anything you wish. Leave the other settings from the Profile section set to their defaults.

In the Server field from the Basic tab, type the IP address of the Windows PC to which you will connect. Enter the User name and User password for the user account that you want to use on the remote Windows PC. That user account needs to exist on the Windows PC.

If you are using a Microsoft account on your Windows PC, it is OK to fill in your email address and password. If your Windows PC is part of a domain, enter it in the Domain field, otherwise, leave this field empty.

Next, you can set the Resolution and the Color depth that you want to use for your remote desktop connection. By default, the remote desktop profile is set to use the «Use client resolution» which means that the connection uses the same resolution as the Windows computer to which you connect. The Color depth is also set at the highest quality possible. However, selecting a smaller desktop resolution and color depth can improve the performance of your Linux to Windows remote desktop session. If you experience lag when connected to the remote Windows desktop, try reducing the color depth or resolution.

Читайте также:  Повредить файлы для запуска windows

If you want to share a folder from your Ubuntu computer with the Windows PC, check the Share folder box and select it.

Also, for more advanced settings, go to the Advanced tab. There you can turn the sound on or off, share printers, disable clipboard synchronization, and so on.

Once you finish configuring all the details, click Save and Connect. This saves your connection profile and then initiates an RDP connection to the Windows PC.

In a matter of seconds, you should have a running remote desktop connection established to your Windows PC.

You could also Connect to the remote Windows PC, without all the personalization steps shared earlier. However, that means that you have to reconfigure the remote desktop connection profile the next time you want to remote control your Windows PC.

Do you use Ubuntu to remote control Windows PCs?

As you can see, it is easy to establish a remote desktop connection from Linux to Windows. The Remmina Remote Desktop Client is available by default in Ubuntu, and it supports the RDP protocol, so connecting remotely to a Windows desktop is almost a trivial task. Did you use it? How did it work for you? Also, if you have any questions or if you need help, feel free to leave a comment below.

Источник

Remote Desktop Connection to Windows from Linux using RDP clients

Have you seen the ad that should be here?

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:

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:

Remmina

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:

Читайте также:  Linux server для windows сети

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

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.

If you are a curious person and want to check it out by yourself:

rdesktop

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:

Читайте также:  Как автоматически почистить windows 10

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

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:

  • 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:

Источник

Оцените статью