How to start GUI in cloud environment running CentOS using VNC

How to start GUI in cloud environment running CentOS using VNC

Description

It is usually easier to use Linux when there is graphical interface. For example, use a browser to download Charon products or other packages. However, in cloud deployment there is no console and therefore no graphical interface. To use graphical interface, it is necessary to install all related packages and also install remote desktop software like VNC as the media. VNC comes in the server part (install on the cloud instance) and the client part (local PC with graphic). Please note that different Linux version will be different. This following steps are tested under CentOS 7.x and Google Cloud Platform.

Step-by-step guide

VNC server

  1. Login to the instance on cloud as normal user
  2. If root user is not enabled previously, enable root user by command sudo passwd to change password for root, in which root user will be created
  3. If root user is enabled previously, su to root
  4. yum -y groupinstall "Workstation" to install all the packages for graphical interface

  5. yum install tigervnc-server to install the VNC server
  6. To start VNC server for graphical interface by vncserver :1 -geometory 1280x1024, in which “:1” is the display number. Then follow the instruction to start
  7. VNC server will use port 5900+display number. The above will use 5901
  8. In the cloud instance management, allow the port 5901 for connection

VNC viewer

  1. On PC that is with graphical interface, runs the VNC viewer to connect to the IP address of the cloud instance and with the display number
  2. Example vncviewer <host IP>:1
  3. Give the password if password is defined


Related articles




© Stromasys, 1999-2025  - All the information is provided on the best effort basis, and might be changed anytime without notice. Information provided does not mean Stromasys commitment to any features described. 
Need fast, reliable migration? We have done it countless times. Talk to an expert