NMRFAM_x11vnc_Linux

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

If you are logged on 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
  • 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. fleckvieh:1).

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 Linux computer. NOTE: you must also be “physically” logged into the spectrometer computer.

  • Open a terminal window on your Linux computer
  • 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. fleckvieh)

ssh fleckvieh

  • 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. fleckvieh:1).

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.

NOTE: If you are not “physically” logged on 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 Linux computer

On your Linux computer we are going to use vncviewer to connect to the VNC server running on the spectrometer computer.

Open a terminal window on your Linux computer

In the terminal window:

  • Start the vncviewer program with the ‘-via’ option to tunnel through login1 (or login2):

vncviewer -via <username>@login1.nmrfam.wisc.edu fleckvieh:1

  • Replace <username> with your NMRFAM username
  • Enter the NMRFAM spectrometer computer and VNC server number started in step 1 above (e.g. fleckvieh:1)
  • You will be prompted (in the terminal) to enter your NMRFAM password
  • The next password requested (in a pop-up window) is the VNC password
  • A new window will appear with the desktop from the spectrometer computer. You can now start topspin or vnmrj (or any other application installed there).