.. _vnc_tool_card: VNC ^^^ Foldspace provides a remote desktop via the **Virtual Network Computing** (VNC) system. The underlying implementation is based on the `TurboVNC server `_ and on the `noVNC `_ client; the Desktop Environment used is `Xfce `_. .. image:: ../img/foldspace_vnc_screen_example.png :alt: Example of Foldspace Desktop interface :width: 700px :align: center | Start the tool ============== You can access it via the ``--tool vnc`` option: .. code:: bash foldspace --user --cluster --tool vnc [any slurm directive you like] Here it follows some examples of the possible combinations you might want to use: * Start the remote desktop on the Galileo100 serial partition (default), using a single task (default) for 30 minutes (default): .. code:: bash foldspace --user --cluster g100 --tool vnc * Start the remote desktop on the Leonardo Booster partition with a single GPU using 8 tasks for up to 120 minutes: .. code:: bash foldspace --user --cluster leonardo --tool vnc -p boost_usr_prod --gres gpu:1 -n 8 --time 02:00:00 * Start the remote desktop on the Pitagora Booster partition with a single GPU using 16 cpus for up to 3 hours: .. code:: bash foldspace --user --cluster pitagora --tool vnc --ntasks 16 --gres gpu:1 --partition boost_fua_prod --time 03:00:00 After the command is executed, a Slurm job is submitted and VNC starts on the allocated node. Foldspace will then display a URL and a password to access the service. Open the URL in your browser and enter the provided password when prompted. .. warning:: The VNC tool, provided by Foldspace, runs in a **container**. Consequently, some Linux system paths may differ from those encountered via SSH or through non-containerized tools such as Code Server. While this is generally transparent during standard operations, issues may arise when linking dependencies for code compiled outside the container. If your pre-compiled code fails to run within the remote desktop, we recommend recompiling it directly from the Xfce terminal, building a separate installation to be used in VNC. Please note that on Pitagora containers are not allowed on the serial partition, thus Pitagora users may want to always specify the ``--partition`` option. noVNC features ============== Most of the settings of your remote desktop can be managed via a menu that you can access on the very left side of your remote desktop. In particular you can find a `Clipboard editor` you can use to copy and paste text from/to the remote desktop. .. image:: ../img/novnc_clipboard_editor.png :alt: noVNC clipboard editor :width: 700px :align: center The content of the textarea in the clipboard editor is shared between the remote desktop and your browser: if you copy some text inside the remote desktop, it will appear in the textarea, so that you can copy and paste it in your local computer; viceversa, if you edit the content of the textarea, you can paste it inside the remote desktop. The left menu also contains other features you might find useful, such as a full-screen mode button and an option to send keystrokes to the remote desktop (e.g., for key combinations using Ctrl, Alt, or the Windows key). VirtualGL configuration ======================= If you are using the remote desktop for visualization, you might want to use VirtualGL to exploit the GPU capabilities for rendering. To allocate GPUs in your job, you need to append the cluster-specific Slurm options in your ``foldspace`` command; some examples are presented here below to ask a single GPU on CINECA clusters: +---------------------+------------------------------------------------------------------+ | Cluster | Foldspace options examples for GPUs | +=====================+==================================================================+ | Leonardo | ``--cluster leonardo --partition boost_usr_prod --gres gpu:1`` | +---------------------+------------------------------------------------------------------+ | Galileo100 | ``--cluster g100 --partition g100_usr_interactive --gres gpu:1`` | +---------------------+------------------------------------------------------------------+ | Pitagora | ``--cluster pitagora --partition boost_fua_prod --gres gpu:1`` | +---------------------+------------------------------------------------------------------+ By default, in the Xfce terminal, the display to be used via the ``vglrun`` command is set to `egl`, to exploit the `libEGL` capabilities when GPUs are available (and to fallback on CPUs when GPUs were not allocated): .. code:: bash export VGL_DISPLAY=egl # already set by default in the interactive bash shells of the vnc container The default (visualization) applications you find in the bottom right menu of Xfce (e.g. Paraview Client, Blender, Pymol etc.) are already configured to exploit the GPU capabilities when availiable, thus if the application you need is already present in the menu we encourage you to check if it fits for your use case. .. image:: ../img/xfce_start_menu.png :alt: Xfce start menu :width: 700px :align: center You can also use the menu available by right-clicking an empty area of the desktop.