Difference between revisions of "GUI Programs"

From UFRC
Jump to navigation Jump to search
 
(133 intermediate revisions by 8 users not shown)
Line 1: Line 1:
[[Category:Software]]
+
[[Category:Software]][[Category:GUI]]
{{HPG2}}
+
'''The module gui/2 is no longer available. Use this page to know how to use GUI applications on Hipergator.
=Full Xpra Documentation =
+
'''
*Xpra Homepage: https://xpra.org/
+
__NOTOC__
*Xpra Basic Usage: https://xpra.org/trac/wiki/Usage
 
*Xpra Advanced Usage: http://xpra.org/manual.html
 
  
=Step 1: Client Installation=
+
Here you will find the information necessary to configure and run graphical user interface (GUI) applications on HiPerGator. The process is not complicated, but running a GUI on a remote server and displaying the windows on your local client computer with a sufficiently responsive interface is not as easy as simply running the application locally. We'd like to acknowledge an Open Source [https://xpra.org Xpra Project] for creating software we built our GUI sessions on top of.
Xpra client installation depends on the operating system running on your local machine and may require assistance of a system administrator if you do not have the authority to install new software. Once Xpra is installed on your client computer feel free to skip this step. Click on the link specific to the operating system running on your local computer.
 
  
* [[Xpra Windows Installation|Windows]]
+
==X11 Forwarding==
* [[Xpra MacOS X Installation|MacOS X]]
+
For the simplest case of running a lightweight GUI application for a very short time you can log into HiPerGator with
* [[Xpra Linux Installation|Linux]]
+
ssh -Y MYUSER@hpg.rc.ufl.edu
 +
load the environment module your application is in and run it. Do not analyze data this way, but running a text editor, a web browser to log in and get an api token from a remote service or some other very short and lightweight operations are fine.
  
=Step 2: Start a GUI session on HiPerGator=
+
==Open OnDemand==
The simplest way to start a GUI application session on HiPerGator is to use the pre-made launcher script available for approved commonly used applications.
+
Normally the X11 DISPLAY variable is set once the X11 server is started.  This can be done manually, as described above, but an easier method is to use [https://help.rc.ufl.edu/doc/Open_OnDemand#Display_Environment_on_the_Console Open OnDemand] since that will start an X11 server and allocate the frame buffer automatically.
  
=Launch a pre-approved application=
+
[https://openondemand.org/ Open OnDemand] provides a web-only interface to starting and attaching to GUI programs with seamless connections through web browsers. This service is available at the following URL:
To launch a pre-approved application for which we prepared a launcher script only two steps are needed:
 
Load the application environment module
 
module load application
 
Launch the application
 
launch_xpra_application
 
See an example on the [[RStudio|RSTudio Help Page]].
 
  
=Launch any application=
+
https://ondemand.rc.ufl.edu
Use a sample job script as the base of your gui session job. Sample job scripts can be found in the '$HPC_GUI_JOB' directory once the 'gui' environment module is loaded.
 
  
Within the job script use the xpra_start wrapper to launch the application within the shell section of the job script.
+
{{Note|Many applications have their own interfaces, but other can also be launched by launching a HiPerGator Desktop and then opening the application with the desktop interface.|info}}
module load application
 
xpra_start application
 
  
=List Xpra Sessions=
+
===[https://mediasite.video.ufl.edu/Mediasite/Play/4654bfa838624de894085bf54678848f1d Using Open on Demand on HiPerGator]===
Once you submit a job wait for it to start. Check the job status with 'squeue -u $USER'. When the job starts list the available xpra sessions using xpra_list_sessions command in the gui module. This command will refresh the Xpra session list and provide a convenient list of live Xpra sessions as well as client commands that can be copied and pasted into a terminal on the client machine.
+
[[File:Play_icon.png|frameless|30px|link=https://mediasite.video.ufl.edu/Mediasite/Play/4654bfa838624de894085bf54678848f1d]] [5 min, 11 sec]
 
+
This video covers the use of Open on Demand https://openondemand.org/ on HiPerGator via https://ood.rc.ufl.edu/.
;Example
+
* Connect to https://ood.rc.ufl.edu/
 
+
* Launch a terminal
$ module add gui
+
* Launch many graphical applications like Rstudio, Matlab and Freeview
$ xpra_list_sessions
+
* Manage job submission
 
+
* Upload, download and edit files via your browser
Output:
 
<pre>
 
Refreshing the session list for jdoe to remove stale sessions
 
 
 
List of active Xpra sessions for jdoe:
 
 
 
Session: i111a-s222.rc.ufl.edu:3713
 
    Job ID: 123456, Name: RStudio
 
    Client command:
 
        xpra attach ssh:jdoe@i111a-s222.rc.ufl.edu:3713
 
        or (downloaded script):
 
        ./xpra attach ssh:jdoe@i111a-s222.rc.ufl.edu:3713
 
 
 
</pre>
 
 
 
See the respective application pages for details and sample job scripts.
 
 
 
=Step 3: Connect to Xpra Session from the client computer=
 
==Connecting from outside of UF campus via VPN==
 
The nodes in SLURM gui partition are accessible only within the UF campus network. If you are working off campus, you will need to use the VPN to connect to the UF campus network using [https://connect.ufl.edu/it/wiki/Pages/glvpn-anyconnect-install.aspx AnyConnect VPN] or similar software. Please see: [https://vpn.ufl.edu https://vpn.ufl.edu] for additional information.
 
 
 
==Linux==
 
Xpra is typically automatically added to your path during installation, so you can connect to your running xpra instance using the following syntax where $USERNAME is your UF GatorLink user-name, $SERVERNAME is the server where your application is running inside xpra, and $PORT is the X11 port you assigned when you started your application.
 
 
 
xpra attach ssh:$USERNAME@$SERVERNAME:$PORT
 
 
 
As an example:
 
<pre>
 
testuser@jr-physics:~$ xpra attach ssh:testuser@i21a-s3.rc.ufl.edu:143 --desktop-scaling=on --dpi=96
 
</pre>
 
 
 
The xpra_list_sessions command presents a ready-to-use connection command, but you'll have to add the desktop scaling or dpi arguments manually.
 
 
 
;Please note that if you close the application window using the close button in the top right (or left) corner, this will exit your application and terminate your SLURM gui session. If you want to simply detach the session and come back later, please follow the ''detaching xpra session'' instructions below
 
 
 
==MAC OS==
 
Navigate to the folder that contains the Xpra executable:
 
<pre>
 
cd /Applications/Xpra.app/Contents/MacOS
 
</pre>
 
 
 
Alternatively, call the xpra shell script you downloaded during [[Xpra_MacOS_X_Installation|client software installation]].
 
 
 
Use the client command provided by 'xpra_list_sessions' to connect while adding any local options you need to improve the viewing experience like
 
;Desktop scaling
 
:--desktop-scaling=on
 
;Resolution, dpi (dots per inch)
 
:--dpi=96
 
 
 
Example:
 
./Xpra attach ssh:test-user@i21a-s3.rc.ufl.edu:143 --desktop-scaling=on --dpi=96
 
or with the wrapper script in place
 
xpra attach ssh:test-user@i21a-s3.rc.ufl.edu:143 --desktop-scaling=on --dpi=96
 
 
 
Once the GUI application windows is displayed on your local computer if you close the window using the close button both the application and SLURM gui session will close. If you want to simply detach the session and come back later click on the terminal window where you ran the client command and use the 'Ctrl+c' key combination to detach the session.
 
 
 
==Microsoft Windows==
 
Navigate to the install location of xpra (normally C:\Program Files (x86)\Xpra\). 
 
;In MobaXterm:
 
cd "/drives/c/Program\ Files\ \(x86\)/Xpra/"
 
 
 
Alternatively, call the xpra shell script you downloaded during [[Xpra_Windows_Installation|client software installation]].
 
 
 
;Example:
 
./xpra attach ssh:test-user@i21a-s3.rc.ufl.edu:143 --desktop-scaling=on --dpi=96
 
or with the wrapper script in place
 
xpra attach ssh:test-user@i21a-s3.rc.ufl.edu:143 --desktop-scaling=on --dpi=96
 
 
 
Once the GUI application windows is displayed on your local computer if you close the window using the close button both the application and SLURM gui session will close. If you want to simply detach the session and come back later click on the terminal window where you ran the client command and use the 'Ctrl+c' key combination to detach the session.
 

Latest revision as of 14:42, 30 January 2023

The module gui/2 is no longer available. Use this page to know how to use GUI applications on Hipergator.


Here you will find the information necessary to configure and run graphical user interface (GUI) applications on HiPerGator. The process is not complicated, but running a GUI on a remote server and displaying the windows on your local client computer with a sufficiently responsive interface is not as easy as simply running the application locally. We'd like to acknowledge an Open Source Xpra Project for creating software we built our GUI sessions on top of.

X11 Forwarding

For the simplest case of running a lightweight GUI application for a very short time you can log into HiPerGator with

ssh -Y MYUSER@hpg.rc.ufl.edu

load the environment module your application is in and run it. Do not analyze data this way, but running a text editor, a web browser to log in and get an api token from a remote service or some other very short and lightweight operations are fine.

Open OnDemand

Normally the X11 DISPLAY variable is set once the X11 server is started. This can be done manually, as described above, but an easier method is to use Open OnDemand since that will start an X11 server and allocate the frame buffer automatically.

Open OnDemand provides a web-only interface to starting and attaching to GUI programs with seamless connections through web browsers. This service is available at the following URL:

https://ondemand.rc.ufl.edu

Many applications have their own interfaces, but other can also be launched by launching a HiPerGator Desktop and then opening the application with the desktop interface.

Using Open on Demand on HiPerGator

Play icon.png [5 min, 11 sec] This video covers the use of Open on Demand https://openondemand.org/ on HiPerGator via https://ood.rc.ufl.edu/.

  • Connect to https://ood.rc.ufl.edu/
  • Launch a terminal
  • Launch many graphical applications like Rstudio, Matlab and Freeview
  • Manage job submission
  • Upload, download and edit files via your browser