X-Forwarding for Mac

X-Forwarding instructions for Mac OSX

This page describes the process of using X forwarding to run a Linux X11 application remotely from a Mac. X forwarding is the process of connecting to a remote Linux system and launching a program from that system, but having the window display on your local system. Think of it like launching a program from a Citrix server and using it locally.

Downloading the Xquartz application

Apple used to provide an X11 app with the default installation of Mac OS X. However, since the release of OS X 10.8 Mountain Lion, Apple dropped this app from the system.

There is a third-party application that you will need to download to make use of X forwarding called "Xquartz".

Installing Xquartz

The Xquartz installer is a macOS "pkg" bundle contained within a disk image (DMG) file.

Double-click on the ".pkg" file to start the installation.

The installation process is a standard "continue, next, next" style installer. So, just click through it.

Screen shot of XQuartz.pkg Screenshot of XQuartz Installer

Using Xquartz to forward X11 applications

Now that you have Xquartz installed, launch the application. It is located in the "Utilities" folder of the system's "Applications" folder.

Screenshot of XQuartz applications window

Once you launch the app, you will see a very simplistic bash terminal window.

Screenshot of XQuartz bash terminal window

Now, login to the system that you want to forward X applications from with the following command:

$ ssh -Y netid@hostname.illinois.edu
NOTE: Replace "netid" with your username and "hostname" with the system you want to login to.

Now that you're logged in to the system, you can launch the application that you want to forward by typing its name in the terminal:

$gedit

Screensot of XQuartz gedit window

Problems

There are a few potential problems that you may face while using this.

Using the -X flag instead of -Y

The X forwarding command above uses the -Y flag when connecting to the system. This enabled "trusted" X forwarding. This is a more secure method of forwarding X windows.

However, sometimes this may not work. You may have to use the less secure -X flag instead. If you need to do this, just replace the -Y flag with -X when connecting, like this:

$ ssh -X netid@hostname.illinois.edu
NOTE: Replace "netid" with your username and "hostname" with the system you want to login to.

Poor performance

X forwarding is a very laggy and slow process. However, it seems to be even worse while using Xquartz.

A more performant solution would be to use FastX instead if it is available on the system that you are connecting to.

https://www.starnet.com/fastx/current-client

 




Keywords:xforwarding mac ssh   Doc ID:81262
Owner:Gina D.Group:University of Illinois Engineering IT
Created:2018-03-30 14:03 CDTUpdated:2018-03-30 14:15 CDT
Sites:University of Illinois Engineering IT
Feedback:  0   0