XQuartz cannot be opened because of a problem.

Hello,

 

I've tried to open XQuartz (several versions of it), but every time I got:

 

XQuartz cannot be opened because of a problem.

Check with the developer to make sure XQuartz works with this version of macOS. You may need to reinstall the application. Be sure to install any available updates for the application and macOS.

Click Report to see more detailed information and send a report to Apple.


My MacBook Pro has OS version is 10.12.6 and until few days ago it didn't have such problem.

 

I believe that this problem is also affecting my ssh client. In fact, after typing in Terminal the comnmand ssh -X ... I am prompted to enter the password. After entering the psw, the Terminal hangs forever and does not login to the machine as expected.

Using -vvv option of ssh, to have some debug, I see that the last line that gets printed is:

debug2: client_x11_get_proto: /opt/X11/bin/xauth -f /var/folders/6d/6nzm125s1r93bd4j0dm1tllrsmtqyh/T//ssh-01iZLYAKsmAr/xauthfile generate /private/tmp/com.apple.launchd.HHjZB6MKFb/org.macosforge.xquartz:0 MIT-MAGIC-COOKIE-1 untrusted timeout 1260 2>/dev/null

 

Several posts on the web suggested to downgrade XQuartz, but this didn't not help me.

 

I tried ssh -Y ... and I can login. HOWEVER, I am not able to open any X window as I verified by trying to plot something (using gnuplot). The X windows never appears and the command is simply stuck!

 

Is there any fix for this?

 

Thank you,

Fabio

Has invited:

howapple - hello

Favor from:


Alright, I found the problem and a temporary solution to both issues (ssh and XQuartz not able to be launched). It has to do with the variable DYLD_LIBRARY_PATH.

 

Within my standard account .bashrc I had DYLD_LIBRARY_PATH defined, while in the root account this variable was not set. I commented out DYLD_LIBRARY_PATH and was able to log in remotely from my standard account (the XQuartz icon appeared in the Dock) and also to make gnuplot plot in an X Window. I could also open XQuartz without receiving the error message before.

 

What puzzles me is that I have had DYLD_LIBRARY_PATH defined for a long time now and never encountered such problem.

To reply to a question, please Login or registered