قالب وردپرس درنا توس
Home / Tips and Tricks / How to set up Remote Desktop on Ubuntu

How to set up Remote Desktop on Ubuntu



  Ubuntu mug next to a laptop, a phone and Rubik's Cube.
J.D. Canchila / Shutterstock

Want to get your hands on a remote Ubuntu Linux computer? Set up the screen sharing of Ubuntu and take over the remote control if necessary. You can connect to the screen sharing with any VNC client. We show you how.

Ubuntu's built-in "screen sharing" is a VNC server.

If you make an SSH connection to a remote Ubuntu Linux computer, you will get a terminal window interface. For many tasks, such as system administration, this is perfectly fine and has the advantage of being an easy connection. There are no graphics to transfer from the host computer to the local client, so setup is quick and easy.

If you want to install graphical applications on the remote host on your local machine, you can do this with a PuTTY connection, which is also easy to set up.

But what if you go all-in and want to see the entire remote desktop and it's like sitting right in front of it? Simple: You use Screen Sharing, also known as Desktop Sharing.

To do this, configure screen sharing on the remote computer and connect to a VNC client on the local computer. And ̵

1; you guessed it – it's easy to set up.

Although this article focuses on Ubuntu, this is really a GNOME thing. It works just as well on any other Linux that has a GNOME version of its distribution. For example, Manjaro and Fedora have the same options and settings described below. We've gone through this process with Ubuntu 18.04 LTS.

Enabling Screen Sharing on the Remote Host

These are the settings that you make on the remote Ubuntu computer that you want to connect to .

Click the Settings icon in the system menu.

 Click the Settings icon in the system menu.

In the Settings dialog box, in the page area, click Sharing. and then click the "Share" button.

 Click

. Click "Off" next to "Screen Sharing" to toggle it to "On".

. Click

. The Screen Sharing dialog box appears. Click on the button in the title bar to activate it.

 Click the button in the title bar of the

When the switch is on, the slider at the bottom of the dialog box also changes

By default, "Access Options" is set to "New connections ask for access ". This means that each user must confirm each connection. If you try to connect remotely, it will not work. Configure a password instead. Select the Required Password radio button and enter a password in the Password field.

This password does not apply to a user account, but must be provided by remote clients when they connect. It is limited to eight characters. Make it as complex as possible. If you forget the password, you can repeat these steps at any time to reset it.

 Select

. After entering a password, close the Screen Sharing and Settings dialogs. [19659006] Encryption is used to transfer and validate the password on a connection request. Whether the rest of the VNC traffic is encrypted depends on the functions of the VNC client. This is more important for connections over the Internet.

If you do not have a secure VPN between your two sites, or if the VNC connection is not otherwise protected (for example, through SSH tunneling), you can assume that this is a secure connection that is not encrypted. Avoid opening confidential or private documents through the connection.

Now we need to configure a client to connect to this computer. This brings us to IP addresses.

Access to the remote system via the Internet.

Warning : It is recommended to use VNC over a local area network only. With Ubuntu screen sharing, you can not set a password that is longer than eight characters. If you want to connect remotely, we recommend setting up a Virtual Private Network (VPN) server on the network with the remote Ubuntu system. Connect to the VPN over the Internet and then connect to the VNC system through the VPN. This avoids exposing the VNC server directly to the network. However, if you still want to access the screen sharing server over the Internet, this section explains how.

If you are not on the same network as the remote Ubuntu computer, you will need to connect to it over the Internet. The IP address that a network presents to the Internet is its public IP address. This is the IP address of the router assigned by the Internet service provider (ISP). So we have to find this IP address.

The easiest way to do this is to type "my ip" in the Google search bar on the Ubuntu computer and then press Enter.

 Google search result for

This is good to know, but it is not enough to connect to the remote computer.

Imagine you want to call someone in a hotel. You can not call her room directly. You first call the hotel and give the name of the guest you want to talk to. The attendant checks the hotel directory and forwards your call to the correct room.

The router on a network acts as a switchboard. Therefore, the router on the remote network must be configured to forward VNC connection requests to the Ubuntu PC. This is a network technique called port forwarding.

But let's take a moment to reset. Your ISP may have assigned you a static public IP address or a dynamic public IP address. A static public IP address is permanent, while a dynamic public IP address is likely to change when the router restarts. If your public IP address changes regularly, the remote computers do not know what IP address to send their connection request to.

The solution is called DDNS (Dynamic Domain Name System). There are free DDNS providers that you can use. The general process is:

  • You register with the DDNS provider and receive a static web address.
  • You configure your router to regularly contact your DDNS provider and inform them about their current IP address.
  • The DDNS system is being updated The entry of your web address thus refers to your IP address. This means that connection requests to your web address will always be forwarded to your current and correct IP address.

RELATED: How to access your home network from anywhere with dynamic DNS [19659006] The previous connection request has made it to the hotel's headquarters, according to our hotel analogy. To establish the connection, the router must perform the port forwarding.

Routers can send traffic coming to a specific port to a specific computer. Once configured to send VNC traffic to a specific computer, all incoming VNC connection requests are forwarded to that computer.

If you are using VNC over the Internet, it is recommended that you use a non-standard port. By default, the Ubuntu remote computer waits for VNC connection requests on TCP / IP port 5900.

This is a well-defined convention, but we reviewed it by analyzing network traffic:

 Network trace is displayed

We can mask this detail from the outside world by using a non-standard port such as 43025. The remote router must then be configured to forward connection requests for port 43025 – or your chosen port – to the Ubuntu computer port 5900.

RELATED: Forwarding ports on your router

This is like calling the hotel and asking for the geek in room 43025 Geek is really in room 5900 and connects your call. The geek does not know which room you asked, and he does not care. You do not know which room the geek is in and you are not interested.

The conversation between you can continue, and that was the desired result.

Connecting from a Linux system

The client Ubuntu does not need to be running on the computer that will connect to our Ubuntu computer. As we'll see, Linux does not even have to run on a Windows client.

To strengthen the distribution-independent nature of the connection, the connection is made from a computer running Manjaro. The steps are the same for other distributions.

We're going to make a VNC (Virtual Computing Network) connection, so we'll need to use a client capable of doing that. Remmina is a Remote Desktop client that supports VNC and is bundled with many Linux distributions, including Ubuntu. Installation via the package manager of other distributions is easy (if not already done).

Press the Super key between the left Ctrl and Alt keys and enter the first few letters of "remmina" The Remmina symbol is displayed at the top of the screen.

Click the icon to start Remmina.

 The Remmina symbol.

When the Remmina dialog box appears, click the plus sign Create a new connection.

 Click

. The Remote Desktop Settings dialog box appears. Here you enter details about the connection to the remote computer. These can be saved and reused so you do not have to re-enter them every time you want to connect.

 The

Enter a "name" for this connection. You can choose any option. However, this should identify the computer to which you are connecting.

You can leave the Group field blank or type a name for the group. If you configure many connections, they can be categorized, for example: For example, Linux computers, Windows computers, headquarters, local branches, and so on.

Choose VNC – VNC Viewer from the Protocol drop-down menu. Now there are more fields where Remmina knows which protocol we want to use.

In the Server field, enter either the IP address or the network name of the remote computer. The Username field does not refer to a Linux user account. You can enter anything here. The "password" must be the password you used when setting up screen sharing on the remote Ubuntu computer.

Choose a value from the Color Depth drop-down menu. Lower values ​​are more responsive, but the screen looks flat and slightly psychedelic. If graphics are not important to you and you prefer speed over beauty, choose a low value. Higher values ​​are more like the actual desktop. However, for slow connections, the refresh may be slow and the mouse movements may be irregular.

Choose Medium from the Quality drop-down menu. If everything seems to be ok with a connection, you can set this to a higher value for subsequent connections. To make sure the connection works, Medium is a good place to start.

After configuring your connection details, click the "Save" button. You return to the Remmina main window and your new connection is listed there.

 The new compound listed in the Remmina main window.

Double-click the connection to connect to the remote Ubuntu computer. The remote computer must be turned on and the person who set up the screen sharing must be logged in. A notification will appear that you are connected and the desktop needs to be controlled. This is just polite.

 Remote Connection Notify the remote user that another user is controlling their desktop.

Note that you are not logging in to the remote computer. You take over the session of the person who is already logged in. [19659006] Remmina shows you the remote desktop in a window on your computer. You can move the mouse and use the keyboard as you would on the remote computer.

The icons on the page allow you to maximize the window, scale the remote desktop to the Remmina window, and switch to full-screen mode. Screen view and so on. Hover your mouse over the icons for a tooltip to see what they are doing.

 Ubuntu Remote Desktop in a Remmina VNC session.

If you have stopped the remote connection, disconnect the connection. On the remote computer, click the lower icon in the page area.

 Click the lower icon

Connecting from a Windows system

Windows has compatibility issues with the encryption used in the VNC connection, so we're using it make the encryption optional. This allows computers that use encryption to do so and computers that can not connect.

Warning : Everyone on your network can hear the connection. This is another reason why this should be used on a local network or over a VPN – not over the Internet!

Use this command on the remote Ubuntu machine to make encryption optional:

  gsettings set org.gnome.Vino Require-Encryption false 

If RealVNC is not installed on your Windows computer, download and install it. The installation is simple: just click the "Next" button and accept the default settings.

After installation, launch the VNC Viewer application from the Start menu. From the File menu, choose New Connection.

 Click

. The Properties dialog box appears. Enter the IP address or network name of the remote Ubuntu server in the VNC Server field.

Enter a name for this connection in the Name field to see which remote computer it is connected to. You can enter a label in the Label field or leave it blank.

In the "Security" group, leave the "Encryption" drop-down menu on "Let VNC Server Choose" Use Single Sign-On (SSO) if possible "and the option" Use Smartcard or if possible " Authenticate certificate store "are disabled. Make sure that “Authenticate using single sign-on (SSO) if possible” and “Authenticate using a smartcard or certificate store if possible” are unchecked.” width=”462″ height=”632″ src=”/pagespeed_static/1.JiBnMqyl6S.gif” onload=”pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);” onerror=”this.onerror=null;pagespeed.lazyLoadImages.loadIfVisibleAndMaybeBeacon(this);”/>

Click OK to save your settings. An icon for your new connection appears in the main window.

 A new connection icon in the RealNVC main window.

Double-click the icon to connect to the remote computer. You will see a splash screen when the connection is made.

 Welcome screen in RealVNC when connected.

Because you have set the encryption as optional, it is not used in the On a Windows computer, a warning dialog box appears.

Select the "Do not warn again on this computer" check box, and then click Continue.

 Select the check box

You will see the desktop of the remote Ubuntu computer in the RealVNC window.

 Remote Ubuntu desktop in a RealVNC window.

Remember that the Windows VNC connection is not encrypted. Therefore, do not open private documents or emails through this connection.

Never too far

If you need to remotely access an Ubuntu computer, you now have an easy way to do it. As a bonus, RealVNC also offers a free app for Android smartphones and iPhones. You can set it up as described above.

 realVNC on an Android phone connected to a remote Ubuntu computer.




Source link