All Products
Document Center

How to install desktop GUI for Linux ECS

Last Updated: Dec 24, 2018

In consideration of performance and universal compatibility, desktop GUI components are not installed on Alibaba Cloud official public Linux system images by default. Here we briefly explain how to install desktop GUIs for common OS so that you can configure your system according to your needs.

Note: Desktop GUIs may Significantly reduce server performance. If the desktop is not properly installed, it may also make the operating system fail to start properly. Therefore, we recommend that you create a manual snapshot as a backup (see Create a snapshot) for the server’s system disk before installation to facilitate rollback and recovery in case of errors.


Install ECS CentOS 7 desktop GUI

Take the installation of MATE Desktop as an example:

  1. Log on to the server, and run the yum groups install "X Window System" command to install the X Window System.

  2. Run the yum groups install "MATE Desktop" command to install the MATE Desktop.

  3. Run the systemctl set-default command to start the server by using the desktop GUI by default.

  4. Run the reboot command to restart the server. You can also restart the server in the ECS console.

  5. Connect to the server using the ECS console Management Terminal to test and verify the installation.

Install ECS Ubuntu 14.04 64-bit desktop GUI

  1. Connect to the server using the ECS console Management Terminal.

  2. Run the following command to install the desktop environment software kit.

    1. apt-get install x-window-system-core
    2. apt-get install gnome-core
    3. apt-get install gdm
  3. After the installation is complete, run the command startx to start the graphic desktop.

  4. Log on to the server.

Common issues

I cannot use keyboard and mouse after desktop GUI is installed in CentOS

  • Symptom: After the desktop environment is installed, the keyboard and mouse are unavailable after connecting to the server using the ECS console Management Terminal.

  • Analysis: This issue may result from an error of the keyboard and mouse drivers.

  • Solution: Try to change the driver to evdev.

    1. Run the yum install xorg-x11-drv-evdev command to install evdev.

    2. Run the Xorg -configure command to create the /etc/X11/xorg.conf configuration file.

    3. Run the cp /etc/X11/xorg.conf command to copy the X11 configuration file.

    4. Modify the keyboard and mouse driver in the configuration file /etc/X11/xorg.conf to evdev:

      1. Section "InputDevice"
      2. Identifier "Keyboard0"
      3. Driver "evdev" #Modify the driver to evdv
      4. Option "Device" "/dev/input/event3"
      5. EndSection
      6. Section "InputDevice"
      7. Identifier "Mouse0"
      8. Driver "evdev" #Modify the driver to evdv
      9. Option "Device" "/dev/input/event5"
      10. Option "Mode" "Absolute"
      11. EndSection
    5. Restart the server and verify that the keyboard and mouse are usable.

CentOS system shuts down messagebus by default and Gnome is unavailable

  • Symptom: I cannot log on to the system after installing the Gnome desktop GUI for ECS CentOS. After the account and password are entered, the system prompts the following:

    "You are currently trying to run as the root super user. The super user is a specialized account that is not designed to run a normal user session. Various programs will not function properly, and actions performed under this account can cause unrecoverable damage to the operating system."

  • Analysis: This is possibly because the desktop’s messgebus and haldaemon services did not start automatically. In consideration of the system performance and stability, the Linux ECS official public image does not start messgebus and haldaemon services automatically by default.

  • Solution:

    1. Roll back the system with a historical snapshot.
    2. Re-install the desktop GUI.
    3. Run the following command to set the messgebus and haldaemon services to auto-start:
      1. chkconfig --level 35 haldaemon on
      2. chkconfig --level 35 messagebus on

      Note: We recommend that you modify the startup level to Level Three for the sake of safety, and then start the desktop environment using the startx command to test the availability of the desktop GUI. You can also switch to terminal mode for troubleshooting when an issue occurs. Finally, modify the startup level to Level Five after you make sure that the desktop environment has started properly.

If the problem persists, log on to Alibaba Cloud Community for free consultation, or contact Alibaba Cloud Marketplace sellers for help.