The VNC server allows you to remote into the user’s system and view her desktop. With the end user’s desktop in view, you can more easily troubleshoot any issues she is having. Setting up a VNC serer isn’t hard at all.
1. Setting VNC Server
Step 1. Install the vnc-server package:
# yum install -y vnc-server (RHEL6 is tigervnc-server)
Step 2. View the default line items:
The first line defines the user who is allowed to log in to the system. The second line lists arguments passed to the VNC server when the service starts.
-geometry Defines the site of the viewer when the client connects
-nolisten tcp Denies TCP connections to the VNC server
-nohttpd Denies web VNC clients from connecting
-localhost Forces the use of a secure gateway (port forwarding)
The number that appears (2 in this case) is the number of the session for defined user. The VNC server runs on port 5900, but the actual port that will used is 5900 + the number defined = 5902 in this case.
Step 3. Change your config file to the following:
Step 4. Set the password:
# vncpasswd
Step 5. Start the VNC server:
Note: If you’re using RHEL5, you need to do some adjustment. ~/.vnc/xstartup file to uncomment the first two lines:
Then stop and restart VNC server
2. Setting up VNC clients
Step 1. Install the VNC package that contains the client software:
# yum install -y vnc (RHEL5)
OR
# yum install -y tigervnc (RHEL6)
Step 2. Connect to the VNC server:
The system now prompts you for the password that you set up for the user.
Have fun!