Azure Ubuntu Vm Remote Desktop



In order to connect to your Ubuntu VM from a Windows first we have to enable the XRDP in the Ubuntu in order enable the Remote Desktop Connection. So to enable XRDP we should connect to the server, PUTTY is a the commonly used client for SSH. (SSH is enabled by default in the Ubuntu VM on Azure). Now, we have a desktop environment installed in our VM, 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.

Microsoft is continually working with different Linux communities to add evermore distributions to the Azure Marketplace. Running Linux machines in the cloud brings with it a number of benefits such as additional stability, security and affordability over that of its Windows counterpart. With Linux now running on two out of every five server instances on Azure, interaction with Linux based systems is becoming an ever increasing occurrence for system administrators.

SSH is the default method when connecting to an Ubuntu server deployed from the Azure Marketplace. For seasoned Linux admin this is fine but for anyone new to the operating system or looking for a quick method of troubleshooting, this style of administration can initially seem daunting or time consuming.

This article shows the steps involved in installing the GNOME desktop and xRDP package on an Ubuntu virtual machine running in Azure. This makes available a more familiar and user friendly remote desktop style connection.

Assumptions

The following assumptions have been made:

    • Ubuntu Server version 17.10 has been deployed from the Azure Marketplace
    • GNOME will be the chosen desktop interface
    • SSH access is available
    • PuTTY will be used as the SSH client
    • Azure Portalaccess is available.

Installing Gnome Desktop

Although Ubuntu 17.10 “Artful Aardvark” has dropped the Unity 7 desktop, instead of switching to GNOME Shell, the Azure Marketplace image is deployed without the desktop package installed. It is worth noting that it’s possible to install xRDP without installing a desktop first, however, the user experience would be similar to that of the terminal experience offered when connecting by an SSH client.

Installing GNOME desktop over a terminal session might sound difficult, although in reality, it’s actually a relatively straightforward task. The first step of the process is to remotely connect to the server using an SSH client such as PuTTY and then install the applications from the Official Ubuntu Repository.

Open up PuTTY and using the IP address of the server which can be found on the Overview blade in Azure, configure and establish an SSH connection.


Once the SSH session has been established, go ahead and log in to the server.


Before we look to install the desktop, let’s go ahead and update the package list to make sure we have information on the newest versions of the packages and their dependencies. To accomplish this, we run the following command.

sudo apt-get update


We can now begin the desktop install. This is again done by issuing a fairly simple apt-get command from within the terminal session.

sudo apt-get install ubuntu-gnome-desktop


Installing xRDP

Now the desktop has been installed, it’s time to install xRDP. This is an open source remote desktop protocol (RDP) server, which allows you to RDP to your Linux server from a Windows machine. It is capable of accepting connections from rdesktop, freerdp, and remote desktop clients.

To install the package, run the following command.

sudo apt-get install -y xrdp


Configuring Console Access

Console access is restricted to root by default which essentially means that without making any further changes, connections by anyone else will be dropped. This is obviously not the required user experience, therefore access to the console will need to be configured for all users.

To change access from root only to all users we simply edit the file /etc/X11/Xwrapper.config Wazzapmigrator lite ibackup viewer mac.

This can be done by using an editor such as nano to manually change the line allowed_users=console to allowed_users=anybody.

Alternatively, it can also be updated by running the following command to make the changes.

sudo sed -i 's/allowed_users=console/allowed_users=anybody/' /etc/X11/Xwrapper.config


Adding a Network Security Group rule for RDP traffic

This article is based on an Ubuntu server that has been deployed from the Marketplace. As such, the machine will have been deployed with an NSG that has been configured to manage inbound and outbound traffic. By default, this will only allow port 22 inbound for SSH communication, not 3389 which is required for an RDP connection.

Mackeeper for mac. From within the portal, select the servers networking settings before then clicking on “Add inbound port rule


At this point you will be presented with a new blade in which the following settings need to be configured.

  • Service
  • Priority
  • Name
  • Description


As with most things in Azure, it is worth noting that this could also be done through PowerShell or Azure CLI.

Connecting via RDP

Now it’s time to check if the server is configured correctly and allowing RDP connections.

If you’re connecting from a Windows machine, go ahead and start up the Remote Desktop Connection client. Enter the public IP address of the Ubuntu Server and click on connect.


At this point, the xRDP login screen should appear. Go ahead and provide user credentials before selecting OK.


The first time you remotely login to the Ubuntu desktop, you will be presented with the following Authentication Required popup.


Clicking the cancel button a number of times will close the message and allow access to the desktop, although it will return on the next login. To subdue the message permanently, changes to the polkit configuration will need to be made.

To make the required changes, use the following command to create a file called 02-allow-colord.conf in the following location /etc/polkit-1/localauthority.conf.d/ remembering to use admin privileges.

Remote

sudo nano /etc/polkit-1/localauthority.conf.d/02-allow-colord.conf


Once nano has created and opened the file for editing, paste the following text into the file, before exiting and saving.

polkit.addRule(function(action, subject) {
if ((action.id 'org.freedesktop.color-manager.create-device' ||
action.id 'org.freedesktop.color-manager.create-profile' ||
action.id 'org.freedesktop.color-manager.delete-device' ||
action.id 'org.freedesktop.color-manager.delete-profile' ||
action.id 'org.freedesktop.color-manager.modify-device' ||
action.id 'org.freedesktop.color-manager.modify-profile') &&
subject.isInGroup('{group}')) {
return polkit.Result.YES;
}
});


If everything has gone to plan, the next time you login, no authentication message should be displayed.


Missing Gnome Desktop Dock

The other thing that you may notice when connecting remotely, is that the Ubuntu Dock is not visible. Having searched around the internet for a fix for this, the best solution I came across, was actually to install the Gnome Tweak tool which in turn then made it possible to enable both the Ubuntu appindicators and Ubuntu dock extensions. For some reason, the extensions tab appears to be missing from the default Systems Settings menu.

To install the Gnome Tweak tool, run the following command.

sudo apt-get install gnome-tweak-tool -y

Once installed, simply open the Tweak tool, select the Extensions tab and enable both the appindicators and dock extensions.


Now when connecting to the GNOME desktop, the Dock should be visible on the left-hand side of the screen.


That’s it!

In this post, we took an Ubuntu server running in Azure, installed the GNOME desktop and xRDP package, then followed up by making the necessary tweaks required for more streamlined user experience. Connecting to an Ubuntu server by remote desktop connection may not be enabled out of the box but hopefully, this article goes to show that it is still an option when administering Linux based machines in the cloud.

Для просмотра онлайн кликните на видео

Deploying an Ubuntu VM in Azure and Remote Desktop to it Подробнее

Ubuntu GUI on Azure (Link below on commands) Подробнее

Azure - How to Setup RDP for Remote Access Подробнее

Xerox setup for mac. Create Ubuntu Linux on Azure using Azure Portal - Virtual Machines in Microsoft Azure Cloud Подробнее

Ubuntu 20.04 Remote Desktop Access from Windows 10 Подробнее

Unable to connect to azure VM using RDP Подробнее

Using Remote Desktop to Connect to Linux VM hosted on Microsoft Azure Подробнее

[Azure Cloud ]How to install and configure xrdp on ubuntu 18.04/20.04 | Access the Server in GUI Подробнее

Creating Linux VM in Azure | Remote desktop connection Linux | Tutorial-2 Подробнее

How to Setup KALI Linux GUI on Azure Virtual machine and RDP Подробнее

Azure VM Server and SSH Login Подробнее

Desktop

Azure Ubuntu Vm

Connecting to Ubuntu 18.04 using Remote Desktop Protocol (RDP) Подробнее

Setup Remote Desktop Facility in Ubuntu 20.04 | Setup RDP in Ubuntu in 2021 | Enable RDP in Linux Подробнее

Remote desktop connection using Virtual Box Подробнее

Installing GNOME Desktop GUI and xRDP on Ubuntu 18.04 Подробнее

Connect To Azure Vm Rdp

Ubuntu Linux to RDP to Windows Server in Azure - How to Guide Using KRDC Client Подробнее

Connect to an Azure Virtual Machine using Remote Desktop Подробнее

Azure Ubuntu Vm Remote Desktop Server

Remote Desktop into Your Windows Virtual Machines (from Mac or PC) | 4K TUTORIAL Подробнее

Azure Ubuntu Vm Remote Desktop Login

Steps to RDP in to Azure Linux or Ubuntu VM Подробнее