Connect to Linux remote desktop from Windows. How to connect to Windows from Linux? Linux ubuntu remote desktop

If for some reason you need to access a remote machine running Ubuntu via RDP, then don’t despair - anything is possible! There is a tool for this called xrdp. In this tutorial, I will tell you how you can connect to Ubuntu via RDP from Windows.

Installing required packages

We will need to install two packages on the system - xrdp and xorgxrdp, but the second is already in the dependencies of the first, so it is enough to run one command:

Sudo apt install xrdp

Setting up xrdp

For correct operation, TCP port 3389 must be open - make sure that your firewall is not blocking this port.
Also, if no desktop environment is installed on the system, then it’s worth installing it, for example Xfce, you can do this with the command:

Sudo apt install xfce4

Also, in the home directory of the user on whose behalf the system will be logged in, the file should be located .xsession which specifies the shell launch command, in our example it is startxfce4(to run xfce). After creating this file, run the command sudo systemctl restart xrdp to update the xrdp configuration (if it was already running).

Running xrdp

To start the service, run the command:

Sudo systemctl start xrdp

and in order for xrdp to start along with the system (optional) the command:

Sudo systemctl enable xrdp

Accordingly, stopping and disabling autostart of the service:

Sudo systemctl stop xrdp sudo systemctl disable xrdp

Connecting from Windows

Open the remote desktop connection menu. Universal method to do this - through “Run” - press Win + R and in the window that opens type mstsc:

In the window that opens, specify the machines with Ubuntu and click “Connect”:

In the invitation that appears, indicate the data account in Ubuntu on behalf of which the connection will occur:

And, after clicking “Ok”, we get into the system:

In this example, Ubuntu 18.04 and Windows 10 were used.

July 28

New versions of Ubuntu already have a built-in VNC server. We will use it standard means. While I was understanding this issue, I had to read a decent number of forums. So, many users write that in version ubuntu 14.04 this trick does not work due to some internal subtleties of the kernel structure. I'm in this question I didn’t go into depth... in any case, if suddenly you are happy owner this particular version - you can use the alternative x11vnc server.

It is installed quite simply:

Sudo apt-get remove vino sudo apt-get install x11vnc

In the same article, we will look at the standard VNC server already included in ubuntu by default. How to set everything up?

Let's connect to the remote host.

Connect via ssh to remote computer, which we want to access graphically. At the same time, we must know its ip and login with the password of the user whose screen we want to see. In fact, the data of any user with sudo rights will suit us, but then we will have to adjust some points.

So, let's say in local network we have a computer running ubuntu with ip address 10.20.0.30 and user feanor184. We connect to it from the console with the -X key (to launch graphic X):

Ssh -X [email protected]

enter the password and get into the console of our remote computer.

Now, enter in it:

Sudo vino-preferences

and see the graphic window

Check the boxes here:

allow other users to view your desktop — We allow you to view your desktop.

allow other users to control your desktop — We allow you to control the mouse and keyboard remotely.

require the user to enter this password — Be sure to set a password for the connection. You never know who is surfing our network.

show notification area icon: always — We always display the vnc icon at the top of the screen in the tray.

You can also set your own settings - my settings are described here)

Save the settings and disconnect from the remote host.

To connect to the configured computer, we use any client with vnc support.

For example, Remmina is for Linux.

UltraVNC Viewer - for Windows.

Let me remind you once again that in order for the described connection settings to work, the remote computer must be running Ubuntu OS. Installing ubuntu is a separate topic that I would not like to focus on here, so we will skip this step. There are many manuals on this topic on the Internet.

What do we end up with?

We were able to connect to a remote computer running ubuntu and perform any operations on it as if we were sitting at its monitor.

Remote Desktop allows you to connect to your computer over the Internet using another computer or even a smartphone. You may often need to do something on another computer, even if you are not near it. Ubuntu also has this option.

In this article, we will look at how to set up a remote desktop on Ubuntu 16.04, as well as how to connect to it using various devices. We will use VNC as the remote access protocol; it is slow and already outdated, but it is supported everywhere. Almost everything in Ubuntu 16.04 software is already set by default, you just need to change a few settings.

Ubuntu Remote Desktop

As I already said, we will use VNC as the remote access protocol. And as a server - Vino, this program is supplied by default with the distribution. And all you have to do is make a few settings for it to work.

Open the Dash main menu and search for Desktop Sharing.

If the system does not detect anything, this is a common bug. You can run the utility through the terminal. To do this, open a terminal with Ctrl+Alt+T and do:

vino-preferences

Next, in the window that opens, check the box "Allow other users to see your desktop" Then opposite the field "Require password" enter the password that will be used to connect:

That's it, ubuntu remote desktop is configured. And now you can try to connect to your computer using another Linux distribution. But there is one more point. You won't be able to connect from Windows. By default, mandatory encryption is enabled. And this is not supported by all clients. To disable forced encryption you need to install dconf-editor:

sudo apt install dconf-editor

Then open the program and follow the path org.gnome.desktop.remote-desktop there, uncheck the box:

Now you are ready to test your ubuntu remote desktop connection. Open the main menu and find the client remote connection Remmina.

In the connection line, select the protocol VNC, then enter the address, since we are going to check on the local machine, then enter localhost, in other cases you will have to use the computer’s IP address. Next click "Connect":

Immediately the program will ask you for a password to receive remote access to computer:

And then, in the VNC system, the server will ask whether this client needs to be allowed to connect to the ubuntu 16.04 remote desktop:

Once you approve the connection, you can use the remote desktop. Now is the time to connect from another computer. You can use any VNC client for Linux, Windows or Android and connect to your computer if it is on the local network. In addition, you can access it even via the Internet by creating a private local network, for example, using hamachi or OpenVPN.

conclusions

In this article we looked at how to set up a remote worker Ubuntu desktop 16.04, and how to access it using other devices. Everything is very simple, even simpler than with x11vnc, for which you need to create several configuration files. If you have any questions, ask in the comments!

Related posts:


It can be seen as an act of aggression, but sometimes it is simply necessary.

There are cases when users use remote sessions for a machine they are already using (sounds unusual, but it happens to organize work with multiple desktops). Most users don't know when exactly they will need this functionality.

Experienced Unix users often talk about SSH and command line, as tools for gaining access to a graphical desktop, but there are separate applications for this purpose.

Techradar has tested VNC and its features in many clients. However, there are other protocols and types of remote desktop access. The growing popularity of such clients is that they support multiple transfer protocols, so regardless of the type of server and target machine you are using, you will find a suitable solution.

The researchers adhered to the principle of fair evaluation of different protocols. For example, NoMachine NX supports VNC connections, but it was tested in conjunction with own server NX, which is quite reasonable.

The TightVNC client has not been tested because it is very similar to the TigerVNC implementation. Both products have the same code base, but TigerVNC has several additional features.

How the testing went

The key to an effective remote desktop client is its ability to respond quickly to operations. An ideal interface won't be as good if you have to wait two minutes for every keystroke to be logged.

The testing tested the ability to remotely play the Armegatron game. In this undemanding OpenGL game, the screen refresh takes a fraction of a second. Results may be somewhat subjective, but this method has proven to be very effective in demonstrating customer responsiveness.

Clients have been tested with local computer from 4 nuclear processor and 16 gigabytes of memory on a gigabit local network under Ubuntu 14.04.3. The servers used were the X11 VNC server and the official NX server for NX clients. Functionality based RDP protocol supported by some products, but has not been tested in practice.

The clients themselves worked for virtual machine with 2-core Core i7 process, 4GB RAM and Fedora 23.



Loading...
Top