

session=gnomeĪlternatively, you can configure global default parameters in the /etc/tigervnc/vncserver-config-defaults file. In this guide, the session and localhost parameters are assumed, but the rest are optional. The following are some example parameters. Log in as that user, create a ~/.vnc/config using root permissions ( sudo), and add parameters for the VNC server to that file. Doing so is optional and not necessary for this guide.Ĭreate a VNC configuration file for each user.
INSTALL VNC THROUGH SSH PASSWORD
You are asked whether you would like to set a view-only password as well. Set a VNC password for each user by logging in as that user, executing the following command, and creating a password. However, display port numbers are otherwise arbitrary and do not need to be consecutive. The resulting port numbers need to be available.
INSTALL VNC THROUGH SSH PLUS
VNC server ports are 5900 plus the display port number - thus, 5901 for the example above. Noteĭisplay port numbers determine the port numbers on which VNC servers are made available.

The remainder of this guide uses the above example user and display port. In the following example, one user - userA - is configured for display port number 1. Using your preferred text editor, add a line to the /etc/tigervnc/ers file for each user for whom a remote desktop is being configured. This guide uses the open-source TigerVNC software, a popular option and one that can be found in CentOS’s default repositories. Several VNC options are available for CentOS. To get a list of packages installed by each group, use the command sudo yum groupinfo followed by the group name in quotes as shown below: sudo yum groupinfo "Server with GUI"
INSTALL VNC THROUGH SSH INSTALL
sudo yum group install "GNOME"Īlternatively, you can install the “Server with GUI” group to get the GNOME packages along with additional server packages. GNOME is CentOS 8’s default desktop environment and the one used in this guide. If you already have a desktop environment installed on your CentOS machine, skip to the next section. These steps walk you through installing a desktop environment. If you are not familiar with the sudo command, see the Commands that require elevated privileges are prefixed with sudo. This guide is written for a non-root user.
