Updated on 2023-03-15 GMT+08:00

Configuring the VNC Service

  1. Run the following command to check whether VNC Server has been installed on the host:

    rpm -qa | grep tigervnc-server

    Command output:

    tigervnc-server-1.1.0-5.e16.x86_64
    • If no command output is displayed or the command output shows that VNC Server is not installed, go to 2.
    • If the command output shows that VNC Server has been installed, go to 3.
  2. (Optional) Install tigervnc-server.
    1. Run the lsblk command (the OS ISO file must have been mounted to the BMC virtual CD-ROM drive. If not, mount the ISO file in the same way as you mount it during OS installation).

      If you cannot log in to or perform operations on BMC, contact Huawei technical support.

    2. Locate the block device whose name is sr0 and type is rom, and check whether any directories are mounted to the mount point. If no, run the following command:

      mount /dev/sr0 /mnt

    3. Enter the /etc/yum.repos.d directory where the configuration is stored and back up all .repo files. Use vim to create a .repo file, for example tiger.repo. The file content is as follows:
      [rhel-local]
      baseurl=file:///mnt
      enabled=1
      gpgcheck=0

      Save the file and run the following commands:

      yum repolist

      yum install tigervnc-server

  3. Run the following command to start the VNC service:

    vncserver

    Configure the VNC login password of user root as prompted.

    The command output contains Log file is /root/.vnc/rhel:1.log. 1 indicates that the first VNC virtual desktop is allocated to you.

  4. Run the following command to check whether the Xvnc process exists:

    ps -ef | grep Xvnc

    The process ID is 36069, port number is 5901, and virtual desktop number is 1.

  5. Run the following command to check the VNC virtual desktop of the current user:

    vncserver -list

    The current user has three virtual desktops, 1, 5, and 2.

  6. Connect VNC Viewer on the local Windows with VNC Server on the host to remotely log in to the host.

    Choose Options > Expert > ColorLevel to set ColorLevel to rgb222 if the version of VNC Viewer is 5.3.2 when you install it for the first time.

  7. Run the following command to add a virtual desktop for the current user:

    vncserver :6

    Run the vncserver -list command to check whether the virtual desktop is added successfully. As shown in the following figure, the virtual desktop 6 is added successfully.