================================= Using X2Go for data visualization ================================= Visualization servers ===================== We have many servers dedicated to extensive visualization (OpenGL/Mesa/CUDA) at PSMN (See :doc:`../clusters_usage/login_nodes` for a list.). They are accessible using **X2Go**. Finally, and most importantly, these servers have access to scratches (scratch system common to PSMN's partitions). .. note:: These machines were set up thanks to the preparatory work, recipes and integrations carried out on the :term:`CBP` experimental platform. Prerequisites ============= - Configure :term:`SSH` connection to PSMN (:doc:`See Connection chapter `) - Install **X2Go** (x2goclient) on user's workstation (Linux, Mac or Windows, see ``_) Configure x2goclient ==================== New session ----------- .. figure:: /_static/x2go-01-config.png :align: center New session #. Session -> New #. You can return to the parameters by clicking on the small arrowhead #. The session is saved in this white rectangle. Parameters: Tab Session ----------------------- .. figure:: /_static/x2go-02-config.png :align: center Session tab #. Name the session, #. Host = **r740visu**, #. Try auto login -> Checked, #. Use proxy server -> Checked, #. SSH -> Checked, #. Host = **allo-psmn.psmn.ens-lyon.fr**, #. Same login -> Checked, #. Same password -> Checked, #. ssh-agent -> Checked, #. Session type = **XFCE** .. warning:: The Session type **NEEDS** to be set to **XFCE** Parameters: Tab Connection -------------------------- .. figure:: /_static/x2go-03-config.png :align: center Connection tab #. choose a speed between ADSL and WAN. Parameters: Tab Input/Output ---------------------------- .. figure:: /_static/x2go-04-config.png :align: center Input/Output tab #. Customize the screen size, or leave it in Full/whole mode, your choice #. If necessary, force keyboard settings (Mac and Windows). Parameters : Tab Media ---------------------- .. figure:: /_static/x2go-05-config.png :align: center Media tab #. Sound support -> Unchecked, #. Printing support -> Unchecked. Connection from inside ENS network ================================== .. figure:: /_static/x2go-01-config.png :align: center X2Go client Just click on the session of your choice (**arrow n°3**) to start the connection process. Expected result: .. figure:: /_static/x2go-r730visu-07-xfce-desktop.png :align: center X2Go session Connection from outside ENS network =================================== Linux or Mac OSX ---------------- This paragraph concerns a connection to the visualization machine from outside the ENS, **from a Linux or Mac OSX client**. :term:`SSH` bounces must be active, make sure you have read (understood and tested) the :ref:`related documentation `. .. figure:: /_static/diagramme_ssh_externe.png :alt: PSMN external connections synoptic :width: 400px :align: center PSMN external connections synoptic - Minimal modification to be made in your ``~/.ssh/config`` (on user's workstation): .. code-block:: bash Host allo-psmn-multihop User mylogin ProxyCommand ssh -qt mylogin@ssh.psmn.ens-lyon.fr tcpconnect allo-psmn.psmn.ens-lyon.fr %p .. note:: Replace ``mylogin`` by your PSMN login. - X2Go settings .. figure:: /_static/x2go-02-config.png :align: center Session tab In the tab *Session*, block *Proxy server*, box *Host:* (**arrow n°6**), replace ``allo-psmn.psmn.ens-lyon.fr`` by the new configuration : ``allo-psmn-multihop``. Windows ------- Unfortunately, X2Go on Windows does not support multiple bounces (or ProxyJump). You need to configure a ssh tunnel, in a terminal: .. code-block:: bash ssh -N -L 2222:allo-psmn.psmn.ens-lyon.fr:22 mylogin@ssh.psmn.ens-lyon.fr Terminal won't display a message once the connection is established. **Don't close it.** .. note:: Replace ``mylogin`` by your PSMN login. - X2Go settings .. figure:: /_static/x2go-02-config.png :align: center Session tab **New configuration**: In the tab *Session*, block *Proxy server*, box *Host:* (**arrow n°6**), replace ``allo-psmn.psmn.ens-lyon.fr`` by ``localhost``, in box *Port:* replace ``22`` by ``2222``. Usage ===== Every application installed in the PSMN environment can be used as is. Numeric keyboard ---------------- If your numeric keypad is not recognized, in a terminal within the x2go session, run the ``numlockx`` program. modulefiles ----------- For every application requiring the loading of a modulefile (See :doc:`../environment_and_tools/modular_environment`), it is necessary to first load the modulefile from a terminal, within the x2go session, then run the application. Sometimes, x2go sessions don't load the ``~/.profile``. You can force it, by hand, with ``source ~/.profile``, or add this line to your ``~/.bashrc`` : .. code-block:: bash source /usr/share/lmod/lmod/init/bash Mac users --------- MacOS X users must have `XQuartz `_ installed and running prior to use x2go-client, see `x2goclient documentation `_. XFCE Compositing ---------------- On new Debian 11 profiles, you will need to **deactivate** the Compositor for accelerated applications (See :ref:`VirtualGL below `) to work properly (Settings > Window Manager Tweaks > Compositor: uncheck 'Activate Compositor'). .. figure:: /_static/x2go_XFCE_conf_compositeur.png :alt: XFCE Settings, Compositor tab (FRE) :align: center Compositor Tab (in french, english screenshot needed) Or, edit ``~/.config/xfce4/xfconf/xfce-perchannel-xml/xfwm4.xml``, search for ``use_compositing``, and change the value to ``false``: From ```` to ````. .. _vglrun: GPU Acceleration: VirtualGL =========================== For every application requiring graphical hardware acceleration (OpenGL/GLX/GLSL/...), after loading the corresponding modulefile (See :doc:`../environment_and_tools/modular_environment`), you must prefix the call to the application by the VirtualGL wrapper: ``vglrun application``. Examples -------- All following examples are run on r740visu, via a x2go session: - ParaView In a terminal run: .. code-block:: bash source ~/.profile module use /applis/PSMN/debian11/Generic/modules/all/ module load ParaView vglrun paraview .. figure:: /_static/x2go-r730visu-10-paraview-pressure.png :alt: ParaView "pressure-volume" :align: center Example with ParaView "pressure-volume" .. figure:: /_static/x2go-r730visu-11-paraview-surfaceLIC.png :alt: ParaView "velocity-surfaceLIC" :align: center Example with ParaView "velocity-surfaceLIC" - Avogadro In a terminal run: .. code-block:: bash source ~/.profile vglrun avogadro2 .. figure:: /_static/x2go-r730visu-12-avogadro.png :alt: avogadro :align: center Example with avogadro - VMD In a terminal run: .. code-block:: bash source ~/.profile # using LCH configuration module load VMD vglrun vmd .. figure:: /_static/x2go-r730visu-08b-VMD.png :alt: VMD :align: center Example with VMD - molden/gmolden In a terminal run: .. code-block:: bash source ~/.profile # using LCH configuration module load Molden vglrun gmolden .. figure:: /_static/x2go-r730visu-09-gmolden.png :alt: gmolden :align: center Example with Molden