Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

10.5: A few tips on using X11 in 10.5 Apps
In Leopard, X11 is now launched on demand by launchd, which means it's now started automatically any time you start an X application. This is a very good thing, but it means that you may have to fix your configuration files. In particular, launchd is now in charge of setting the DISPLAY variable, so if you manually set it (say, in ~/.bashrc or ~/.MacOSX/environment.plist), your X apps will be unable to find the server. To make things work properly, just don't touch the DISPLAY variable at all in your init scripts.

Also, this means you shouldn't keep X11.app in your Dock. If you launch it by clicking on its Dock icon, you'll end up with another X11 icon in the dock. (For reference, here's a very informative post on the subject from Apple's x11-users mailing list.)

Finally, I experienced a problem with USB Overdrive and Leopard's X11 where none of my X11 apps would stay focused for more than a second or two. Upgrading to the newest USB Overdrive release solved the issue.

[robg adds: One of the reviewers on the queue site adds that you can put this code in your .bashrc file to make sure you don't set the DISPLAY variable:
if [ "$DISPLAY" == "" ]; then
export DISPLAY=:0
fi
I haven't tested this one.]
    •    
  • Currently 3.60 / 5
  You rated: 3 / 5 (5 votes cast)
 
[23,176 views]  

10.5: A few tips on using X11 in 10.5 | 15 comments | Create New Account
Click here to return to the '10.5: A few tips on using X11 in 10.5' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Matlab?
Authored by: A. Square on Nov 07, '07 08:16:09AM

Has anyone figured out how to run Matlab under 10.5 without having it open an Xterm window every time it's run?



[ Reply to This | # ]
Matlab?
Authored by: dille on Nov 07, '07 12:47:30PM

just start matlab from terminal (Terminal.app, not xterm). X11 will be launched automagically -- that's exactly what this article said.



[ Reply to This | # ]
Matlab?
Authored by: A. Square on Nov 08, '07 07:48:16AM

Unfortunately, that doesn't work for me. When run from the terminal Matlab's icon shows up in the dock but the window never actually appears.



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: TheDreamer on Nov 07, '07 12:36:43PM

Doesn't work if I "ssh -X" into a remote system and try to start an X application (such as MatLab).

---
You may be a dreamer, but I'm The Dreamer, the definite article you might say!



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: jeremyp on Nov 07, '07 01:04:41PM

ssh X11 forwarding is broken with it. I suspect ssh doesn't know how to forward to a Unix socket. It's OK if you start the X server manually and set $DISPLAY to localhost:0



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: macfreek on Nov 08, '07 05:44:49AM

To enable xterm on remote computers:

On your LOCAL machine, edit /etc/ssh_config:

Host *
   ForwardX11 yes
   ForwardX11Trusted yes

On your REMOTE machines, edit /etc/sshd_config:

X11Forwarding yes



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: EatingPie on Nov 08, '07 04:14:07PM

>Doesn't work if I "ssh -X" into a remote system and try to start an X application (such as MatLab).

It's "ssh -Y" that does the trick.

---
-Pie



[ Reply to This | # ]
Works with the bundled OpenSSH
Authored by: sabi on Nov 07, '07 01:40:17PM
Actually, no it's not with the bundled SSH.

% echo $DISPLAY
/tmp/launch-cSyFF5/:0
% ssh -Y vali  
Warning: No xauth data; using fake authentication data for X11 forwarding.
[...]
% echo $DISPLAY
localhost:11.0
% xterm
[X11 starts, followed by xterm]
If you're using a customized SSH (someone on the x11-users mailing list had trouble with a GSI version) then you can patch it.

[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: BobHarris on Nov 07, '07 07:05:42PM

Has anyone been able to use Leopard's X11 on a multiple display system?

Bob Harris



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: dbs on Nov 07, '07 08:34:36PM

Some friends of mine have had no luck getting this to work. (Can't drag windows to the second display.) That's all I know.



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: sabi on Nov 07, '07 11:19:29PM
Xinerama apparently doesn't work yet. You can uninstall Leopard's X11 and install Tiger's one, if necessary—see here for instructions.

[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: pyip on Dec 13, '07 07:23:37PM

Hi,
I have the same problem, any workaround that you found?



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: n8gray on Nov 08, '07 12:08:30AM
More free advice. ;^) If you care about or rely on X11 in Leopard you should:

1. look at the x11-users@lists.apple.com archives once every day or two: http://lists.apple.com/archives/X11-users

2. Replace the horribly broken Xquartz (that's the actual X server executable on OS X) that shipped with Leopard with the only slightly broken alpha release at the x.org wiki: http://www.x.org/wiki/XDarwin

-n8



[ Reply to This | # ]
10.5: A few tips on using X11 in 10.5
Authored by: cedric on Nov 10, '07 12:20:08AM

Anyone to say with me that it is a very bad user experience to not being able to start X11 from the Dock? I don't care if it starts automatically when I launch an X application, because I don't. I start working right away on the terminals. I don't get it. I'll end up using spotlight everytime?!



[ Reply to This | # ]
Troubleshooting checklist to see if DISPLAY is set.
Authored by: sao on Nov 12, '07 08:01:42AM
A troubleshooting checklist to see if DISPLAY is set (posted by Ben Byer to the X11-users mailing list) is now at the "Leopard and X11 FAQs" at the Mac OSX Hints Forums. Please, read #36- Troubleshooting checklist to see if DISPLAY is set.

http://forums.macosxhints.com/showthread.php?t=80171



[ Reply to This | # ]