How to install and configure VNC Server on a Bright Cluster Manager head node


Bright Cluster Manager does not include the VNC Server package by default but you can easily add it. This article shows how to do it in a few quick and easy steps.

Let's get started.


Step 1: Use yum to download and install the required packages.

# yum install vnc-server

Step 2: Configure your VNC configuration file.

# cat /etc/sysconfig/vncservers

VNCSERVERARGS[1]="-geometry 1024x768"

Step 3: Start VNC server.

# vncserver

You will require a password to access your desktops.

Password: ********
Verify: ********
xauth:  creating new authority file /root/.Xauthority

New 'bcm6-sl6-head1:1 (root)' desktop is bcm6-sl6-head1:1

Creating default startup script /root/.vnc/xstartup
Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/bcm6-sl6-head1:1.log

Step 4: Kill the server

# vncserver -kill :1
Killing Xvnc process ID 13308

Step 5: Get the port the service is listening on from the VNC log file.

# grep port /root/.vnc/bcm6-sl6-head1:1.log
 vncext:      Listening for VNC connections on all interface(s), port 5901

Allow connections from the outside to the head node on that port (in this case 5901) as shown below.

# vi /etc/shorewall/rules

# -- Serve Web
ACCEPT   net            fw              tcp     80
ACCEPT   net            fw              tcp     443
ACCEPT   net            fw              tcp     5901 # this line added

Step 6: Restart shorewall to apply the changes.

# service shorewall restart
Shorewall configuration compiled to /var/lib/shorewall/.restart
Restarting Shorewall....

Step 7: Start VNC server.

# vncserver

New 'bcm6-sl6-head1:1 (root)' desktop is bcm6-sl6-head1:1

Starting applications specified in /root/.vnc/xstartup
Log file is /root/.vnc/bcm6-sl6-head1:1.log

Step 8: Connect using your VNC viewer.

Step 9: Enter your password.

Now you're connected.

High Performance Computing eBook