Go to primary content
Oracle® Communications DSR Automated Test Suite (ATS) Installation and User's Guide
Release 8.4
F17134-01
Go To Table Of Contents
Contents

Previous
Previous
Next
Next

Install VNC Server

Table 3-4 Install VNC Server

Sl No. Procedure Description
1.

Install the Tiger VNC Server

Execute the following command to install VNC server:

yum install tigervnc-server 
2.

Create VNC password

Use the vncpasswd command to create a password for the VNC desktop. The password must be created by the user that runs the VNC server and not root

# su - cloud-user
$ vncpasswd
Password: password
Verify: password 

Note: cloud-user is the user to whom the VM is entitled.

3.

Copy the vncserver@.service template file

Execute the following command to copy the template file:

# cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-vncuser@\:display.service 

where display is the unique display number of the VNC desktop starting from 1

Example: # cp /lib/systemd/system/vncserver@.service /etc/systemd/system/vncserver-cloud-user@\:1.service

4.

Edit the vncuser in the following lines of the above copied file ExecStart=/sbin/runuser -l <USER> -c "/usr/bin/vncserver %i" PIDFile=/home/<USER>/.vnc/%H%i.pid

Note: Replace <USER> with the user name that will run the VNC desktop.

For example:

ExecStart=/sbin/runuser -l cloud-user -c "/usr/bin/vncserver %i" PIDFile=/home/cloud-user/.vnc/%H%i.pid

Note: In the above example, the <USER> is "cloud-user" of the Virtual Machine where the VNC server is being installed.

5.

Start the VNC desktops
  1. Make systemd reload its configuration files:
    # systemctl daemon-reload
  2. For each VNC desktop, start the service, and configure the service to start following a system reboot. Remember that if you specified a username in the name of the service unit configuration file, you must specify this. Equally, you should use the same display number that you specified for the service unit configuration file name. For example:
    # systemctl start vncserver-vncuser@\:1.service
    # systemctl enable vncserver-vncuser@\:1.service 
    				   
    				
6.

Configure the VNC desktops

# yum update grub2-common 
# rpm -q grub2-common
# yum install fwupdate-efi 
# yum groupinstall "server with gui" --skip-broken

Note: This might take around 10-15 minutes for downloading and installing of VNC desktop to get completed.

7.

Enable the IPtables acceptance for Port on which VNC runs i.e 5900 series
  1. Open the file:--

    #vi /etc/sysconfig/iptables
  2. Add following line of code in the above file →

    -A INPUT -p tcp -m state --state NEW -m tcp --dport 5901 -j ACCEPT
    this piece of code to enable iptable acceptance for Port 5900 series should be added right below
    -A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
  3. Restart the iptables by executing below command-

    #systemctl restart iptables
8.

Verify VNC Configurations Run command →
#vncserver -list

If the above command gives an output , then configuration was successful. Incase, no server is listed in the output , then manually start the vnc by running the below command :-

#vncserver 

If the above command, prompts user to setup the password, then kindly setup the password.

9.

Installing VNC viewer on windows Open the VNC session

Start the TigerVNC client and connect to a desktop.

To connect directly to a VNC desktop, you can start the TigerVNC client and enter host:display to specify the host name or IP address of the VNC server and the display number of the VNC desktop to connect to. Alternatively, you can specify the VNC desktop as an argument for the vncviewer command.

For example:

$ vncviewer 10.10.10.0.com:1