Color Scheme
Find People
Sign Up
old site
中文版 Location: Homepage >> Chenglong Shen : CV - Publications - Blog

Mac OS


1. 解决IDL在新版mac os中gui无法出现的问题
Posted from

XQuartz 2.7.10 and libXt / Motif / IDL
Posted on October 25, 2016
Something of an obscure one here, but documented in case anyone else finds this useful.

XQuartz 2.7.10 introduces changes to the Xt library which can have a significant impact on older Motif applications. In IDL, for example, using the dialog_pickfile() function leads to an instant crash with an error message:

IDL> file=dialog_pickfile()
Warning: Dialog style must be XmDIALOG_MODELESS.
Error: attempt to add non-widget child "dsm" to parent "idl" which supports only widgets
This will probably affect any application built expecting the older version of XQuartz – so while IDL users were the first to notice this I imagine others will have the same problem sooner or later.

The solution (aside from filing bug reports against Motif) is to edit the DYLD_LIBRARY_PATH environment variable so that it includes the directory /opt/X11/lib/flat_namespace/

In the specific case of IDL, the idl startup script (/Applications/exelis/idl/bin/idl) contains a section which amends that variable. It’s an sh script, so if your shell is bash then it should pick up your edits. However many IDL users are also SSWIDL users, and they usually have their shell set to tcsh. In that case it’s probably simplest to edit the ‘idl’ script as follows, around line 245:

if [ "$DYLD_LIBRARY_PATH" = "" ]; then
I’ve left the original lines there, but commented out. Also be aware that the lines above may wrap here but should be left complete in the actual file!

Obviously you should make a backup copy of the original ‘idl’ script before doing this; you’ll probably need to run this as root due to file permissions, hence ‘sudo nano’ will be your friend.

For people on the Maths & Physics munki server I will push out an updated script via Managed Software Center.

Update – apparently some people use the IDLDE environment, and the fix above doesn’t fix that. There is another edit to make to the ‘idl’ script, just past the change above:

if [ "$APPLICATION" = "idlde" ]; then
   # add bindir for idlde shareable libraries
For MSC users this is included in v1.1 of the patch.

I have been in contact with Harris tech support – at the moment they suggest rolling back to XQuartz 2.7.9 but so far as I can tell the changes detailed above are an acceptable workaround, and I prefer to keep current for security reasons.

Update 2 – Harris tech support article which now says basically the same thing!
Chenglong Shen
Posted at 2017-09-22 08:55 CST
Last modified at 2017-09-22 08:55 CST
Link to this poster
Friendly Version

Locations | Statistics | FAQ
Best view under the 1024x768 resolution and with the normal size of fonts.
Designed & developed by Yuming Wang, run for 6290 days since December 15, 2006, and last upgraded on May 28th, 2009.
Powered by Apache + PHP coded cOpfOs 3.11.1 last upgraded on February 22nd, 2010.
Copyright © 2006, all rights reserved.