Virtual Network Console (VNC) is a remote control tool software developed by AT&T European Research Laboratory. An open-source software based on UNIX and Linux operating systems, VNC features robust remote control capability, high efficiency, and strong practicability. Its performance is comparable to any remote control software in Windows or Mac. This document will guide you through on how to build a visual Ubuntu desktop by using VNC.
You have purchased a Linux instance with the Ubuntu OS; if not, please see Customizing Linux CVM Configurations.
The VNC service uses the TCP protocol and port 5901 by default. Therefore, you need to open port 5901 in the security group bound to the instance by adding a rule for opening protocol port
TCP:5901 in Inbound Rules. For more information, please see Adding Security Group Rules.
Run the following command to switch to the "root" account.
Run the following command to clear the cache.
apt-get clean all
Run the following command to obtain and update to the latest version.
Run the following command to install the software packages required by the desktop environment, including desktop applications such as system panel, window manager, file browser, and terminal.
apt install gnome-panel gnome-settings-daemon metacity nautilus gnome-terminal ubuntu-desktop
If the result similar to the following is returned, it indicates that VNC has been launched successfully.
3. Run the following command to access the VNC configuration file.
Press i to enter edit mode, and modify the configuration file as follows.
export XKL_XMODMAP_DISABLE=1 export XDG_CURRENT_DESKTOP="GNOME-Flashback:GNOME" export XDG_MENU_PREFIX="gnome-flashback-" gnome-session --session=gnome-flashback-metacity --disable-acceleration-check &
Press Esc and enter :wq. Save and close the file.
Run the following commands to restart the desktop process.
vncserver -kill :1 # Enter the command to terminate the original desktop process (wherein :1 is the number of the desktop)
vncserver -geometry 1920x1080 :1 # Generate a new session