X
22732

XQuartz/X11 failing to launch automatically when running ENVI or IDL

PROBLEM:

Some IDL and ENVI users on Mac OS X (10.7 or later) have reported that X11 fails to launch automatically when IDL or ENVI is started by double clicking on the application launch icon.

Possible causes for this problem may be:

1.) X11/XQuartz configuration is not complete

2.) Corrupted X11/XQuartz installation

 

DETAILS:

1.) X11/XQuartz configuration is not complete:

An indication that this might be the problem is to try the following:

First launch XQuartz/X11 and then from an X11 Terminal window (not an Apple Terminal window) launch ENVI or IDL.  For example, for ENVI+IDL 5.2 (from a Bash shell):

    source /Application/exelis/envi52/bin/envi_setup.bash
    envi

Or for IDL 8.4:

    source /Application/exelis/idl84/bin/idl_setup.bash
    idlde

If a user has just installed XQuartz on their Mac OS X system, the problem may be as simple as logging out and then logging back in again, or even rebooting the system, to allow XQuartz to finalize its configuration.

2.) Corrupted X11/XQuartz installation

If logging out/in does not fix the problem, and if the user has migrated their XQuartz installation from an older version of the operating system or from a different machine, it is possible that the XQuartz installation has become corrupted or is no longer properly configured because of the operating system migration or upgrade. If this might be the case, uninstallation/reinstallation of XQuartz help to may fix the problem.

Warning: The following instructions and the use of "sudo" can affect system level files and system services and cause damage to your operating system if not done properly.  If you are unfamiliar with or  uncomfortable working with “sudo” or commands like below, please contact your system administrator or a Mac OS X expert for further assistance. 

 

Upgrading to a newer version of XQuartz doesn't seem to require that you first manually uninstall the older version of XQuartz.

However, you may wish  to uninstall and then reinstall the same version of XQuartz if you believe the current installation may be corrupted (for example, corruption caused by operating system migration). To explicitly uninstall XQuartz, issue from an Apple Terminal window the shell commands listed in the following section of the XQuartz X11 FAQ page:

    http://xquartz.macosforge.org/trac/wiki/X11-UsersFAQ#UninstallSnowLeopardorLater

If needed, below are the four commands from the above referenced web page:

    launchctl unload /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

    sudo launchctl unload /Library/LaunchDaemons/org.macosforge.xquartz.privileged_startx.plist

    sudo rm -rf /opt/X11* /Library/Launch*/org.macosforge.xquartz.*/Applications/Utilities/XQuartz.app /etc/*paths.d/*XQuartz

    sudo pkgutil --forget org.macosforge.xquartz.pkg

Note that the first two commands above may return an error if XQuartz is not properly configured as a service on the system at the time the commands are issued. If so, those errors can be ignored.

After uninstalling XQuartz, reinstall (preferably) the latest compatible version of the XQuartz software. 

Important: After installing XQuartz, be sure to log out and log back in (or reboot the system) to allow XQuartz/X11 to function properly.

At this point, launch IDL or ENVI from its launch icon to see if X11 will run automatically when IDL or ENVI is started. 

Related Help Articles:

"IDL Workbench on Mac OS X Dependency On Java 6"
http://harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/16070/IDL-Workbench-on-Mac-OS-X-Dependency-On-Java-6.aspx

"Using IDL and ENVI on Mac OS X Requires X11/XQuartz"
http://harrisgeospatial.com/Support/SelfHelpTools/HelpArticles/HelpArticles-Detail/TabId/2718/ArtMID/10220/ArticleID/15782/Using-IDL-and-ENVI-on-Mac-OS-X-Requires-X11XQuartz.aspx 

 

Reviewed JU (4-Aug-2015) and CS, KK