Access to Linux and macOS systems from outside
VNC: remote control from everywhere
If you want to remotely control an X environment on a Linux or macOS system, Virtual Network Computing (VNC) is recommended.
VNC includes a server on a computer in HZB, and a viewer on your PC.
The software is already installed on the Linux servers and PCs with HZB-openSuSE Linux.
Own VNC server
A dedicated VNC server provides an environment for all X applications on computers in the HZB intranet. In the following example, the server is started on dinux6, which could also be another Linux computer in the intranet.
The VNC server runs permanently and is only stopped if you stop it or if the operation of your computer is interrupted.
Starting the VNC server
We recommend first tests on the intranet. If you come from the internet, you need an existing ssh connection to display.helmholtz-berlin.de.
- Shell on dinux9
from Linux you can do this with the command
under Windows you connect to dinux9 via PuTTY
- Starting the VNC server on dinux9
The script reports the identification of your server, e.g. dinux9:13. The server then has virtual X display number 13.
At the first call startvnc asks for a password, if it was not set otherwise with vncpasswd.
Who knows the password can take over the session, so please use a secure password.
If you want to stop the server later, stop it on dinux9 with the command
vncserver -kill :displayNumber (here 13)
You can change the window manager and other settings if you edit the ~/.vnc/xstartup file before starting the server. For further setting options see
The VNC client is the program vncviewer. It is available under Windows, Linux and macOS (http://www.tightvnc.com/). On HZB computers with Windows you can install it from the Software Center.
In the intranet you start the viewer on a Linux PC with
The viewer asks for the VNC password.
If you terminate the viewer process, the server and the applications started on it will remain! The next time you log in, you will find the windows of the session again.
Before you start the viewer at home, you have to create a tunnel via display.helmholtz-berlin.de
A tunnel to port 5913 on dinux9 reaches the VNC server dinux9:13.
So e.g. tunnel the local port 5913 to the remote dinux9:5913, and tell the VNC viewer at startup to connect to localhost:5913.
X applications on additional internal computers
For example, how do you start a shell with X environment on the HPC cluster dirac?
In an xterm in the viewer window
ssh -X dirac-meister
X-Window graphics with Linux or macOS
If you are a Linux or macOS user at home and want to use graphical X applications (e.g. Mathematica or Matlab) on a computer in the HZB intranet, you have little trouble. Both systems use the X Window System directly. For macOS you have to install the X server once from the appstore (package XQuartz).
Your own X-Server on your computer is connected to the application (the X-Client) via a tunnel through the access computer display.helmholtz-berlin.de.
To do this, log on to the access computer from your PC in a terminal window with ssh:
ssh -X email@example.com
xyz is your HZB identification with the external password.
With the command ssh you can now go to the HPC cluster computer dirac-meister. The DISPLAY variable in your shell is automatically set correctly, please do not change it. The X in -X is capitalized and tells ssh to forward X automatically.
ssh -X dirac-meister
Now start an X-application, e.g. xterm and you will see the output on your PC:
To copy files from the home directory in HZB to the Linux PC at home, the first ssh connection is modified:
ssh -X -L 2222:dinux4:22 firstname.lastname@example.org
You can choose the port number 2222 in the range 1024-65535.
After that you can call in a local shell on your home PC
scp -P 2222 localhost:a.txt
to fetch the file a.txt from the home directory. scp will ask you the first time if you want to accept localhost:2222