BinAC2/Software/TigerVNC: Difference between revisions
F Bartusch (talk | contribs) (Created page with "stub") |
F Bartusch (talk | contribs) mNo edit summary |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{| width=700px class="wikitable" |
|||
stub |
|||
|- |
|||
! Description !! Content |
|||
|- |
|||
| module load |
|||
| vis/tigervnc |
|||
|- |
|||
| License |
|||
| [https://github.com/TigerVNC/tigervnc?tab=GPL-2.0-1-ov-file GPL-2.0] |
|||
|- |
|||
| Links |
|||
| [https://tigervnc.org/ Homepage] |
|||
|- |
|||
| |
|||
| [https://github.com/TigerVNC/tigervnc GitHub] |
|||
|- |
|||
| Graphical Interface |
|||
| Yes |
|||
|} |
|||
= Description = |
|||
TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports. |
|||
In simple terms: TigerVNC lets you run graphical programs on compute nodes while seeing and controlling them from your own computer. |
|||
= Technical Background = |
|||
This is some technical background. You don't really need it in order to use TigerVNC, but maybe you are interested how it works. |
|||
== Why Use VNC on HPC? == |
|||
BinAC 2 doesn't have monitors or keyboards attached to the compute nodes. VNC allows you to: |
|||
* Run graphical programs (like data visualization tools, editors with GUIs, or analysis software) |
|||
* See the program windows on your local computer |
|||
* Interact with these programs using your mouse and keyboard |
|||
== X11 - The Graphics System == |
|||
TigerVNC will provide a virtual display for your programs via an X11 server. |
|||
Think of X11 as the "graphics engine" that makes windows, buttons, and visual interfaces work on Linux systems. Just like Windows has its own way of showing programs on screen, Linux uses X11 to display graphical applications. |
|||
When you run a program with a graphical interface on BinAC 2, X11 is what creates the windows and handles mouse clicks and keyboard input. |
|||
== VNC - Remote Desktop Access == |
|||
VNC (Virtual Network Computing) is like having a "remote control" for a computer's desktop. It lets you see and control a computer's screen from anywhere over the network. |
|||
Imagine you're at home but want to use a computer at work - VNC lets you see that computer's desktop in a window on your home computer and control it as if you were sitting right in front of it. |
|||
= Usage = |
|||
You will need a VNC viewer on your local workstation. |
|||
For programs that are installed as modules on BinAC 2 we might already have ready to use example jobscripts, so you don't need to start the VNC server yourself. Please check the <code>module help</code> of the module or ask us via hpcmaster@uni-tuebingen.de. |
|||
== VNC viewer == |
|||
You will need to install a VNC viewer on your computer in order to connect to the VNC server on BinAC. In principel every VNC viewer should work, but by installing the corresponding TigerVNC viewer one eliminates some problems from the start. |
|||
=== Windows === |
|||
There is an official TigerVNC client for Windows: |
|||
* [https://sourceforge.net/projects/tigervnc/files/stable/1.15.0/vncviewer64-1.15.0.exe/download Download on Sourceforge] |
|||
=== Linux === |
|||
Many Linux distributions have TigerVNC available in their repository. Usually this will install not the newest TigerVNC version. |
|||
<pre> |
|||
# Ubuntu |
|||
sudo apt-get install tigervnc-viewer |
|||
# RHEL/Rocky/Fedora |
|||
dnf install tigervnc |
|||
</pre> |
|||
You can also install the newest version provided by TigerVNC on [https://sourceforge.net/projects/tigervnc/files/stable/1.15.0/ Sourceforge]. |
|||
== Start VNC Server on BinAC 2 == |
|||
First, submit an interactive job. This command will start a 4-hour interactive job and tells the system it will need one display. |
|||
<pre> |
|||
srun --partition=interactive -t 4:00:00 --gres=display:1 --pty bash |
|||
</pre> |
|||
When the job has started, load the TigerVNC module |
|||
<pre> |
|||
module load vis/tigervnc/1.15.0 |
|||
</pre> |
|||
This will add some helper scripts into your <code>PATH</code> |
|||
You will need to set a password for the VNC server if you use TigerVNC for the first time. You don't need a view-only password. |
|||
Your password will be stored at <code>~/.config/tigervnc/passwd</code> |
|||
<pre> |
|||
vncpasswd |
|||
Creating VNC password using TigerVNC container... |
|||
Password: |
|||
Verify: |
|||
Would you like to enter a view-only password (y/n)? n |
|||
A view-only password is not used |
|||
</pre> |
|||
Now get an available display and start the VNC server, connection details are printed to the console. |
|||
<pre> |
|||
display_num=$(get_display) |
|||
start_vncserver ${display_num} |
|||
INFO: Instance stats will not be available - requires cgroups v2 with systemd as manager. |
|||
INFO: instance started successfully |
|||
New 'node1-001:1 (tu_iioba01)' desktop is node1-001:1 |
|||
Starting applications specified in /opt/bwhpc/common/vis/tigervnc/1.15.0/bin/xstartup |
|||
Log file is /home/tu/tu_tu/tu_iioba01/.vnc/node1-001:1.log |
|||
Paste this ssh command in a terminal on local host (i.e., laptop) |
|||
----------------------------------------------------------------- |
|||
ssh -N -L 5901:172.0.0.1:5901 tu_iioba01@login.binac2.uni-tuebingen.de |
|||
Then you can connect to the session with your local vncviewer: |
|||
----------------------------------------------------------------- |
|||
vncviewer localhost:5901 |
|||
</pre> |
|||
You succesfully started |
|||
== Connect to VNC Server == |
|||
You will need to create an SSH-tunnel from your local workstation to the compute node on which the VNC server is running. |
|||
Please check the already existing documentation in the [https://wiki.bwhpc.de/e/BinAC2/Software/Jupyterlab#Create_SSH_tunnel JupyterLab page ]. |
|||
Now you can use your local VNC viewer and access the VNC session. Please use the correct port you got when starting the VNC server. At some point you will need to enter the password you create earlier. |
|||
=== Windows === |
|||
TODO |
|||
=== Linux === |
|||
<pre> |
|||
vncviewer localhost:5901 |
|||
</pre> |
|||
You should be greeted with the virtual desktop. |
|||
[[File:Binac2-tigervnc-xfce.png | 800px | center | VNC viewer with Xfce window manager]] |
|||
You can now start your program. In this example we are starting a simple X terminal window. The terminal should then appear in your vncviewer. |
|||
<pre> |
|||
DISPLAY=:${display_num} xterm |
|||
</pre> |
|||
[[File:Binac2-tigervnc-xfce-xterm.png | 800px | center | Xterm opened in VNC viewer]] |
|||
== Stop VNC Server == |
|||
It's important to stop the VNC server when you're done. |
|||
<pre> |
|||
stop_vncserver ${display_num} |
|||
Killing Xvnc process ID 3515575 |
|||
INFO: Stopping tigervnc_1 instance of /opt/bwhpc/common/vis/tigervnc/1.15.0/tigervnc-1.15.0.sif (PID=3515518) |
|||
</pre> |
Latest revision as of 16:38, 20 August 2025
Description | Content |
---|---|
module load | vis/tigervnc |
License | GPL-2.0 |
Links | Homepage |
GitHub | |
Graphical Interface | Yes |
Description
TigerVNC is a high-performance, platform-neutral implementation of VNC (Virtual Network Computing), a client/server application that allows users to launch and interact with graphical applications on remote machines. TigerVNC provides the levels of performance necessary to run 3D and video applications, and it attempts to maintain a common look and feel and re-use components, where possible, across the various platforms that it supports.
In simple terms: TigerVNC lets you run graphical programs on compute nodes while seeing and controlling them from your own computer.
Technical Background
This is some technical background. You don't really need it in order to use TigerVNC, but maybe you are interested how it works.
Why Use VNC on HPC?
BinAC 2 doesn't have monitors or keyboards attached to the compute nodes. VNC allows you to:
- Run graphical programs (like data visualization tools, editors with GUIs, or analysis software)
- See the program windows on your local computer
- Interact with these programs using your mouse and keyboard
X11 - The Graphics System
TigerVNC will provide a virtual display for your programs via an X11 server.
Think of X11 as the "graphics engine" that makes windows, buttons, and visual interfaces work on Linux systems. Just like Windows has its own way of showing programs on screen, Linux uses X11 to display graphical applications. When you run a program with a graphical interface on BinAC 2, X11 is what creates the windows and handles mouse clicks and keyboard input.
VNC - Remote Desktop Access
VNC (Virtual Network Computing) is like having a "remote control" for a computer's desktop. It lets you see and control a computer's screen from anywhere over the network. Imagine you're at home but want to use a computer at work - VNC lets you see that computer's desktop in a window on your home computer and control it as if you were sitting right in front of it.
Usage
You will need a VNC viewer on your local workstation.
For programs that are installed as modules on BinAC 2 we might already have ready to use example jobscripts, so you don't need to start the VNC server yourself. Please check the module help
of the module or ask us via hpcmaster@uni-tuebingen.de.
VNC viewer
You will need to install a VNC viewer on your computer in order to connect to the VNC server on BinAC. In principel every VNC viewer should work, but by installing the corresponding TigerVNC viewer one eliminates some problems from the start.
Windows
There is an official TigerVNC client for Windows:
Linux
Many Linux distributions have TigerVNC available in their repository. Usually this will install not the newest TigerVNC version.
# Ubuntu sudo apt-get install tigervnc-viewer # RHEL/Rocky/Fedora dnf install tigervnc
You can also install the newest version provided by TigerVNC on Sourceforge.
Start VNC Server on BinAC 2
First, submit an interactive job. This command will start a 4-hour interactive job and tells the system it will need one display.
srun --partition=interactive -t 4:00:00 --gres=display:1 --pty bash
When the job has started, load the TigerVNC module
module load vis/tigervnc/1.15.0
This will add some helper scripts into your PATH
You will need to set a password for the VNC server if you use TigerVNC for the first time. You don't need a view-only password.
Your password will be stored at ~/.config/tigervnc/passwd
vncpasswd Creating VNC password using TigerVNC container... Password: Verify: Would you like to enter a view-only password (y/n)? n A view-only password is not used
Now get an available display and start the VNC server, connection details are printed to the console.
display_num=$(get_display) start_vncserver ${display_num} INFO: Instance stats will not be available - requires cgroups v2 with systemd as manager. INFO: instance started successfully New 'node1-001:1 (tu_iioba01)' desktop is node1-001:1 Starting applications specified in /opt/bwhpc/common/vis/tigervnc/1.15.0/bin/xstartup Log file is /home/tu/tu_tu/tu_iioba01/.vnc/node1-001:1.log Paste this ssh command in a terminal on local host (i.e., laptop) ----------------------------------------------------------------- ssh -N -L 5901:172.0.0.1:5901 tu_iioba01@login.binac2.uni-tuebingen.de Then you can connect to the session with your local vncviewer: ----------------------------------------------------------------- vncviewer localhost:5901
You succesfully started
Connect to VNC Server
You will need to create an SSH-tunnel from your local workstation to the compute node on which the VNC server is running. Please check the already existing documentation in the JupyterLab page .
Now you can use your local VNC viewer and access the VNC session. Please use the correct port you got when starting the VNC server. At some point you will need to enter the password you create earlier.
Windows
TODO
Linux
vncviewer localhost:5901
You should be greeted with the virtual desktop.
You can now start your program. In this example we are starting a simple X terminal window. The terminal should then appear in your vncviewer.
DISPLAY=:${display_num} xterm
Stop VNC Server
It's important to stop the VNC server when you're done.
stop_vncserver ${display_num} Killing Xvnc process ID 3515575 INFO: Stopping tigervnc_1 instance of /opt/bwhpc/common/vis/tigervnc/1.15.0/tigervnc-1.15.0.sif (PID=3515518)