NMRFAM_x11vnc_Windows

Use x11vnc to connect directly to the spectrometer computer desktop from your Windows computer

If you are logged directly onto the spectrometer computer, you can use x11vnc to connect to the spectrometer computer desktop.

IMPORTANT: only the person that is “physically” logged into the spectrometer computer can use x11vnc to start a VNC server to connect to the spectrometer desktop.

  1. Start a VNC server on the spectrometer computer

This can either be done directly on the spectrometer computer or remotely from your computer.

Start the VNC server directly on the spectrometer computer before leaving the lab.

  • Open a terminal window
  • In the terminal, start the VNC server with the command:

x11vnc -display :0 -usepw -shared -forever -noxdamage

Take note of the VNC server (or desktop) number that was started (e.g. kerry:2).

Note that with this command the VNC server is protected by a password.

  • The VNC password is different from the login password.
  • To reset the VNC password, login to the spectrometer computer as shown above and type vncpasswd (it doesn’t ask you to input the old password to change it, so it’s not a problem if you forget it).
  • If you do not wish to use a password for the VNC server, replace the -usepw option with -nopw.

IMPORTANT: do NOT close the terminal window as this will kill the VNC server you just started.

  • Skip to step 2 below

Start the VNC server on the spectrometer computer remotely from your Windows computer. NOTE: you must also be “physically” logged into the spectrometer computer.

On Windows computers we are going to use MobaXterm to open a terminal (and later to connect to the VNC server).

If you don’t have it already, download and install MobaXterm on your Windows computer (https://mobaxterm.mobatek.net/download.html).

  • Start MobaXterm and open a terminal window on your computer
  • In the terminal window, ssh to the gateway computer:

ssh <username>@login1.nmrfam.wisc.edu

  • Replace <username> with your NMRFAM username
  • Enter your NMRFAM password
  • ssh to the spectrometer computer (e.g. kerry)

ssh kerry

  • Enter your NNMRFAM password
  • start VNC server with command:

x11vnc -display :0 -usepw -shared -forever -noxdamage

Take note of the VNC server (or desktop) number that was started (e.g. kerry:2).

  • The VNC password is different from the login password.
  • To reset the VNC password, login to the spectrometer computer as shown above and type vncpasswd (it doesn’t ask you to input the old password to change it, so it’s not a problem if you forget it).
  • If you do not wish to use a password for the VNC server, replace the -usepw option with -nopw.

NOTE: If you are not “physically” logged into the spectrometer computer you will get an error message when using x11vnc.

IMPORTANT: do NOT close the terminal window as this will kill the VNC server you just started.

  • Go to step 2 below
  1. Access the VNC server from your Windows computer

On Windows computers we are going to use MobaXterm to connect to the VNC server.

If you don’t have it already, download and install MobaXterm on your Windows computer (https://mobaxterm.mobatek.net/download.html).

On your Windows computer start MobaXterm

  • Go to “Session
  • Select “VNC” and fill in all the options:
    • In “Basic Vnc Settings
      • set “Remote hostname or IP address” to the spectrometer computer (e.g. kerry)
      • set the correct port number for the VNC server running on the spectrometer computer (e.g. use 5902 for kerry:2)
    • In “Advanced Vnc settings” > “Network setting
      • click on “Connect through SSH gateway (jump host)
      • set the “Gateway SSH server” to login1.nmrfam.wisc.edu (or login2.nmrfam.wisc.edu)
      • leave the default value for “Port
      • Under “User” enter your NMRFAM username (e.g. paulo)
    • Click on “OK
    • You will be prompted to enter your NMRFAM password
    • The next password requested is the VNC password
    • A new window will open with the desktop from the spectrometer computer. NOTE: expanding this window to full screen is sometimes required to ensure that the position of the mouse pointer matches the screen coordinates clicked.
  • This session will be saved on the left bar, under “Session“. The next time you want to connect, you can double click on the session you want to start and only change the “Port” for the VNC server in “Basic Vnc settings” if different from the saved one.