Inkscape no longer launching after XQuartz update

Asked by Windell Oskay

For perhaps not very good reasons, I re-installed XQuartz on my system. After doing so, Inkscape will no longer launch.

* The behavior is that the dock icon will highlight briefly, then go away, without opening XQuartz.

* There is no crash, just a failure to launch. Accordingly, I have not managed to find anything that appears to be relevant in the DiagnosticReports, logs, or console (with one exception, at the end of this list).

* I have not changed OS version or Inkscape version (0.48.2) since everything was working.

* I have tried reinstalling XQuartz and Inkscape.

* I have restarted the computer.

* The gatekeeper has been passed.

* I've tried the suggestions of many previous debugging threads here (e.g., https://answers.launchpad.net/inkscape/+question/216559 ), obviously without success thus far. ;)

* My $DISPLAY variable appears to be set correctly:

$ echo $DISPLAY
/private/tmp/com.apple.launchd.tgqClx5tkk/org.macosforge.xquartz:0

* Other applications that use X11 appear to be working normally.

example: The command
$ xterm &
 launches XQuartz and opens an xterm. If XQuartz is already open, this command opens another xterm window. Other X11 programs are also launching normally. So far as I have seen, only Inkscape is not launching correctly.

* Trying to launch Inkscape from the terminal works the same as launching from the finder:

$ open -a Inkscape
Shows Inkscape briefly in the dock, but again fails to launch.

* Trying to launch from the script fails in the same way, but gives a little more detail:

$ /Applications/Inkscape.app/Contents/Resources/script
Setting Language: .UTF-8

(process:1091): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.

(inkscape-bin:1091): Gtk-WARNING **: cannot open display: /private/tmp/com.apple.launchd.tgqClx5tkk/org.macosforge.xquartz:0

[ As per other threads ( https://bugs.launchpad.net/inkscape/+bug/1132277 ), the "Locale not supported by C library." warning is not problematic, but the cannot open display is a problem. ]

* Trying to launch Inkscape from within an xterm behaves identically to using a regular terminal window.

* One interesting thing: The console generates three copies of this this note about paths, when launching via the "open -a Inkscape" command:

6/8/14 11:22:20.293 PM Inkscape[2564]: *** -[NSProcessInfo environment]: Warning: duplicate definition for key 'PATH' found in environment -- subsequent definitions are ignored. The first definition was '/usr/bin:/bin:/usr/sbin:/sbin', the ignored definition is '/opt/local/bin:/opt/local/sbin:/sw/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/X11/bin'.

Is this the issue? And if so, how might I go about fixing it?

Question information

Language:
English Edit question
Status:
Answered
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
su_v (suv-lp) said :
#1

On 2014-06-09 09:11 +0100, Windell Oskay wrote:

> Inkscape no longer launching after XQuartz update

versus

> For perhaps not very good reasons, I re-installed XQuartz on my system.

Which version of OS X do you have installed?
Was this originally an update or just a reinstallation of XQuartz?
Which version of XQuartz was installed before (when Inkscape launched ok)?
Which version of XQuartz is installed now?

> * My $DISPLAY variable appears to be set correctly:
>
> $ echo $DISPLAY
> /private/tmp/com.apple.launchd.tgqClx5tkk/org.macosforge.xquartz:0

Personally, I have never seen such a value for $DISPLAY for X11/XQuartz before - usually it's something like

$ echo $DISPLAY
/tmp/launch-ir3dNK/org.macosforge.xquartz:0

> (inkscape-bin:1091): Gtk-WARNING **: cannot open display: /private/tmp/com.apple.launchd.tgqClx5tkk/org.macosforge.xquartz:0

'cannot open display' - That's likely what prevents Inkscape from launching, though I would not know why this happens.

Doing a web search finds two other mentions of the substring "/private/tmp/com.apple.launchd" besides this question, and both cases report using X11 forwarding with XQuartz on a developer prerelease of OS X 10.10 Yosemite Beta:
<https://www.google.com/search?&hl=en&q=%22/private/tmp/com.apple.launchd%22>

Top hits for 'Warning: duplicate definition for key 'PATH' found in environment' again point to installs of OS X 10.10 Yosemite Beta.

[ Note that it is not known at the moment whether the rather dated official Inkscape package (0.48.2) does run on the current beta release of 10.10, or whether it will do so on the final one. ]

Things I would attempt next:
a) test with a new user account on the same machine
b) test with an unmodified version of Inkscape.app
   (e.g. newly installed fresh from the DMG into ~/Applications)
c) quit XQuartz, and rename/move the preferences file for XQuartz:
~/Library/Preferences/org.macosforge.xquartz.X11.plist
and then launch Inkscape.app to test whether it autolaunches XQuartz.

Otherwise, based on the provided information I'm as clueless right now as you :/

Revision history for this message
Windell Oskay (windell) said :
#2

> Which version of OS X do you have installed?

I previously used Inkscape on this computer with 10.9, and (as you have deduced) did upgrade from there (I am in Apple's developer program). After the upgrade, Inkscape continued to work properly in every respect that I noticed, in several hours of non-rigorous testing.

>Was this originally an update or just a reinstallation of XQuartz?

The original issue was a change in XQuartz, from 2.7.5 to 2.7.6. After I encountered problems, I tried going back to 2.7.5 as well; the version does not seem to make a difference.

>Which version of XQuartz was installed before (when Inkscape launched ok)?

Originally, it was working under XQuartz 2.7.5. (Foolishly, I succumbed to the nagging dialog box and upgraded to 2.7.6.)

>Which version of XQuartz is installed now?

2.7.6. I can try going back to 2.7.5 again, just to make sure that it still doesn't make a difference. (I would note that 2.7.6 is the current version of XQuartz, and what someone installing Inkscape on a Mac for the first time would be expected to install.)

> 'cannot open display' - That's likely what prevents Inkscape from launching, though I would not know why this happens.

What's puzzling to me is (1) that the other x11 apps that I use (gEDA's gschem and pcb) are launching just fine, which suggests that the XQuartz installation is fundamentally okay, and (2) that it *was* working before the XQuartz update, which suggests that Inkscape is fundamentally okay.

>Things I would attempt next:
>a) test with a new user account on the same machine
>b) test with an unmodified version of Inkscape.app
>c) quit XQuartz, and rename/move the preferences file for XQuartz:

I installed a fresh copy of Inkscape, and launched it with a new user account.
- Bypassed Gatekeeper.
- Got the "application downloaded from internet" dialog box.
- It opened XQuartz, and gave me the "first run" dialog about the font cache.
- Inkscape then quit, leaving XQuartz open.
- Subsequent behavior was the same as on my main account, with the added note
"Warning: AppleCollationOrder setting not found, using AppleLocale.
Setting Language: .UTF-8 [...]"

Moving the XQuartz preferences file did not appear to make a difference. Next, I'll try reinstalling XQuartz 2.7.5 and going through previous set of steps again.

> Otherwise, based on the provided information I'm as clueless right now as you :/

I don't think that I could ever describe you as clueless. ;)

Revision history for this message
su_v (suv-lp) said :
#3

Just to confirm that Inkscape.app (or rather the main binary itself) is ok - does this command produce the expected output?

/Applications/Inkscape.app/Contents/Resources/script -V

(Notes: run the command in a new (default) terminal window; always use the full absolute path to that wrapper shell script if run directly in the terminal; the expected output is "Inkscape 0.48.2 r9819 (Jul 15 2011)". Warnings about language settings usually don't prevent Inkscape.app from launching or processing other commands via command line interface. The version information should be output independent of whether there's a X server (XQuartz) running or not - it works also if one unsets $DISPLAY first)

Revision history for this message
Windell Oskay (windell) said :
#4

Almost-- it does fail with the same error:

/Applications/Inkscape.app/Contents/Resources/script -V
Setting Language: .UTF-8

(process:5205): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.

(inkscape-bin:5205): Gtk-WARNING **: cannot open display: /private/tmp/com.apple.launchd.l3Aw8Rccaj/org.macosforge.xquartz:0

However, if we add the "-z" (--without-gui) option, it does succeed:

$ /Applications/Inkscape.app/Contents/Resources/script -z -V
Setting Language: .UTF-8

(process:5142): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.
Inkscape 0.48.2 r9819 (Jul 15 2011)

Revision history for this message
su_v (suv-lp) said :
#5

On 2014-06-09 22:26 +0100, Windell Oskay wrote:
>> Which version of XQuartz is installed now?
> 2.7.6.

It can't be a basic compatibility issue between (rather dated) Inkscape.app 0.48.2 and XQuartz 2.7.6 per se either, based on other user reports:
- here's a recent bug report from a Snow Leopard user (otherwise unrelated, reporting a well-known issue), who mentions using XQuartz 2.7.6 and Inkscape 0.48.2:
<https://bugs.launchpad.net/inkscape/+bug/1325447>

- and another bug report from a Mavericks user (otherwise unrelated too, reporting a known issue tracked in earlier report), using XQuartz 2.7.6:
<https://bugs.launchpad.net/inkscape/+bug/1322483>

- also I recall at least one recent conversation in #inkscape (irc channel) with a Mac user (on Mavericks) where XQuartz 2.7.6 in the end worked ok, too (initially the user experienced visual artifacts rendered in the background (chrome) of GTK+ widgets, but it went away after resetting the XQuartz prefs and removing a custom ~/.gtkrc-2.0 file with gtk settings).

Revision history for this message
Windell Oskay (windell) said :
#6

That all sounds quite correct to me.

Revision history for this message
su_v (suv-lp) said :
#7

No new insights so far …

Another idea for a trivial test: edit the last line in the shell script
'Inkscape.app/Contents/Resources/bin/inkscape' to launch a different X11-based application; for example:

orig:
exec "$CWD/inkscape-bin" "$@"

new:
exec "/opt/X11/bin/xeyes"

Possibly the launch failure is a permissions issue (e.g. xhost- or xauth-related) - does xeyes fail to launch via app bundle, too?

While this is still waiting for a real solution - if you need a working Inkscape.app right now, and like to test unstable versions … there are DMGs available with builds based on this experimental branch:
<https://code.launchpad.net/~suv-lp/inkscape/osxmenu>

Builds based on the 'osxmenu' branch are confirmed to run on Lion, Mountain Lion and Mavericks, but I haven't read any feedback yet wrt Yosemite Beta.

* Caveats:
The branch is based on current Inkscape trunk (unstable), and has several experimental options enabled which likely won't be enabled by default in the next stable release 0.91 (mesh gradients, experimental path effects, new SVG2 and CSS features, DBus-based scripting API). The major difference though is that it no longer depends on X11/XQuartz.

The branch contains unreviewed changes to Inkscape's sources, and it's not clear at this moment whether or not it will be used later on for official Mac OS X packages of new Inkscape releases.

For additional info, see branch page, and the README.txt and NOTES.txt in the Dropbox folder.

* Known issue (trunk, upcoming 0.91):
Since you develop custom extensions for Inkscape, this is possibly of interest to you wrt 0.91 (I haven't checked whether the egg-bot extensions are affected or not):
<http://wiki.inkscape.org/wiki/index.php/Release_notes/0.91#Units:_Breaking_change>
<http://wiki.inkscape.org/wiki/index.php/Notes_On_Units_Handling_in_Extensions_in_0.91>

Revision history for this message
Windell Oskay (windell) said :
#8

Launching xeyes does work. (It's very strange to click on Inkscape and have the eyes open!) That somewhat surprised me; I was also guessing that it could be a permissions issue.

I tried out the unstable branch of osxmenu and (1) it appears to work very well under 10.10 (beta), and (2) it is _fantastic_! The native interface feels like a giant leap forward. (Also, a personal moment of pride seeing Hershey Text in the extensions menu.)

The immediate problem is thus "solved" (or worked around), but I am absolutely willing to continue to follow up here and perform any tests that might help elucidate the issue, just in case this is something that other people might run into. And, *thank you.*

Thank you also for the warning about the unit handling change. My first glance suggests that this will not break anything for our extensions.

Revision history for this message
su_v (suv-lp) said :
#9

On 2014-06-12 13:07 +0100, Windell Oskay wrote:
> I am absolutely willing to continue to follow up here and perform any
> tests that might help elucidate the issue, just in case this is
> something that other people might run into.

This would be much appreciated (right now, I'm unfortunately out of
ideas how to proceed, and short of time - it would be great though if
you could follow-up in case of any new insights. I'll do the same in
case I come across similar reports wrt Inkscape 0.48.2 and Yosemite
elsewhere …)

Sorry for the delayed response, and thanks a lot for the feedback about
the experimental osxmenu build!

Revision history for this message
Jesse Warren (jessestrutz) said :
#10

I AM CLEARLY NOT AS TECH SAVVY AS YOU GENTLEMAN. BUT I'LL GIVE THIS A GO...

IN TRYING TO DOWNLOAD INKSCAPE, I WAS LED HERE...

http://inkscape.org/en/download/mac-os/

WHICH ASKS ME TO DOWNLOAD XQUARTZ (2.7.6)...
--------------
Download Latest stable version (0.48.2)

Installation
Download and install XQuartz from xquartz.macosforge.org Specific instructions on installing XQuartz and support are found at the XQuartz web site. Note: Inkscape runs on XQuartz. This step and the next are required.
Restart or Log out/in to complete the XQuartz installation.

(AND THIS IS WHERE I RUN INTO THE PROBLEM AS INKSCAPE DOESN'T SHOW UP ANYWHERE)

Add Inkscape to your Applications folder.
Run Inkscape. A prompt will ask about the location of X11. Point to XQuartz in your Applications directory. Note: This first launch of Inkscape can take a while because it will cache fonts installed on your system.
----------

I'M RUNNING -- IOS 10.7.5
I DOWNLOADED -- XQUARTZ 2.7.6

I'VE TRIED RESETTING, LOGGING OUT/IN A FEW TIMES...

I NOTICED EVERY TIME I CLICK THE XQUARTZ ICON IT BRINGS UP X11 AT THE TOP, WHICH IS HOW I FOUND THIS FORUM.

I ALSO DOWNLOADED AN X11 UPDATE, LOGGED OUT/IN BUT THAT DIDN'T WORK EITHER...

THOUGHTS?

~ JW

Revision history for this message
Windell Oskay (windell) said :
#11

JW,
This sounds like an unrelated issue.

Did you actually download and install Inkscape itself, in addition to XQuartz?

Revision history for this message
Jesse Warren (jessestrutz) said :
#12

I didn't, only because it wasn't listed under the instructions

Revision history for this message
Jesse Warren (jessestrutz) said :
#13

Oy... So I just tried downloading Inkscape and it worked. I feel very stupid. But in my defense, the instructions didn't say that I needed to redownload Inkscape which uses the same icon as XQuartz. Very confusing for non-techs like me. =/

Thanks for your help, WO. =)

Revision history for this message
su_v (suv-lp) said :
#14

@Windell Oskay - could you try a new X11-based build of the latest stable bug-fix release 0.48.5?

See <http://thread.gmane.org/gmane.comp.graphics.inkscape.devel/43946/focus=44019> for a (temporary) download link.

Revision history for this message
Liam P. White (liampwhite) said :
#15

Can you run, in a separate terminal:
$ Xephyr :2
This should pop open XQuartz with a small nested X session.

Then in another terminal,
$ export DISPLAY=:2
$ /Applications/Inkscape.app/Contents/Resources/script

And see if that runs?

Revision history for this message
Windell Oskay (windell) said :
#16

@~suv: This version (linked from thread) appears to launch and run perfectly and reproducibly on my system (OSX 10.10 beta). (I have not tested every function, but everything that I have tested appears to work correctly.)

@Liam P. White: This does not run.

$ Xephyr :2

Fatal server error:
failed to create root window

However,
$ /Applications/Inkscape.app/Contents/Resources/script

does work (without the additional display commands), with this new version (0.48.5 build linked above).

Revision history for this message
Liam P. White (liampwhite) said :
#17

Can you try a beta version of XQuartz from here and see if Xephyr works then?

http://xquartz.macosforge.org/trac/wiki/X112.7.7

Revision history for this message
Windell Oskay (windell) said :
#18

With beta XQuartz, not immediately clear that there is a difference.

$ Xephyr :2

Fatal server error:
failed to create root window

Revision history for this message
Liam P. White (liampwhite) said :
#19

What about Xnest?

$ Xnest :2

Revision history for this message
Windell Oskay (windell) said :
#20

Xnest does appear to launch and work correctly.

Revision history for this message
Roland King (rols-x) said :
#21

Hello - I just wanted to chime in with a 'me too' on this one. I am also running OSX 10.10, I also upgraded XQuartz (in my case because the upgrade to Yosemite broke it and reinstall was the easiest) and I too got the 'cannot open display: /private/tmp/com.apple.launchd.FnOLPmXEo5/org.macosforge.xquartz:0'.

I confirmed that there's a domain socket there, I confirmed xterm works with that as DISPLAY, and xeyes and so does Wireshark come to that, so that does seem to be the correct DISPLAY variable. I applied all and everything I ever knew about X11 to trying to get it to work, or work out why it wasn't working, and got nowhere.

The only vague hint i find is in the console where, I believe each time I tried to run it, I got the following

Inkscape: BUG in libdispatch: 14A298i - 993 - 0xe

That doesn't however say Inkscape crashed or didn't, it may just be a log message.

I also grabbed the 0.48 package from that temporary link and it's working just fine for me too.

Revision history for this message
Liam P. White (liampwhite) said :
#22

@Roland that's now the official 0.48.5 package. I'm going to take that down soon as the proper download is now on Sourceforge.

Still not sure what causes this bug (probably something Apple has to fix in Xquartz).

Revision history for this message
Liam P. White (liampwhite) said :
#23

@Windell Oskay

So now that you've verified Xnest works, can you run the 0.48.2 bundle into it?

Xnest :2 &> /dev/null &
DISPLAY=:2 ~/Applications/Inkscape-0.48.2.app/Contents/Resources/script
(or whatever yours is)

Revision history for this message
Windell Oskay (windell) said :
#24

@Liam P. White:

Yes, Inkscape 0.48.2 does appear to run correctly in Xnest.

Revision history for this message
Matt B (matty-brennan) said :
#25

Since Inkscape isn't signed by an Apple "identified developer," it may be worth telling OS X to ignore that. Under
System Settings - Security & Privacy - Allow apps downloaded from:

Choose "Anywhere"

Revision history for this message
su_v (suv-lp) said :
#26

@Matt B. - see
http://wiki.inkscape.org/wiki/index.php/FAQ#Apple.27s_new_GateKeeper_security_feature_may_prevent_Inkscape_from_opening

(you can bypass the Gatekeeper feature on a per-application basis too).

Revision history for this message
darvids0n (darvids0n-deactivatedaccount) said :
#27

Just chiming in here with similar issues: I had this problem opening Dia recently but using Xephyr it renders the output correctly in the Xephyr window. Seems like this isn't an Inkscape-only issue, perhaps a Yosemite/XQuartz one.

Revision history for this message
Adam Keck (ghostis) said :
#28

I just upgraded to 10.10 from 10.7 and am encountering this issue. I think the issue lies in the interaction between the ".app" wrapper for Inkscape and 10.10. I'm using the latest Inkscape and the latest XQuartz as of this post. I did find a work-around that allows me to use Inkscape, though. In XQuartz, I selected "Customize..." from the "Applications" pull down menu. I then clicked "Add Item". I named the item "Inkscape" and put "/Applications/Inkscape.app/Contents/Resources/bin/inkscape" in the "Command" field. I also added a hot key ("i"). Now, I can at least use Inkscape by selecting it from the "Applications" menu of "XQuartz".

Revision history for this message
Adam Keck (ghostis) said :
#29

Aha! Fixed it (for me at least ;-) ). Try running: launchctl load -w /Library/LaunchAgents/org.macosforge.xquartz.startx.plist

Can you help with this problem?

Provide an answer of your own, or ask Windell Oskay for more information if necessary.

To post a message you must log in.