Get X11 Forwarding In macOS High Sierra
I needed to forward X11 output from one of my Linux servers recently to run virt-manager (manager for virtual machines in KVM), and because it’s been a while I had to download and install X11 server again.
Logout and back in to make XQuartz the default X11 server. SSH to the remote host including the -X or -Y option. The -X enables X-forwarding. Sometimes, you might need to use -Y instead. This enables trusted X-forwarding. Launch the application within the SSH session. X11 for Windows and Mac. X11 is a remote-display protocol used by Linux/Unix machines, including the Linux machines at Thayer. By running an X11 program (known as a server) on your computer, you can access graphical Linux programs remotely through an SSH client.In addition many.nix applications ported to macOS do not run natively under the macOS GUI and require X11. According to Wikipedia, from v10.3 (Panther) to v10.7 (Lion) of macOS, Apple at least included a Mac-compatible X11 server as an optional install. However, since v10.8 (Mountain Lion), Apple has stopped providing its own release of the X11 server and advises all users to download the newest version of a compatible X11 server directly from upstream. Our latest Server for Unix/Linux (X Window) is developed based on TightVNC version 2.0 with C and has a common codebase with Windows and macOS Servers. It supports most of the features available with the latest versions of TightVNC such as file transfer, access lists, additional ports, and built-in web-server. Steps to get X11 Forwarding in macOS High Sierra. Download and install the latest release from xquartz.org website; Start XQuartz; IMPORTANT: verify xauth location SSH configuration file /etc/ssh/sshconfig might contain path to xauth tool, which may be incorrect depending on your OSX/MacOS version. Here’s how to check.
As some of you know, Xorg server is no longer shipped/installed with macOS by default. So you have to download it from XQuartz page: https://www.xquartz.org/releases/index.html. Usually you do it, install it and that’s it – no additional steps are needed.
But things are slightly different for the macOS High Sierra, apparently.
The latest release hasn’t been updated since 2016 which I believe is before High Sierra – which explains why things don’t “just work” anymore. Fear not though – I tracked the issue down and it’s explained below.
UPDATE 03/2019: MacOS Mojave works just great, you may skip Step 3 in the procedure below.
Steps to get X11 Forwarding in macOS High Sierra
X11 Server Mac Os
- Download and install the latest release from xquartz.org website
- Start XQuartz
- IMPORTANT: verify xauth locationSSH configuration file /etc/ssh/ssh_config might contain path to xauth tool, which may be incorrect depending on your OSX/MacOS version. Here’s how to check:
if this returns nothing, you can skip to Step 4 below. If this gives you an output, compare it to the path from the next command:
Right-click the Start button. Click System.Verify the Installed memory (RAM) line. Minimum system ram requirement for macos x. (In this case, you can see I have 8GB of RAM installed.)How to check RAM configuration and compatible RAM using Crucial System ScannerTo take things even further, Crucial System Scanner is a great app that will scan your computer and show you how much total RAM your motherboard and processor can handle, how many slots are available for RAM, and some options for purchasing compatible RAM.
If the locations differ, update the /etc/ssh/ssh_config file:
- Connect to remote server using -X option which does X11 forwarding for SSH:[email protected]:~ $ ssh -X centos.unixtutorial.or
- Check the DISPLAY variable, it should now be set correctly:
That’s it for today!