A SERVICE OF

logo

62
Note:
You can check that the VNC server is running using a command like ps ax | grep vnc.
D.2. Enabling a Graphical Console on Red Hat, CentOS, or Oracle
Linux VMs
Note:
Before setting up your Red Hat VMs for VNC, be sure that you have installed the Linux guest
agent. See Section 5.5, “Installing the Linux Guest Agent” for details.
To configure VNC on Red Hat VMs, you need to modify the GDM configuration. The GDM configuration is held
in a file whose location varies depending on the version of Red Hat Linux you are using. Before modifying it,
first determine the location of this configuration file; this file will then be modified in a number of subsequent
procedures in this section.
Note:
For information on enabling VNC for RHEL, CentOS, or OEL 6.x VMs, see Section D.2.5,
“Enabling VNC for RHEL, CentOS, or OEL 6.x VMs”.
D.2.1. Determining the Location of your VNC Configuration File
If you are using Red Hat Linux version 4 the GDM configuration file is /etc/X11/gdm/gdm.conf. This is
a unified configuration file that contains default values as specified by the provider of your version of GDM in
addition to your own customized configuration. This type of file is used by default in older versions of GDM, as
included in these versions of Red Hat Linux.
If you are using Red Hat Linux version 5 the GDM configuration file is /etc/gdm/custom.conf. This is a split
configuration file that contains only user-specified values that override the default configuration. This type of file
is used by default in newer versions of GDM, as included in these versions of Red Hat Linux.
D.2.2. Configuring GDM to use VNC
1. As root on the text CLI in the VM, run the command rpm -q vnc-server gdm. The package names vnc-
server and gdm should appear, with their version numbers specified.
If these package names are displayed, the appropriate packages are already installed. If you see a message
saying that one of the packages is not installed, then you may not have selected the graphical desktop options
during installation. You will need to install these packages before you can continue. See the appropriate Red
Hat Linux x86 Installation Guide for details regarding installing additional software on your VM.
2. Open the GDM configuration file with your preferred text editor and add the following lines to the file:
[server-VNC]
name=VNC Server
command=/usr/bin/Xvnc -SecurityTypes None -geometry 1024x768 -depth 16 \
-BlacklistTimeout 0
flexible=true
With configuration files on Red Hat Linux 3 and 4, this should be added above the [server-
Standard] section.
With configuration files on Red Hat Linux 5, this should be added into the empty [servers] section.
3. Modify the configuration so that the Xvnc server is used instead of the standard X server:
If you are using Red Hat Linux 3 or 4, there will be a line just above that reads:
0=Standard