Skip to main content
  • Place orders quickly and easily
  • View orders and track your shipping status
  • Create and access a list of your products

How to Install and Configure a VNC Server on RedHat Enterprise Linux (RHEL) 6

Summary: This article provides information on how to install and configure a VNC server on RedHat Enterprise Linux (RHEL) 6

This article applies to This article does not apply to This article is not tied to any specific product. Not all product versions are identified in this article.

Symptoms

Cause

1. Installation of the software

  • Ensure you are logged in as 'root'
  • If you have connectivity to RHN or a Satellite Server :
    • # yum install tigervnc-server
  • If you do not have connectivity to RHN or a Satellite Server :
  • Create a local 'yum' repository

 


 

2. Configure VNC password for the user(s)

  • Switch user to the user you want to use for VNC :
    • # su - vncuser1
Note: Replace 'vncuser1' with the correct username
  • Set the VNC password for the user :
    • $ vncpasswd
    • $ exit
  • Repeat for each VNC user as necessary

 


 

3. Configure resolution for the user(s)

  • Edit '/etc/sysconfig/vncservers' with your favorite editor
  • Append the following lines :
    • VNCSERVERS="1:vncuser1 2:vncuser2"
    • VNCSERVERARGS[1]="-geometry 1024x768"
    • VNCSERVERARGS[2]="-geometry 1024x768"
Note: Replace 'vncuser1' and 'vncuser2' with the correct usernames. You can add more users as needed. In addition, you can change the resolution value as needed.

 


 

4. Start the VNC server

  • Start the service :
    • # service vncserver start
  • Ensure service is started on reboots :
    • # chkconfig vncserver on

 


 

5. Configure the firewall

  • # iptables -I INPUT -m state --state NEW -p tcp --destination-port 5901 -j ACCEPT
  • # iptables -I INPUT -m state --state NEW -p tcp --destination-port 5902 -j ACCEPT
Note: Each user requires an additional firewall port opened starting at 5901. Because we added two users above, we need to open two ports.
  • # service iptables save

 

Back to Top


Resolution

-

Affected Products

Red Hat Enterprise Linux Version 6
Article Properties
Article Number: 000134710
Article Type: Solution
Last Modified: 16 Aug 2024
Version:  6
Find answers to your questions from other Dell users
Support Services
Check if your device is covered by Support Services.