Difference between revisions of "X"

From Storrs HPC Wiki
Jump to: navigation, search
(Rewrite page for to use x2go instead of unsupported NX)
Line 1: Line 1:
{{delete| We now use X2go instead of X11 GUI }}
+
We have setup our HORNET cluster to run graphical applications using [http://x2go.org/ x2go].
= Running X11 GUI Apps =
+
x2go is a fast remote desktop manager that allows you to reconnect and continue working with graphical applications even if your work is interrupted by network issues.
 +
You can close your session and continue exactly where you left off whenever you want (just like you would be able to with a command-line equivalent like [http://directory.fsf.org/wiki/Tmux tmux]).
  
It is possible to run X11 GUI apps on the Hornet cluster.  In general, this is not recommended and submitting batch jobs is strongly preferable. However, sometimes X11 is necessary and there are various ways to do this.
+
We generally, recommend against running any sort of graphical applications on the HORNET login nodes since graphical applications consume much more resources and is impolite to other users.
 +
However there are a few cases where using x2go is necessary.
 +
The main reason is to run proprietary [[:Category:Software|software applications]] that have no command-line interface and only provide a graphical interface.  Inside x2go these applications must be run using [[SLURM_Guide#Interactive|fisbatch]].
  
== Connecting Using NX ==
+
== Installation ==
The head node is running a NX server, so it is possible to connect with a NX client.  The NX client allows you to disconnect and reconnect without crashing your apps.  Note that this is beta software.
 
  
You can install an NX client (see installation instructions below) and then connect to hornet-login1.engr.uconn.edu.  In your session definition be sure to specify a GNOME SESSION.   
+
=== GNU / Linux ===
 +
We recommend installing the Qt x2goclient.
 +
To do this on Debian or Ubuntu:
 +
  sudo apt-get install x2goclient
  
=== NX client for Linux ===
+
== Configuration ==
The recommended NX client for Linux is qtnx.  From Debian or Ubuntu this can be installed with the command "sudo apt-get install qtnx"
 
From Fedora, "yum install qtnx"
 
  
=== Connecting Using NX from OSX ===
+
Configure the connection settings as follows:
The recommended NX client for OSX is OpenNX: http://opennx.net/download.html
+
# Run x2goclient
 +
# Under the Session tab:
 +
## Host: hornet-login1.engr.uconn.edu
 +
## Login: <Your NetID>
 +
## Sesion type: GNOME
 +
## (If you have ssh authorized_keys setup) Check the box for "Try auto login (ssh-agent of default ssh key)"
 +
## Click OK
 +
# A new box will appear on the top-right hand side of x2go showing your connection settings.
  
=== Connecting Using NX from Windows ===
+
== Usage ==
The recommended NX client for Windows is OpenNX: http://opennx.net/download.html Please download version [http://sourceforge.net/projects/opennx/files/opennx/CI-win32/OpenNX-0.16.0.725-Setup.exe/download 0.16.0.725]
 
The configuration of the OpenNX shown as below. Make sure that you setup the red part same as that in the screenshot.
 
  
[[File: OpenNXConfig.png‎]]
+
=== Starting a session ===
 +
# Run x2goclient and click the gray "New session" box at the top-right and login with your HORNET credentials.
 +
# If this is your first time logging in, click "Yes" in the a message "Host key verification failed: The server is unknown. Do you trust the host key?"
 +
# The status message will change from "connecting" to "running" and after a few seconds you will see a new window with your desktop appear.
 +
# To run your software, at the top-left side of the screen, click on "Applications" > "System Tools" > "Terminal".
 +
# Inside the terminal, start [[SLURM_Guide#Interactive|fisbatch]] to reserve your compute nodes, and then you can run your interactive job.
  
== Start an X-enabled interactive SLURM job ==
+
=== Pausing and resuming a session===
First of all, we '''DO NOT RECOMMEND'''  to run the interactive job. The responding speed will be low.
+
# By default, if you close either your running desktop window or the x2goclient window, the session will pause.
 +
# Now when you log in the next time you can pick up where you left off.
  
If you want to run some jobs with the interactive GUIs, it is better to submit it to the SLURM scheduler with X-enabled interactive shell:
+
=== Terminate session ===
# Make sure you are on cn65
+
# To terminate your session and start from scratch later, in the main x2go window you will see a power button at the bottom-right side of the gray session box.
cn01$ ssh '''-X''' cn65
+
# Click on the button acknowledge the warning about unsaved documents being lost.
# list the partitions to see which one is free
 
cn65$ sinfo
 
PARTITION  AVAIL  TIMELIMIT  NODES  STATE NODELIST
 
IvyBridge*    up  infinite    12  alloc cn[105-116]
 
IvyBridge*    up  infinite    17  idle cn[117-133]
 
SandyBridge    up  infinite      6  alloc cn[72-73,81-84]
 
SandyBridge    up  infinite    28  idle cn[66-71,74-75,85-104]
 
debug      inact  infinite      2  idle cn[103-104]
 
Westmere      up  infinite    10  resv cn[52-61]
 
Westmere      up  infinite      5  idle cn[36,42,50-51,62]
 
# You can use "-p" to select a partition
 
# You can use "-c" to assign more cores or less cores for your job.
 
$ fisbatch -pSandyBridge -c4
 
FISBATCH -- the maximum time for the interactive screen is limited to 6 hours. You can add QoS to overwrite it.
 
FISBATCH -- waiting for JOBID 11522 to start on cluster=cluster and partition=SandyBridge
 
FISBATCH -- Connecting to head node (cn74)
 
cn74$
 
 
 
Then, you can do your work under cn74 as an example. When you finish your work, please do not forget to ''release the session'' so that the other users can use the resources. To do so:
 
cn74$ exit
 
 
 
[screen is terminating]
 
Connection to cn74 closed.
 
FISBATCH -- exiting job
 
If you think 6 hours is not enough, you can add QoS in the command:
 
$ fisbatch -pSandyBridge -c4 --qos=stnadard #Or --qos=longrun
 
 
 
=Connection Rejected Because of Wrong Authentication Error and Solution=
 
==Make sure that ~/.Xauthority is owned by you==
 
Run following command to find ownweship:
 
ls -l ~/.Xauthority
 
Run chown and chmod to fix permission problems
 
chown <username>:<username> ~/.Xauthority
 
chmod 0600 ~/.Xauthority
 
Replace <username>:<username> with your actual username.
 
 
 
==Make sure X11 client forwarding enabled (Linux/iOS)==
 
Make sure your local /etc/ssh/ssh_config has following lines:
 
Host *
 
ForwardAgent yes
 
ForwardX11 yes
 
 
 
Finally, login to remote server and run X11 as follows from your Mac OS X or Linux desktop system:
 
ssh '''-X''' <username>@hornet-login1.engr.uconn.edu
 
 
 
 
 
==Make sure X11 client forwarding enabled (Windows)==
 
Users of Windows can use a 3rd-party X server application such as [http://http://sourceforge.net/projects/xming/ Xming].
 
 
 
Scroll to Connection > SSH > X11. Check the box next to Enable X11 Forwarding.
 
 
 
 
 
==Still cannot get X11 working==
 
try to remove the .Xauthority file in the Hornet and login again:
 
rm ~/.Xauthority
 
exit
 
ssh -X <username>@hornet-login1.engr.uconn.edu
 
  
 
[[Category:Core]]
 
[[Category:Core]]

Revision as of 17:55, 31 December 2015

We have setup our HORNET cluster to run graphical applications using x2go. x2go is a fast remote desktop manager that allows you to reconnect and continue working with graphical applications even if your work is interrupted by network issues. You can close your session and continue exactly where you left off whenever you want (just like you would be able to with a command-line equivalent like tmux).

We generally, recommend against running any sort of graphical applications on the HORNET login nodes since graphical applications consume much more resources and is impolite to other users. However there are a few cases where using x2go is necessary. The main reason is to run proprietary software applications that have no command-line interface and only provide a graphical interface. Inside x2go these applications must be run using fisbatch.

Installation

GNU / Linux

We recommend installing the Qt x2goclient. To do this on Debian or Ubuntu:

sudo apt-get install x2goclient

Configuration

Configure the connection settings as follows:

  1. Run x2goclient
  2. Under the Session tab:
    1. Host: hornet-login1.engr.uconn.edu
    2. Login: <Your NetID>
    3. Sesion type: GNOME
    4. (If you have ssh authorized_keys setup) Check the box for "Try auto login (ssh-agent of default ssh key)"
    5. Click OK
  3. A new box will appear on the top-right hand side of x2go showing your connection settings.

Usage

Starting a session

  1. Run x2goclient and click the gray "New session" box at the top-right and login with your HORNET credentials.
  2. If this is your first time logging in, click "Yes" in the a message "Host key verification failed: The server is unknown. Do you trust the host key?"
  3. The status message will change from "connecting" to "running" and after a few seconds you will see a new window with your desktop appear.
  4. To run your software, at the top-left side of the screen, click on "Applications" > "System Tools" > "Terminal".
  5. Inside the terminal, start fisbatch to reserve your compute nodes, and then you can run your interactive job.

Pausing and resuming a session

  1. By default, if you close either your running desktop window or the x2goclient window, the session will pause.
  2. Now when you log in the next time you can pick up where you left off.

Terminate session

  1. To terminate your session and start from scratch later, in the main x2go window you will see a power button at the bottom-right side of the gray session box.
  2. Click on the button acknowledge the warning about unsaved documents being lost.