Contacts

Ubuntu server remote desktop. How to connect to Windows from Linux? Using the server VNC and client in Ubuntu

If for any reason you needed access to a remote machine with Ubuntu exactly through RDP, then do not despair - everything is possible! To do this, there is a tool called XRDP. In this instruction, I will tell you how to connect to Ubuntu via RDP from Windows.

Installing the necessary packages

We will need to install two packets in the system - XRDP and XORGXRDP, but the second so is dependent on the first, therefore it is enough to execute one command:

Sudo Apt Install XRDP

Setting up XRDP.

For correct operation, it is necessary that the TCP port 3389 is open - you will be able to kill that your firewall does not block this port.
Also, if no desktop environment is installed in the system - it is necessary to install it, for example, XFCE, can be done by the command:

Sudo Apt Install XFCE4

Also in the user's home directory, on behalf of which the login will happen to the system must be located .xsession which indicates the launch command of the shell, in our example it startxfce4. (To run XFCE). After creating this file, the Sudo SystemCTL RESTART XRDP command to update the XRDP configuration (if it has already been launched).

Running XRDP

To start the service, execute the command:

Sudo SystemCTL Start XRDP

and in order for the XRDP to start with the system (not necessary) the command:

Sudo SystemCTL Enable XRDP

Accordingly, stopping and disconnecting the autorun service:

Sudo SystemCTL Stop XrDP Sudo SystemCTL Disable XRDP

Connect from Windows.

Open the connection menu to the remote desktop. Universal way Make it - through "execute" - press Win + R and in the window that opens, you type MSTSC:

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

In the invitation that appears, specify 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 was used.

July 28.

In the new versions of Ubuntu already there is a built-in VNC server. We will use it standard means. So far, it was understood in this issue - I had to read the decent number of forums. So, many users write that in the Ubuntu version 14.04 this focus does not pass because of some internal sublicties of the kernel device. I didn't go to this question deeply ... In any case, if you suddenly you are the happy owner of this particular version - you can use an alternative X11VNC server.

It is quite simple:

Sudo Apt-Get Remove Vino Sudo Apt-Get Install X11VNC

In the same article, the standard VNC server will be reviewed in the default Ubuntu. How to configure everything?

Concret to a remote host.

Connect through SSH to remote computerTo which we want to get graphic access. At the same time, we need to know its IP and login with the user password - the screen of which we want to see. In essence, we will suit the data of any user with Sudo rights, but then it will come to put hold of some moments.

So, let's say on the local network we have a computer under Ubuntu with IP address 10.20.0.30 and the user Feanor184. We connect to it from the Console with the -X key (to run graphic ICs):

SSH -X. [Email Protected]

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

Now, we enter in it:

Sudo Vino-Preferences

and we see a graphic window

Here we put the ticks:

aLLOW OTHER USERS TO VIEW YOUR Desktop — let me watch the desktop.

allow Other Users to Control Your Desktop — let me manage the mouse and keyboard remotely.

require The User to ENTER This Password — be sure to install a password for connecting. If anyone climbs in our network

show Notification Area Icon: Always — always displays 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 a configured computer, use any client with VNC support.

For example, Remmina - for Linux.

Ultravnc Viewer - for Windows.

I remind once again in order to work the described connection settings, Ubuntu must stand on a remote computer. Installing Ubuntu, this is a separate topic on which I would not like to emphasize attention, so we skip this step. On the Internet there are many manuals on this topic.

What do we end up?

We got the ability to connect to a remote computer under Ubuntu and perform any operations on it as if we were sitting on his monitor

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

There are cases when users use remote sessions for the machine already used (it sounds unusual, but there is a place to organize work with multiple desktops). Most users do not know when it will be necessary for this functionality.

Experienced users of UNIX systems often talk about SSH and command lineAs about access to the graphical desktop, but there are separate applications for this purpose.

The TECHRADAR portal tested the VNC system and its functions in many clients. Nevertheless, there are other protocols and types of access to the remote desktop. The growing popularity of such clients is to support multiple transmission protocols, so regardless of the type of server used and the target machine, you will find a suitable solution.

The researchers adhered to the principle of fair assessment of various protocols. For example, Nomachine NX supports VNC connections, but it was checked in a bundle with its own NX server, which is quite reasonable.

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

How to testing

The key element of the efficient remote desktop client is a quick response to the operations performed. The ideal interface will not be so good if you need to wait two minutes because of each keystroke registration.

When testing, the ability to remotely reproduce the Armegatron game. In this undemanding game on OpenGL on the screen update requires the fractions of time seconds. Results can be somewhat subjective, but this method It turned out to be very effective when demonstrating responsiveness of customers.

Customers were tested together with local computer with 4 nuclear processor and 16 gigabytes of memory in a gigabit local network under Ubuntu 14.04.3. The server x11 VNC and the official NX server for NX clients was used as servers. The functionality on the basis of the RDP protocol is maintained by some products, but in practice it was not tested.

Customers themselves worked on virtual Machine With the 2-nuclear process of Core I7, 4GB RAM and Fedora 23.

Remote desktop allows you to connect to your computer via 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 him. This feature is also at Ubuntu.

In this article, we will look at how to configure the remote desktop Ubuntu 16.04, as well as how to connect to it using various devices. As a remote access protocol, we will use VNC, it is slow and already outdated, but it is supported everywhere. In Ubuntu 16.04 everything is almost all software Already installed by default, you only have to change multiple settings.

Remote desktop ubuntu

As I said, we will apply VNC as a remote access protocol. And as a server - Vino, this program is supplied by default along with the distribution. And you will leave only a few settings for her work.

Open the DASH main menu and type in search Desktop Sharing.

If the system does not find anything, it is a frequent bug. You can run the utility through the terminal. To do this, open the terminal using Ctrl + Alt + T And execute:

vino-Preferences.

Further, in the window that opens, install a tick "Allow other users see your desktop" Then opposite the field "Require a password" Enter the password to be used to connect:

Here everything remote desktop Ubuntu is configured. And now you can try to connect to your computer using another distribution Linux. But there is another moment. You will not be able to connect from Windows. The default compulsory encryption is included. And this is not supported by all customers. To disable forced encryption, you need to install DCONF-Editor:

sudo Apt Install Dconf-Editor

Then open the program and go along the way. org.gnome.Desktop.remote-Desktop. There, remove the checkbox:

Now you are ready to test the Ubuntu remote desktop connection. Open the main menu and locate the client. remote connection Remmina.

In the Connection Row, select Protocol VNC., Then enter the address as we have gathered to check on the local machine, then enter localhost, in other cases you will have to use the IP address of the computer. Next click "Connect":

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

And then in the VNC system, the server will ask whether to enable the connection to the remote desktop Ubuntu 16.04 to this client:

After you approve the connection, you can use the remote desktop. Now it's 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 through the Internet by creating private local network, for example, with help Hamachi. or OpenVPN.

conclusions

In this article, we reviewed how to configure the remote desktop Ubuntu 16.04, as well as how to access it with other devices. Everything is very simple, even easier than with the same X11VNC for which you need to create multiple configuration files. If you have any questions, ask in the comments!

Related records:


In this article, consider several ways to remotely connect from Windows to Ubuntu.

Imagine you are in the same room, sitting in front of a computer with Windows; The data you need is in another, on a computer running Ubuntu. If both computers are in the same house, there are no problems; But what if they are in the same office block?

Why remotely connect to Ubuntu from Windows?

There are several reasons for which you may need a remote connection to the Ubuntu computer. Perhaps you are at work and must enter your home computer. In addition, you can have a Ubuntu computer in one room, windows computer In another, and the desire to run updates to Ubuntu.

Alternatively, you may use the Ubuntu server. You may have configured it to manage the launch of such a game like Counter-Strike or Minecraft. In any case, the remote connection setting will save a lot of time and strength.

You have two options for installing a remote connection with computer Ubuntu.: You can use Remote Desktop (RDP) or Virtual Network Computing (VNC).

Let's consider each method in turn.

Find out the IP address of your Ubuntu PC

Before you connect to the Ubuntu device, you need to know the IP address.

The first way is the easiest. Physically approach Ubuntu, press Ctrl + Alt + T to open the terminal and enter the command:

IFconfig

Look for "inet addr" opposite the connection you are currently using. For example, if you use Wi-Fi, look for wLAN0.. If the computer is connected to the network for Ethernet, look eth0..

Another way to find an IP address - find the connection icon on the panel, right-click and select Connection information. Here you will find the IP address.

None of these options can open? You can also connect to the router directly through your computer's browser.

After entering the router administration console, you can see which devices are connected. Just find the name of your Ubuntu device, find the IP address and write it down.

1. SSH connection

Before you start, you may want to install Putty on your computer (or just try the built-in windows feature SSH). This will allow you to install an SSH connection that gives remote access to the Ubuntu command prompt.

To make it clear: this is not the option of a remote desktop, as there is no mouse control. But it is useful to have for remote installation tools that you will use. However, SSH is often disconnected by default, so if it is not installed, you will have to fix it.

In short, it depends on what version of Ubuntu you use and whether you used ssh earlier.

After installation through the terminal ( sudo Apt Install OpenSSh-Server) You can set a remote connection (simply using the IP address and username and Ubuntu password) and use the terminal to install the necessary tools for RDP and for VNC.

2. Remote access using the remote desktop protocol

Most. simple option Is Using the Remote Desktop Protocol or RDP protocol. Built in Windows, this tool can be used to create a connection to a remote desktop in your home network. All you need is the Ubuntu IP address.

While the necessary software is pre-installed on Windows, you will need to install the XRDP tool on Ubuntu. To do this, open the terminal window ( Ctrl + Alt + T) and enter:

Sudo Apt Install XRDP

Sudo SystemCTL Enable XRDP

Wait until it is installed, then start the Remote Desktop application in Windows using the Start or Search menu. Enter RDP and click on the Remote Desktop Connection (connection to the remote desktop). When the application is open, enter the IP address in the computer field.

Then press the button Show options And add username For Ubuntu PC. You can click Saveto save these settings for reuse next.

Press the button To plugTo start connecting and enter the Ubuntu account password when it is proposed. After that, the connection will be set to give you full access To the Ubuntu remote computer with a mouse and keyboard. If you plan to often use this connection, you can create for it configuration file.In order to save time.

Troubleshooting RDP

Although RDP is excellent option To remotely connect to the Ubuntu computer, with the arrival of Ubuntu 18.04 LTS, this method is less reliable. It seems that there is a problem with establishing a remote connection when an Ubuntu machine has already been logged in an account.

Thus, a simple way to get around it is to simply exit the user.

If this is not possible, try switching the RDP connection to using the XORG server to use X11RDP, wait until it works, and then try xorg again.

You can also try to establish a connection after restarting the machine with Linux.

3. Remote access using a virtual network (VNC)

Another option with the full functionality of the remote desktop - VNC (VIRTUAL NETWORK COMPUTING). This requires a client application on a Windows PC and a server on Ubuntu.

At a remote PC, install the TightVNC Server component after checking updates:

Sudo Apt Update.

Install the server:

Sudo Apt Install TightvncServer

And run:

Sudo TightvncServer.

At this stage, you will be asked to install a password for connecting. You will also be assigned the desktop number, usually: 1. Write it down.


Now that TIGHTVNC Server is configured to Ubuntu, you will need to install a client on Windows. It can be downloaded from www.tightvnc.com/download.php - Make sure you have chosen the correct versionSince it is available in a 32-bit and 64-bit variant.

TIGHTVNC tools are available only in the kit, so after installation, look for TighTVNC Viewer in the Windows search.

After starting the viewer, enter the Ubuntu IP address to the host, and then the desktop number. It may look like this:

192.168.0.99:1

Enter the password when prompted and start working on a remote desktop!

We make TightVNC safer

By default, TIGHTVNC encrypts your password, but nothing more. This makes it unsafe for connections via the Internet. Fortunately, it can be made more secure, thanks to ssh and xming.

To do this, download and install the tool from SourceForge. After that, locate the desktop shortcut, right-click and select Properties.


Look for the Shortcut tab, and enter the following in the Target field:

"C: \\ Program Files (x86) \\ Xming \\ xMing.exe": 0 -clipboard -multiwindow

Check the box Include termination x11then go back to session (Session)at the top of the menu.


Enter the remote device's IP address and click Open. After a few seconds, a secure connection with the remote Ubuntu Desktop will be available.

Choosing the right solution for remote access

How do you use these methods depends on what you want to get from your remote desktop.

Three main options are available:

  • RDP.: It uses the Windows Remote Desktop Protocol protocol, through the implementation of an open source XRDP.
  • VNC.: Virtual network calculations are an alternative to RDP, but less secure.
  • VNC via SSH: VNC mixing with SSH increases connection safety.

You can also use SSH to control the terminal on your Ubuntu computer.

We have shown you three ways to set a remote connection with your Ubuntu computer or a Windows server. Each of them has its advantages and disadvantages. But if you just want to quickly plunge into Ubuntu, why not try the Windows subsystem for Linux available in Windows 10?



Did you like the article? Share it