- X11 Forwarding Mac Mojave
- Mac Os Ssh X11 Forwarding
- X11 Server For Mac
- X11 Forwarding For Mac Os
- Ssh Forward X11
X11 Forwarding on the Mac If you are running OSX 10.4 or earlier, be sure your X11 package is running. Later versions will start X11 automatically when you give the ssh command below. You can make a forwarding connection to the SCS servers by opening a terminal window of any type (Mac Terminal, xterm, iTerm) and giving the command. Using Docker for Mac 1.12 (stable) and OS X 10.11.5 (15F34), I'm attempting to make one of my containers forward to X11. First, I install XQuartz from my bash shell: $ brew cask install xquartz. X11 Forwarding in Linux/Mac OS X – For Macs, your best option is to download xQuartz from xQuartz.org. This is free software which will allow you to forward X11 on a Mac. Download the xQuartz DMG, open it, and follow the installation instructions. X11 forwarding needs to be enabled on both the client side and the server side. On the client side, the -X (capital X) option to ssh enables X11 forwarding, and you can make this the default (for all connections or for a specific conection) with ForwardX11 yes in /.ssh/config. On the server side, X11Forwarding yes must specified in /etc/ssh/sshdconfig. I tried to SSH into one of the servers that IS working, and then SSH into the problem server from that using Mac's Terminal: ssh -X11 -2 [email protected] # runs some Linux (don't remember which distro) ssh -X11 -2 [email protected] # runs Ubuntu 11.04.
What is X11 Forwarding?
X11 Forwarding is what gives you the ability to run GUIs from a server on your own local machine (neat, huh?). For example, you can run Emacs from homework.eecs.tufts.edu from the comfort of your dorm.
How do I use X11?
Simple! All operating systems have a quick process to setup X11 Forwarding. Please see below for specific instructions based on operating system.
X11 Forwarding in Linux/Mac OS X
X11 Forwarding Mac Mojave
– For Macs, your best option is to download xQuartz from xQuartz.org. This is free software which will allow you to forward X11 on a Mac.
- Download the xQuartz DMG, open it, and follow the installation instructions.
- Run xQuartz from the Applications folder.
– For Linux, depending on your distribution, there may be no pre-requisites.
Connecting With X11 through SSH
- Connect to your favorite EECS server using ssh, but remember to tell it to forward X by adding the “-X” parameter.
- Example: ssh –X [username]@homework.eecs.tufts.edu
- To test to make sure X11 is working properly, run “xeyes” and a simple GUI should appear on the screen.
- That’s it! Any other application (Emacs, Matlab, etc) that you’d like to run the GUI for, simply start the program and a window will appear.
X11 Forwarding in Windows with MobaXterm
- We recommend using MobaXterm for all your Windows X11 Forwarding needs.
- Simply download the installer, or run the portable edition, onto your computer.
- Follow all setup defaults for the installation.
- Run MobaXterm and use the Start local terminal button to begin a session.
- SSH to an EECS server as you normally would, but be sure to specify the -Y option. For Example:
- ssh -Y [username]@[servername].eecs.tufts.edu
- You’re now good to run GUI-based applications over ssh!
X11 Forwarding in Windows with PUTTY/Xming
- Xming is a lightweight and reliable X11 forwarding utility that can be used in conjuncture with Putty.
- Launch Xming: A small program will appear in the taskbar; keep this running for the duration of the session.
- Launch PuTTy, an SSH (Secure SHell) client: Start->Programs->PuTTy->PuTTy.
- In the left-hand menu, expand “SSH”, open the “X11” menu, and check “Enable X11 Forwarding.” Do not forget this step!
- Go back to the “Session” menu, and under “Host Name” type [email protected], then press Open.
- If a security alert pops up, press yes, then type your password into the open shell.
- You’re in Linux! Everything, such as “emacs myfile &”, will work just like a Linux lab machine.
If you want to ssh to another server during your session but want to keep X11 forwarding enabled, you must use the command “ssh -Y servername”.
X11 Forwarding in Windows with Cygwin/X
There are some cases in which Putty simply does not have enough functionality, and a more robust SSH/X11 client is necessary. In these cases, Windows users are best off using Cygwin. While Cygwin is extremely powerful and versatile, it can be a little overwhelming or confusing to setup and use your first time. The steps below will walk you through installing and running X11 Forwarding with Cygwin.
- Go to www.cygwin.com and download the latest version.
- Run the setup.exe that you downloaded.
- Select “Install From Internet” as your download source.
- Leave the ‘Root Directory’ as default.
- Choose where you want your package files installed.
- Leave “Use System Proxy Settings” selected.
- Select any Download site, though the top one will be fine.
- Leave the default packages selected and change the View to Full.
- Use the Search box to search for openssh.
- Left-Click openssh: The OpenSSH server and client programs to set it to install the latest version. You can see that the New column has changed from Skip to the current version.
- Use the search box once again to search for xinit.
- Left-Click xinit: X Org X server launcher so that it switches from Skip to the current version.
- Press next to Continue and review.
- Note towards the bottom all the xorg packages which will also be installed. These are all necessary.
- Press Next to install everything (this may take a few minutes).
- Once installed, Open Cygwin to be presented with a terminal window.
- Run startx to open a new X11-enabled terminal window.
- In the new window, connect to the computer you would like to by using ssh -Y [username]@[hostname] – The “-Y” is required.
- Once connected, you’ll be able to run any X-based gui applications in your Cygwin window.
Overview
The X Window System (also known as X11, or just X) is a software package and network protocol that lets you interact locally, using your personal computer's display, mouse, and keyboard, with the graphical user interface (GUI) of an application running on a remote networked computer.
You can use X forwarding in an SSH session on your personal computer to securely run graphical applications (X clients) installed on the Indiana University research supercomputers.
Requirements
For X forwarding in SSH to work, your personal computer must be running an X server program. The X server program manages the interaction between the remote application (the X client) and your computer's hardware.
Most Linux distributions have the X server installed, but if your personal computer is running Windows or macOS, you will most likely need to install and run an X server application. For example:
Mac Os Ssh X11 Forwarding
- For Windows, download and install Xming. For X forwarding to work, you'll need to start Xming before connecting to the remote system with your SSH client (for example, PuTTY).
- For macOS, download and install XQuartz. For X forwarding to work, you'll need to start XQuartz before making an SSH connection to the remote system. Once XQuartz launches, you can use X forwarding with SSH from the Terminal or from the
xterm
application in XQuartz.
Additionally, your personal computer's SSH terminal application must have X11 forwarding enabled:
- In Linux, the SSH terminal supports X forwarding by default.
- In macOS, you may need to edit your
ssh_config
file (typically found at/etc/ssh/ssh_config
or~/.ssh/config
) if you have trouble using X forwarding. Ifssh_config
includes#X11Forwardingno
(or justX11Forwarding no
), uncomment out the line (remove the leading#
), and change it toX11Forwarding yes
. - In PuTTY for Windows, you can enable X forwarding in new or saved SSH sessions by selecting Enable X11 forwarding in the 'PuTTY Configuration' window (Connection > SSH > X11).
Also, the remote computer's SSH application must be configured to accept X server connections. The IU research supercomputers all have SSH configured to allow X forwarding (trusted mode only).
Use SSH with X forwarding
Linux or macOS
To use SSH with X forwarding on your Linux or macOS personal computer to run an X client application installed on an IU research supercomputer:
- Open your SSH terminal client.
- On the command line, enter (replacing
username
with your IU username):- For Big Red 3:
- For Carbonate:
- For Karst:
- Log in with your IU passphrase.
To test if X forwarding is working, try running
xclock
; on the command line, enter: If X forwarding is working, the
xclock
graphical clock will appear on your personal computer's desktop.X11 Server For Mac
PuTTY for Windows
To use SSH with X forwarding in PuTTY for Windows:
- Launch your X server application (for example, Xming).
- Make sure your connection settings for the remote system have Enable X11 forwarding selected; in the 'PuTTY Configuration' window, see Connection > SSH > X11.
- Open an SSH session to the desired remote system:
System Hostname Big Red 3 bigred3.uits.iu.edu
Carbonate carbonate.uits.iu.edu
Karst karst.uits.iu.edu
- Log in normally with your IU username and passphrase.
X11 Forwarding For Mac Os
To test if X forwarding is working, try running
xclock
; on the command line, enter: If X forwarding is working, the
xclock
graphical clock will appear on your personal computer's desktop.Use X forwarding for interactive sessions
On Carbonate or Karst
On Carbonate or Karst, if your interactive session requires:
Ssh Forward X11
- Less than 20 minutes of processor time: Connect via SSH with X forwarding enabled, and then launch the X client from the command line.
- More than 20 minutes of processor time: Submit a request for an interactive job via the batch system. To do so, connect via SSH with X forwarding enabled, and then:
- Use the TORQUE
qsub
command to submit an interactive job request. Add the-I
(for interactive) and-X
(for X forwarding) flags; for example (on Karst): - If the X client is not already added to your user environment, load the appropriate module; for example:
- From the command prompt, launch the X client; for example:
- Use the TORQUE
On Big Red 3
On Big Red 3, submit a request for an interactive job with X11 forwarding in the debug or general partition, and then launch your X application from a compute node:
- SSH to Big Red 3 with X forwarding enabled.
- On the command line, use the Slurm
srun
command with the--x11
flag to request an X11-enabled interactive session in the debug or general partition; for example:For more about using the Slurmsrun
command, see Use Slurm to submit and manage jobs on high performance computing systems. - Once you are placed on a compute node, you can launch graphical X applications (for example,
xterm
), as well as your own binaries, from the command line. Depending on the application and your~/.modules
file, you may need to load the module for the desired X client before launching the application.
Get help
Support for IU research supercomputers, software, and services is provided by the Research Technologies division of UITS. To ask a question or get help, contact UITS Research Technologies.
For more about using Modules to configure your user environment, see Use Modules to manage your software environment on IU's research supercomputers.