Monday 7 January 2013

SSH and X11 on OS X Mountain Lion - No longer OOTB

I have a vague recollection of Stuart McIntyre Tweeting about this when OS X 10.8 Mountain Lion was released, but didn't really follow up at that point.

Having now finally got my act together and installed Mountain Lion, I can see what he means.

On the rare occasion that I want to connect to one of my Unix servers via X11, I'm used to typing the following command: -


which, after a short interval, starts a X11 server, and allows me to log in to the remote box as usual, with the X11 session being established back to the Mac.

Sadly, this is no longer an option.

According to this: -


Apple write: -

X11 is not included with Mountain Lion, but X11 server and client libraries for OS X Mountain Lion are available from the XQuartz project: http://xquartz.macosforge.org. You should use XQuartz version 2.7.2 or later.

So I've headed over to the XQuartz project on MacOSForge, and downloaded a 67 MB DMG file - XQuartz-2.7.4.dmg - and am giving it a try now.

I'll report back ….

*UPDATE - 8/1/2013*

Yep, it worked. It did require me to log out of OS X - I chose to reboot, so had to wait until I had a window in which I could shut down VMware, browser, Notes etc.

However, now when I run: -

$ ssh -X wasadmin@rhel6

I see a short delay whilst XQuartz kicks off, and I get an icon: -

in the dock.

More importantly, I can then run X11 commands such as xev and see the results back on the Mac's desktop. Which is nice :-)

2 comments:

Anonymous said...

Yup, it was me... And XQuartz works fine, thankfully.

BTW, one of my shortcuts is to have a bunch of aliases in my .profile on the Mac, e.g.:

alias pooh='ssh -YC -c blowfish root@pooh.collaborationmatters.com'

This sets up the SSH tunnelling (the -Y), and uses the lowest bandwidth cipher for the communication, as well as allowing the connections to be called with just the short name of the machine.

Thanks for your continued blogging, Dave. Such great info!

Dave Hay said...

@Stuart, thanks for this. I've never really got into the Alias command on *Nix, but I know a lot of sysadsmins who do.

No worries re blogging, will continue to write stuff down before I forget .... what was I saying ???

Visual Studio Code - Wow 🙀

Why did I not know that I can merely hit [cmd] [p]  to bring up a search box allowing me to search my project e.g. a repo cloned from GitHub...