IMG 1010 - Configuring Remote Desktop
VNC (Virtual Network Computing) Access
VNC is currently part of the Red Hat 3.0, 4.0, and 5.0 ES Operating System.
VNC allows the user and our technical support personnel to work together as the connection is shared.
VNC uses 'known' ports so fire-walls can be configured to only allow VNC connections from our IP address, providing for security but still allowing for remote help. Â Please open these ports for access.
Overview of VNC on GCEMS server
To acquire access to the GCEMS server, there are two applications that need to be installed and enabled. The first is the VNC server. This server is installed with the Linux Red Hat installation and once installed needs to be enabled or started when VNC access is warranted. The second application is the VNC viewer. The VNC viewer is a client of the VNC server and allows support personnel to log into the server. The VNC viewer is normally installed on a Windows®-based machine. The viewer allows access to ClientView from a Windows® remote client. For more information on VNC, see http://www.realvnc.com
Linux (VNC server)
Â
If the GCEMS server has been purchased from us, you can allow remote access to your GateControl EMS Server by performing the following procedure. If you have installed Linux on your own server, then install VNC and perform this procedure.
The VNC server is loaded on the GCEMS server but is not started unless the next few steps are accomplished.
To start VNC server, enter the following command below. If this is the first time you are starting VNC you will be asked for a password. Enter excelsw for password. Below is the command to start VNC server.Â
$ vncserver :1
On the GCEMS server go to /home/excelsw/.vnc. This is a hidden file. Enter ls -la command to see file.
Within .vnc folder is a file named xstartup. Edit the file xstartup using vi editing or gedit. Un-comment the following lines.Â
#unset SESSION_MANAGERÂ #exec
/etc/X11/xinit/xinitrc
To verify the server is running enter one of the following commands below.Â
$ /sbin/service vncserver status
or
$ ps -ef|grep vnc
Once VNC server is started you can log into VNC server through a VNC viewer. Follow steps below to load the VNC viewer on a PC running Windows®-based Operating system.Â
Loading/Running VNC on PC running Windows® Operating System
The VNC Client is installed on a separate PC. Below is how to install on a PC running Windows® operating system.
Download a copy of the VNC client viewer to your PC from the site: http://www.realvnc.com/download.html
Run VNC Viewer by double clicking on the VNC icon.
In the window that appears, enter the IP Address of GCEMS server followed by :1
Select OK and if the VNC Viewer connects then a password will be prompted. Enter the password excelsw.
At this point the VNC Viewer will connect to the server and a view of the GCEMS desktop will appear. You can now work in the Linux Environment as an excelsw user. Â
Troubleshooting
Use this troubleshooting section to try and diagnose any problems that could arise
Scenario 1
PROBLEM:
When Connecting to VNC server through VNC Viewer the following screen appears:
Â
SOLUTION:
This is an indication that the VNC Server was initially started as a root or super user and you are trying to connect using the excelsw password. To fix the problem execute the following steps:
Login to the GCEMS server as excelsw user.
Become a Super User by entering the su command and entering the root password excel2
Verify the vncserver is running as root by entering the ps -ef|grep vnc command. This will show the vncserver running as root in the response.
If the vncserver is running as root you will need to kill the process. Enter the command vncserver -kill :1 to kill the vncserver process as root user.
Logout of Super User mode by entering the exit command.
As excelsw user start the vncserver process by entering the vncserver :1 command.
Verify the vncserver is now running as excelsw user by entering the ps -ef|grep vnc command.
Retry logging into vncserver through the VNC ViewerÂ
Scenario 2
PROBLEM:
Cannot logon to VNC server through VNC Viewer. Get unable to connect to host error message.
SOLUTION 1:
Is vncserver :1 running? Logon to the GCEMS. As excelsw user enter the following command and verify the vncserver server is running.
$ps -ef|grep vnc
If vncserver is not running, enter following command to start vncserver.
$vncserver :1Â
SOLUTION 2:
Is vncserver running as :1 or something other than :1. Logon to the GCEMS server and as an excelsw user, enter the following command to verify that vncserver :1 is running.
$ps -ef|grep vnc
If vncserver is running on something other than :1 then kill the other process and start :1 process
$vncserver -kill :2
$vncserver :1Â
Scenario 3
PROBLEM:
On a reboot of GCEMS server the vncserver process does not restart automatically.
SOLUTION:
For security reasons VNCserver does not restart on a reboot of the GCEMS server. However if your network is secure you can follow the next few steps and configure vncserver to restart after a reboot of GCEMS server.
Open a terminal on GCEMS and go to /etc/sysconfig
Using a text editor, edit the vncservers file as described below:
Uncomment the line VNCSERVERS="1:myusername"
Change the line in previous step to VNCSERVERS="1:excelsw"
Save and close
Enter the following command to edit the runlevel
$/sbin/chkconfig vncserver on
Verify that runlevels 3 4 and 5 are all on by entering the following command
$/sbin/chkconfig vncserver --list vncserver 0:off 1:off 2:on 3:on 4:on 5:on 6:offÂ
Restart GCEMS and verify the vncserver :1 starts on reboot.
Miscellaneous Information
Shared Connection
With RealVNC, two people can connect to the same GCEMS and both can have monitor/configure access. This gives the support personnel the ability to configure a system while the customer watches on their PC. To be able to accomplish this both users must enable this option on the VNC Viewer application. To allow another person to connect and view the same Xwindow, you must enable the Shared Connection option. See Below.
Open VNC Viewer application
Select the Options button
Select the Misc tab.
Enable the Shared Connection (do not disconnect other viewers) option.
Save the new configuration so when the VNC Viewer is opened it will always open with the Shared connection enabled
Configuring Display
Starting the VNC Server without the geometry setting will default the window size to 1024x768. Use the goemetry command (-geometry) to set the size of the VNC window. The setting will need to be the same size or smaller than the resolution of the Windows®-based PC on which are running the client. Below are some example settings.
Â
######################################
# Geometry settings
# Windows®: 1024x768  Linux: 1000x710
# Windows®: 1280x1024 Linux: 1260x960
######################################
Â
Example: vncserver –geometry 1260x960 :1
Â
Configuring VNC to automatically restart if the server reboots
The VNC Service will not restart if the GCEMS server reboots. If you would like to have the VNC service restart after the GCEMS server reboots, the following line in /etc/sysconfig/vncservers file must be modified. Edit the following:
Example: VNCSERVERS="1:excelsw"
Â
DO NOT RUN THIS SERVICE if your local area network is untrusted!
Configuring VNC to automatically restart if the server reboots
• Procedure for RHEL
The VNC Service will not restart if the GCEMS server reboots. If you would like to have the VNC service restart after the GCEMS server reboots, the following line in /etc/sysconfig/vncservers file must be modified. Edit the following:
Example: VNCSERVERS="1:excelsw"
• Procedure for CentOS
Reload the systemctl daemon as root:
Example: systemctl daemon-reload
Start the VNC service as root:
Example: systemctl start vncserver@:1.service
Enable it on system startup as root:
Â
DO NOT RUN THIS SERVICE if your local area network is untrusted!
Helpful Commands
The following commands can be accomplished as an excelsw user
Command | Description |
$ vncserver :1 | Start vncserver as :1 |
$ vncserver -kill :1 | Kill the vncserver instance :1 |
$ ps -ef grep vnc | Search for all processes running with "vnc" in them |
$ /sbin/service vncserver status | Check to see whether vncserver is running |
$ /sbin/chkconfig vncserver --list | Display the runlevel of vncserver |
Â
The following commands can be accomplished as a root user
Command | Description |
# /sbin/service vncserver restart | Restarts vnc service through terminal |
# /sbin/service vncserver stop | Stops vnc service through terminal |
# /sbin/service vncserver start | Starts vnc service through terminal |
# /sbin/service vncserver restart | Stops and then restarts vncserver |
# /sbin/service vncserver status | Check to see whether vncserver is running |
# /sbin/chkconfig vncserver on | Set runlevel on vncserver |
# /sbin/chkconfig vncserver --list | Display the runlevel of vncserver |
Â
vncserver is located at /etc/init.d/vncserver
Â