Set up a VNC server on TeamForge Lab Management

To allow remote access to an X Windows display on Linux from a remote computer, set up a VNC console.

VNC is a convenient and effective way to access an X Windows display from a remote computer. Some applications require X, and since users don't have access to consoles on TeamForge Lab Management nodes, VNC might be the only way those applications can be accessed.
  1. Set a VNC password using the vncpasswd command.
    [grue@cu012 grue]$ vncpasswd
    Tip: This doesn't need to be the same as your TeamForge Lab Management password, but keep in mind that this password will give the bearer access to an X session as your username, so keep it something reasonably hard to guess.
  2. Edit the file /etc/sysconfig/vncservers. Add an entry for your session number, defaulting to 1, followed by your username. Use this as an example file:
  3. Start the VNC service.
    [grue@cu012 grue]$ sudo /etc/init.d/vncserver start
    Starting VNC server: 1:grue        [  OK  ]
    Note: To stop the VNC server on your machine, run the command like this: [grue@cu012 grue]$ sudo /etc/init.d/vncserver stop
  4. If you want VNC to start up each time this server is rebooted, use the chkconfig command to turn it on.
    [grue@cu012 grue]$ sudo /sbin/chkconfig vncserver on
    Note: To prevent the VNC server from starting up on your machine when it is rebooted, run the command this way: [grue@cu012 grue]$ sudo /sbin/chkconfig vncserver off