To provide a pure system, the ECSs running Ubuntu do not have a GUI installed by default. You can install a GUI on such ECSs as needed.
For GPU-accelerated ECSs, after installing a GUI, you need to configure X Server, x11vnc, and lightdm to make sure that:
You can perform the following steps to install a GUI on an Ubuntu ECS:
apt-get update
apt-get install -y scite xorg xubuntu-desktop
apt-get install -y ubuntu-desktop
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.

vim /root/.profile
Press i to enter the editing mode and change mesg n || true in the last line to tty -s && mesg n || true. After the modification, the file content is as follows:
# ~/.profile: executed by Bourne-compatible login shells.
if [ "$BASH" ]; then
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
fi
tty -s && mesg n || true
:wq
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
For GPU-accelerated ECSs, you need to configure X Server, x11vnc, and lightdm when installing a GUI.
lspci | grep -i nvidia

nvidia-xconfig --enable-all-gpus --separate-x-screens
vi /etc/X11/xorg.conf

The BusID queried in step 2 is a hexadecimal number. You need to convert it to a decimal number before adding it to "Section Device" in /etc/X11/xorg.conf.
:wq
apt-get -y install x11vnc
apt-get -y install lightdm

systemctl set-default graphical.target
vi /lib/systemd/system/myservice.service
[Unit] Description=My Service After=network.target lightdm.service [Service] Type=oneshot ExecStart=/usr/bin/x11vnc -forever -loop -noxdamage -repeat -rfbport 5902 -shared -bg -auth guess -o /var/log/vnc.log [Install] WantedBy=multi-user.target Alias=myservice.service
:wq
systemctl daemon-reload systemctl enable myservice.service
After installing a GUI on a GPU-accelerated ECS, perform the following operations to check whether the driver is working properly:
Allow inbound access through TCP port 5902. The port number is determined by the rfbport parameter in step 9.c.
The following uses TightVNC as an example.

nvidia-settings

If a GPU-accelerated ECS has a GRID driver installed, you need to configure a license to use the GPU rendering capability. For details, see Manually Installing a GRID Driver on a GPU-accelerated ECS.