This topic describes how to install a GUI desktop on an Elastic Compute Service (ECS) instance that runs Ubuntu 18. After the GUI desktop is installed, you can use it to manage the Ubuntu 18 operating system.

Prerequisites

A Ubuntu 18 instance is created. For more information, see Create an instance by using the wizard.

Install a GUI desktop

Important The performance of an instance is degraded after a GUI desktop is installed on it. If the GUI desktop is not properly installed, the instance operating system may be unable to boot. Before you install a GUI desktop on the Ubuntu 18 instance, we recommend that you create snapshots for the instance to back up your data. For more information, see Create a snapshot of a disk.
  1. Connect to the Ubuntu 18 instance.
  2. Run the following command to update the software repository:
    apt-get update
  3. Run the following command to install a GUI desktop:
    apt-get install ubuntu-desktop
    If an error is reported as shown in the following figure during the installation process, use the solution described in the FAQ section of this topic to resolve the issue. Then, start the GUI desktop. Error reported
  4. Run the following command to configure the GUI desktop to auto-start on system startup:
    systemctl set-default graphical.target
  5. Connect to the Ubuntu 18 instance by using a Virtual Network Computing (VNC) management terminal.
  6. Run the following command to restart the instance:
    reboot
    The welcome page shown in the following figure indicates that the GUI desktop is installed. Welcome page
  7. Click Next repeatedly to accept default settings.
    The interface shown in the following figure indicates that the GUI desktop is installed and available for use. You can disable the GUI desktop if you do not want to use it. For more information, see the Disable the GUI desktop section. Desktop configured

Disable the GUI desktop

  1. In the GUI desktop, right-click a blank area and select Open Terminal.
  2. Run the following command to disable the GUI desktop:
    systemctl set-default multi-user.target
  3. Enter your password twice as prompted. The password must be the one that you set when you configure the GUI desktop.
    Password used for authentication
  4. Run the following command to restart the instance:
    reboot
    The following command output indicates that the GUI desktop is disabled for Ubuntu 18. Service edition

FAQ

Problem description

An error is reported when a GUI desktop is being installed on a Ubuntu 18 instance, as shown in the following figure. Error reported

Cause

Recent versions of the pdate-manager-core, libparted2, and python3-update-manager packages exist on the instance. However, previous versions of the packages are required to install the GUI desktop for Ubuntu 18. You must delete the recent versions of the packages so that the system re-installs software packages based on the software package dependency tree.

Solution

  1. Run the following command to uninstall recent versions of the pdate-manager-core, libparted2, and python3-update-manager packages:
    apt-get remove update-manager-core libparted2 python3-update-manager
  2. Run the following commands to re-install the GUI desktop:
    apt-get update
    apt-get install ubuntu-desktop