Search

Resume and bio of the author Couple of articles related to my hobby - robotics
My impressions about immigration to Australia. In Russian only. Recipes for everyday problems solving
Linux-related posts Windows-related posts
Software-related posts A lot of info about hardware
Different tools you might find useful Posts about various web technologies
Everything that doesn't fit the rest of the menu RSS feed for this blog

Tag Cloud

Archives

Links

Andrey Mikhalchuk’s Blog

Technoblog about life

Dec 11, 2012 Surprised why X11 forwarding no longer works with MacOS. Here is the solution.

I actually ran into this problem after upgrading to Mountain Lion )(I think Lion has the same issue) and trying to run xterm on remote machine using ssh tunneling. No matter what I did the command always failed with

Warning: This program is an suid-root program or is being run by the root user.
The full text of the error or warning message cannot be safely formatted
in this environment. You may get a more descriptive message by running the
program as a non-root user or by removing the suid bit on the executable.
xterm Xt error: Can't open display: %s
xterm: DISPLAY is not set

(Well the “Can’t open display %s” only appeared because I did a terrible thing: ssh as root, anyway …)

I even installed xserver with macports, but that also didn’t help. So here is the solution …


MacOS keeps the X11 programs in “/usr/X11/bin”. If you “cd /usr/X11/bin” you will actually see those programs, but once you try to run any of them (for instance oclock) you will get error dialog saying:
X11 is no longer included with OS X
Hah! Well, that’s bad news, but some good news will come on the page that will appear after you click “Continue”. This will lead you to the XQuartz opensource X Server for OS X: http://xquartz.macosforge.org/landing/. On the landing page you will find the download link. Install that package and it will enable you to run X11 apps (including remotely via X11 forwarding in ssh). Oh, logout/login is required after the installation.

This post is published in Other.

No comments

No comments so far

Leave a Reply

You must be logged in to post a comment.

Site Map (c) Andrey Mikhalchuk, 2005-2008