Updated on 2026-08-27 GMT+08:00

Installing a GUI for Ubuntu FlexusL Instances

Scenarios

By default, no graphical user interface (GUI) is installed on FlexusL instances running Ubuntu. If you need a GUI, install it by following the instructions in this section.

Constraints

  • This section applies to FlexusL instances running Ubuntu 16.04, 18.04, 20.04, 22.04, and 24.04.
  • Before installing a GUI, ensure that the memory of the FlexusL instance is greater than 2 GiB. Otherwise, the GUI installation may fail or the instance cannot be started after the installation.

Prerequisites

You have purchased a FlexusL instance running Ubuntu and the instance is in the running state.

Procedure

  1. Log in to the FlexusL console.
  2. On the target resource card, choose > Reset Password to reset the password as instructed.

    A FlexusL instance does not have an initial password. If you want to log in to a FlexusL instance, set a password for it first. If you have already set a password, skip this step.

    For details, see Resetting the Password for a FlexusL Instance.

  3. Locate the target resource card and click Remote Login. In the displayed dialog box, click VNC Login and enter the username and password to log in to the FlexusL instance. The username is root, and the password is the one you set in the previous step.

    For more login methods, see Login Modes.

  4. After remotely logging in to the FlexusL instance, install the GUI.
    1. Run the following command to update the software library:
      apt-get update
    2. Run the following command to install the Ubuntu GUI desktop component:
      • For Ubuntu 16.04, run the following command:
        apt-get install -y scite xorg xubuntu-desktop
      • For Ubuntu 18.04 and later versions, run the following command:
        apt-get install -y ubuntu-desktop
  5. Set the configuration file version (mandatory for Ubuntu 24.04).

    In Ubuntu 24.04, after the installation command is executed, you need to set the configuration file as prompted or press Enter to use the default value.

    Figure 1 Example configuration file
  6. Run the following command to edit the /root/.profile file:
    vim /root/.profile

    Press i to enter insert mode and change the last line to tty -s && mesg n || true or tty -s && mesg n 2> /dev/null || true.

  7. Press Esc to exit editing mode.
  8. Run the following command to save and exit the configuration file:
    :wq
  9. Add a member account (mandatory for Ubuntu 20.04).

    After the GUI desktop component is installed on the ECS, you cannot log in to the Ubuntu 20.04 OS as user root. You need to add a member account for logging in to the GUI desktop.

    Run the following command to add user user01:

    adduser user01

    Set a password for user01 as prompted.

    Adding user `user01' ...
    Adding new group `user01' (1001) ...
    Adding new user `user01' (1001) with group `user01' ...
    Creating home directory `/home/user01' ...
    Copying files from `/etc/skel' ...
    New password: 
    Retype new password: 
    passwd: password updated successfully

    Set information about user01. You can press Enter to skip the setting. Then the system prompts you to check whether the entered information is correct.

    Enter Y.

    Changing the user information for user01
    Enter the new value, or press ENTER for the default
            Full Name []: 
            Room Number []: 
            Work Phone []: 
            Home Phone []: 
            Other []: 
    Is the information correct? [Y/n] Y
  10. Run the reboot command to restart the ECS.
  11. Log in to the FlexusL console again via VNC and log in to the GUI as user root or the member account added in 9.

    For Ubuntu 20.04, you need to use the member account to log in to the GUI.

  12. After the first login, perform initial configuration as instructed, such as setting the language, account, and password. After the configuration is complete, the GUI similar to the following figure is displayed.