Friday, January 17, 2003

Apple’s X11

John Gruber writes that “X11 is only of interest to Unix nerds. It has no relevance whatsoever to regular Mac users”:

[Mac OS X] not only runs Macintosh software, but it runs Unix software as well. But that X11 applications consist of standard GUI elements such as windows, menus, and buttons does not change the fact that they are Unix programs: tricky to install and remove, poorly designed, and utterly lacking in Mac-ness. That X11 is a graphical environment doesn’t mean it’s any more interesting to most Mac users than the text-based programs accessible via Terminal.

I totally agree that X11 applications aren’t real Mac applications, and that’s exactly why Apple’s X11 server is relevant. Not only does it make it easier to bring X11 apps to the Mac without rewriting them in Carbon or Cocoa, but the fact that it’s an Apple product means that Apple is implicitly saying that this is an OK thing to do.

Consider the case of MATLAB. It used to be a real Macintosh application, not unlike Gruber’s example of MacPerl. It could copy and paste graphs in EPS, which I thought was cool. The MathWorks stopped developing MATLAB for the Mac, but now they’ve brought it to Mac OS X. The only problem is that MATLAB 6.5 is an X11 port, and thus is probably less Mac-like than MATLAB running in Virtual PC. (This is speculation: I’ve used the old Mac version of MATLAB, as well as X11 versions on Linux and Solaris; I’ve not used 6.5 on Mac OS X.)

I worry that Apple’s X11 server will encourage more ports of this type, and that regular Mac users will be forced to use them. Of course, maybe these companies would never consider doing real Mac ports, in which case an Apple X11 server is preferable to Fink or paying Tenon a lot of money.

7 Comments RSS · Twitter


Jan Erik Moström

Yes, but you should also consider that if some people are not able to run for example Matlab they will not run another program or wait until a port is available (if ever) they will switch to Windows or Linux. That Matlab wasn't supported on the Mac was one of the major reasons why people switched from Macs to Windows at two different departments I've worked at. Actually, one user decided to stay with a Mac when I told her that it was possible to use Matlab doing remote login using one of the early ports of X.


jem: I agree with you: it's certainly better to have a native X11 option than none at all. My main point is that X11 matters to regular users, because in cases like MATLAB there will be non Unix-nerds using it.


Jan -- You mentioned using MATLAB via remote login on a Mac. I wonder if you've got any more info on this or maybe a link to some documentation. This is something I'd like very much to be able to do, and I can't quite get it -- MATLAB processes die because they can't display properly.

I'm running 10.2.3 and I have installed X11, though I don't really know what to do with it.


Zach: to do this you need your Mac with installed X11 Server and a Linux/Unix Box at the other side which _must_ be configured to enable X11 connection forwarding (i come back to this later).

Now on your Apple start xterm (click on the started X11 Icon and choose xterm from the Application menu).

Now do a remote login into the machine with enabled X11 connection forwarding (usually ssh -X remote_ip (the -X stands for expclicit X11 forwarding enabled)).

If you are logged in you can check if everything is correct via "export $DISPLAY" (when using bash as shell). If this prints an empty line there went something wrong.

Ok. now simply start the Application (for example xclock or matlab or whatever).

Thats it.

If you connected to a server with X11 connection forwarding disabled you will get an error of the form "Error: Can't open display:". In this contact the administrator of this server so he/she might enable X11 forwarding.

Hope this helps.


No Wolfgang.

It does not work for matlab.
I spent last 3 hours with my sysadmin d trying that and while it woks for xclock and xeyes it does NOT work for MATLAB (6.5 SP! R13).

Installing Matlab on Our Mac Server (XServe G4 DP) running 10.2.8 + apple X11b3 (not oroborsx).
Running matlab locally on G4 is OK. but logging from a X11 capable machine (e.g. a Sun Spar or another Mac with X11) and typing /matlab -display targetmachine:0.0 does indeed display the splash screen on the remote one but then the main windows goes still on the G4 !!.

Setting the DISPLAY variable does not help either.

Any suggestionn appreciated (also to my e-mail address).

Regards


try matlab -nojvm if you are using a mac server(i have no idea bout anything else)
for some reason matlab has a java gui, and you may be runing this.
as for DISPLAY that wont work unless you have enabled forwarding in /etc/sshd_config im currently using these settings for various reasons:
#AllowTcpForwarding yes
#GatewayPorts no
#X11Forwarding yes
#X11DisplayOffset 0
#X11UseLocalhost no

you will need to restart your ssh connections after changing these settings.
if this doesnt work, type "xhost +" on the client machine. If it works after that, then you have an authentication problem(xauth)


Something caused this post to be bumped in the feed. It doesn't seem to be posted on "Tuesday, July 16, 2024".

Leave a Comment