Skip to content
Snippets Groups Projects
Commit fe46e5fa authored by Jan Siwiec's avatar Jan Siwiec
Browse files

Update x-window-system.md

parent 42255314
No related branches found
No related tags found
4 merge requests!368Update prace.md to document the change from qprace to qprod as the default...,!367Update prace.md to document the change from qprace to qprod as the default...,!366Update prace.md to document the change from qprace to qprod as the default...,!323extended-acls-storage-section
...@@ -9,7 +9,7 @@ The X Window system is a principal way to get GUI access to the clusters. The ** ...@@ -9,7 +9,7 @@ The X Window system is a principal way to get GUI access to the clusters. The **
### Linux Example ### Linux Example
In order to display graphical user interface GUI of various software tools, you need to enable the X display forwarding. On Linux and Mac, log in using the -X option in ssh client: In order to display the GUI of various software tools, you need to enable the X display forwarding. On Linux and Mac, log in using the -X option in the SSH client:
```console ```console
local $ ssh -X username@cluster-name.it4i.cz local $ ssh -X username@cluster-name.it4i.cz
...@@ -17,7 +17,7 @@ In order to display graphical user interface GUI of various software tools, you ...@@ -17,7 +17,7 @@ In order to display graphical user interface GUI of various software tools, you
### PuTTY on Windows ### PuTTY on Windows
On Windows use the PuTTY client to enable X11 forwarding. In PuTTY menu, go to Connection-SSH-X11, mark the Enable X11 forwarding checkbox before logging in. On Windows, use the PuTTY client to enable X11 forwarding. In PuTTY menu, go to Connection-SSH-X11, mark the Enable X11 forwarding checkbox before logging in.
![](../../../img/cygwinX11forwarding.png) ![](../../../img/cygwinX11forwarding.png)
...@@ -25,14 +25,14 @@ Then log in as usual. ...@@ -25,14 +25,14 @@ Then log in as usual.
### WSL (Bash on Windows) ### WSL (Bash on Windows)
In order to display graphical user interface GUI of various software tools, you need to enable the X display forwarding. Log in using the -X option in ssh client: In order to display the GUI of various software tools, you need to enable the X display forwarding. Log in using the -X option in the SSH client:
```console ```console
local $ ssh -X username@cluster-name.it4i.cz local $ ssh -X username@cluster-name.it4i.cz
``` ```
!!! tip !!! tip
If you are getting error message "cannot open display", then try to export DISPLAY variable, before attempting to log in: If you are getting the "cannot open display" error message, try to export the DISPLAY variable, before attempting to log in:
```console ```console
local $ export DISPLAY=localhost:0.0 local $ export DISPLAY=localhost:0.0
...@@ -40,13 +40,13 @@ In order to display graphical user interface GUI of various software tools, you ...@@ -40,13 +40,13 @@ In order to display graphical user interface GUI of various software tools, you
## Verify the Forwarding ## Verify the Forwarding
To verify the forwarding, type To verify the forwarding, type:
```console ```console
$ echo $DISPLAY $ echo $DISPLAY
``` ```
if you receive something like if you receive something like:
```console ```console
localhost:10.0 localhost:10.0
...@@ -56,7 +56,7 @@ then the X11 forwarding is enabled. ...@@ -56,7 +56,7 @@ then the X11 forwarding is enabled.
## X Server ## X Server
In order to display graphical user interface GUI of various software tools, you need running X server on your desktop computer. For Linux users, no action is required as the X server is the default GUI environment on most Linux distributions. Mac and Windows users need to install and run the X server on their workstations. In order to display the GUI of various software tools, you need a running X server on your desktop computer. For Linux users, no action is required as the X server is the default GUI environment on most Linux distributions. Mac and Windows users need to install and run the X server on their workstations.
### X Server on OS X ### X Server on OS X
...@@ -64,11 +64,11 @@ Mac OS users need to install [XQuartz server][d]. ...@@ -64,11 +64,11 @@ Mac OS users need to install [XQuartz server][d].
### X Server on Windows ### X Server on Windows
There are variety of X servers available for Windows environment. The commercial Xwin32 is very stable and rich featured. The Cygwin environment provides fully featured open-source XWin X server. For simplicity, we recommend open-source X server by the [Xming project][e]. For stability and full features we recommend the [XWin][f] X server by Cygwin There is a variety of X servers available for the Windows environment. The commercial Xwin32 is very stable and feature-rich. The Cygwin environment provides fully featured open-source XWin X server. For simplicity, we recommend the open-source X server by the [Xming project][e]. For stability and full features, we recommend the [XWin][f] X server by Cygwin
| How to use Xwin | How to use Xming | | How to use Xwin | How to use Xming |
|--- | --- | |--- | --- |
| [Install Cygwin][g]. Find and execute XWin.exe to start the X server on Windows desktop computer.[If no able to forward X11 using PuTTY to CygwinX][1] | Use Xlaunch to configure the Xming. Run Xming to start the X server on Windows desktop computer. | | [Install Cygwin][g]. Find and execute XWin.exe to start the X server on Windows desktop computer. [If unable to forward X11 using PuTTY to CygwinX][1] | Use Xlaunch to configure Xming. Run Xming to start the X server on a Windows desktop computer. |
Read more [here][h]. Read more [here][h].
...@@ -77,7 +77,7 @@ Read more [here][h]. ...@@ -77,7 +77,7 @@ Read more [here][h].
!!! note !!! note
Make sure that X forwarding is activated and the X server is running. Make sure that X forwarding is activated and the X server is running.
Then launch the application as usual. Use the & to run the application in background. Then launch the application as usual. Use the & to run the application in background:
```console ```console
$ ml intel (idb and gvim not installed yet) $ ml intel (idb and gvim not installed yet)
...@@ -88,11 +88,11 @@ $ gvim & ...@@ -88,11 +88,11 @@ $ gvim &
$ xterm $ xterm
``` ```
In this example, we activate the intel programing environment tools, then start the graphical gvim editor. In this example, we activate the Intel programing environment tools and then start the graphical gvim editor.
## GUI Applications on Compute Nodes ## GUI Applications on Compute Nodes
Allocate the compute nodes using -X option on the qsub command Allocate the compute nodes using -X option on the qsub command:
```console ```console
$ qsub -q qexp -l select=2:ncpus=24 -X -I $ qsub -q qexp -l select=2:ncpus=24 -X -I
...@@ -100,28 +100,28 @@ $ qsub -q qexp -l select=2:ncpus=24 -X -I ...@@ -100,28 +100,28 @@ $ qsub -q qexp -l select=2:ncpus=24 -X -I
In this example, we allocate 2 nodes via qexp queue, interactively. We request X11 forwarding with the -X option. It will be possible to run the GUI enabled applications directly on the first compute node. In this example, we allocate 2 nodes via qexp queue, interactively. We request X11 forwarding with the -X option. It will be possible to run the GUI enabled applications directly on the first compute node.
**Better performance** is obtained by logging on the allocated compute node via ssh, using the -X option. For **better performance**, log on the allocated compute node via SSH, using the -X option.
```console ```console
$ ssh -X r24u35n680 $ ssh -X r24u35n680
``` ```
In this example, we log in on the r24u35n680 compute node, with the X11 forwarding enabled. In this example, we log on the r24u35n680 compute node, with the X11 forwarding enabled.
## Gnome GUI Environment ## Gnome GUI Environment
The Gnome 2.28 GUI environment is available on the clusters. We recommend to use separate X server window for displaying the Gnome environment. The Gnome 2.28 GUI environment is available on the clusters. We recommend using a separate X server window for displaying the Gnome environment.
### Gnome on Linux and OS X ### Gnome on Linux and OS X
To run the remote Gnome session in a window on Linux/OS X computer, you need to install Xephyr. Ubuntu package is To run the remote Gnome session in a window on a Linux/OS X computer, you need to install Xephyr. Ubuntu package is
xserver-xephyr, on OS X it is part of [XQuartz][i]. First, launch Xephyr on local machine: xserver-xephyr, on OS X it is part of [XQuartz][i]. First, launch Xephyr on local machine:
```console ```console
local $ Xephyr -ac -screen 1024x768 -br -reset -terminate :1 & local $ Xephyr -ac -screen 1024x768 -br -reset -terminate :1 &
``` ```
This will open a new X window with size 1024 x 768 at DISPLAY :1. Next, ssh to the cluster with DISPLAY environment variable set and launch gnome-session This will open a new X window of size 1024x768 at DISPLAY :1. Next, connect via SSH to the cluster with the DISPLAY environment variable set and launch a gnome-session:
```console ```console
local $ DISPLAY=:1.0 ssh -XC yourname@cluster-name.it4i.cz -i ~/.ssh/path_to_your_key local $ DISPLAY=:1.0 ssh -XC yourname@cluster-name.it4i.cz -i ~/.ssh/path_to_your_key
...@@ -129,28 +129,28 @@ local $ DISPLAY=:1.0 ssh -XC yourname@cluster-name.it4i.cz -i ~/.ssh/path_to_you ...@@ -129,28 +129,28 @@ local $ DISPLAY=:1.0 ssh -XC yourname@cluster-name.it4i.cz -i ~/.ssh/path_to_you
yourname@login1.cluster-namen.it4i.cz $ gnome-session & yourname@login1.cluster-namen.it4i.cz $ gnome-session &
``` ```
On older systems where Xephyr is not available, you may also try Xnest instead of Xephyr. Another option is to launch a new X server in a separate console, via: On older systems where Xephyr is not available, you may also try Xnest instead of Xephyr. Another option is to launch a new X server in a separate console via:
```console ```console
xinit /usr/bin/ssh -XT -i .ssh/path_to_your_key yourname@cluster-namen.it4i.cz gnome-session -- :1 vt12 xinit /usr/bin/ssh -XT -i .ssh/path_to_your_key yourname@cluster-namen.it4i.cz gnome-session -- :1 vt12
``` ```
However this method does not seem to work with recent Linux distributions and you will need to manually source However, this method does not seem to work with recent Linux distributions and you will need to manually source
/etc/profile to properly set environment variables for PBS. /etc/profile to properly set environment variables for PBS.
### Gnome on Windows ### Gnome on Windows
Use XLaunch to start the Xming server or run the XWin.exe. Select the "One window" mode. Use XLaunch to start the Xming server or run the XWin.exe. Select the "One window" mode.
Log in to the cluster, using [PuTTY][2] or [Bash on Windows][3]. On the cluster, run the gnome-session command. Log in to the cluster using [PuTTY][2] or [Bash on Windows][3]. On the cluster, run the gnome-session command.
```console ```console
$ gnome-session & $ gnome-session &
``` ```
In this way, we run remote gnome session on the cluster, displaying it in the local X server This way, we run a remote gnome session on the cluster, displaying it in the local X server.
Use System-Log Out to close the gnome-session Use System-Log Out to close the gnome-session.
[1]: #if-no-able-to-forward-x11-using-putty-to-cygwinx [1]: #if-no-able-to-forward-x11-using-putty-to-cygwinx
[2]: #putty-on-windows [2]: #putty-on-windows
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment