# Promote Ubuntu Server to Desktop
This procedure will promote an Ubuntu Server installation to an Ubuntu desktop. The procedure was originally created for Azure Virtual Machines but it can be used with any Ubuntu Server installation. Azure does not provide a Desktop version of Ubuntu 18.04 and this process is easier than creating a customer Azure Virtual machine. Additionally, this will allow the use of Windows Remote Desktop to access the Virtual machine.
This is beneficial for several reasons:
- Simple Development can be done in this environment using Visual Studio Code.
- Your work is not lost if your connection is lost.
# Prerequisites
- Valid login to an Azure VM with Ubuntu 18.04 LTS Server installed
- Putty or equivalent method to login via SSH
# Steps
Log in to the machine.
Create a file called install_desktop.sh and edit it.
Paste the following contents into the file:
#!/bin/bash
###########################################
# turn Azure 1804 into a desktop machine that allows RDP login
# change log:
# 2019-Jan-7: Initial version
###########################################
sudo apt-get update
sudo apt-get --yes upgrade
sudo apt-get --yes install tasksel
sudo tasksel install ubuntu-desktop
sudo apt install xrdp -y
sudo bash -c "cat >/etc/polkit-1/localauthority/50-local.d/45-allow.colord.pkla" <<EOF
[Allow Colord all Users]
Identity=unix-user:*
Action=org.freedesktop.color-manager.create-device;org.freedesktop.color-manager.create-profile;org.freedesktop.color-manager.delete-device;org.freedesktop.color-manager.delete-profile;org.freedesktop.color-manager.modify-device;org.freedesktop.color-manager.modify-profile
ResultAny=no
ResultInactive=no
ResultActive=yes
EOF
sudo systemctl enable xrdp
sudo apt-get install gnome-tweak-tool -y
sudo shutdown -r 0
Save the file.
Change the permission on the file to allow execution.
chmod 755 install_desktop.sh
- Run the file.
./install_desktop.sh
When completed, the machine will reboot.
- Open the Windows Remote Desktop and select the Display tab. The color depth should be set to 16 bits. If set to 32 bit, the Desktop UI will be very slow.
- Log in to the machine.
TIP
RDP won't log in to the machine if the console is logged into the desktop. Log out of the desktop before logging in with RDP.
Once logged in, the XRDP desktop can be modified to look more like a standard Ubuntu desktop with the following changes:
- Run the Tweaks Application. This application enables the Ubuntu dock and Ubuntu application indicators. These are enabled by default when installing the desktop version of Ubuntu and logging in from a console connected to the device. After these settings are changed, the RDP session will better resemble the default settings from a Desktop installation of Ubuntu.
- Default color for terminal is difficult to read and can easily be modified. Uncheck the check box indicated.
This completes the setup for XRDP.