I have tried everything everyone said but still can't get Inkscape working on my iMac

Asked by Daniel

Hi there, like the subject header says, I am unable to get Inkscape up and running on my iMac (2.4 Ghz Intel Core 2 Duo, OSX 10.5.6). Well, that's not entirely accurate. I can't get it running on my account. I've created a new user to see if it might be something I've done to personalize and it runs just fine on the new account. Here's some more info: I've installed the latest X11 from the XQuarz website, I have installed Inkscape 0.46 and I've also tried two terminal command fixes described on the Inkscape wiki. The only way I can get Inkscape to run is by right-clicking on the Inkscape package, show package contents, contents, resources, openDoc (unix exe. file that Terminal does). When it opens I have all kinds of stuff wrong with the interface. Basically none of the fonts show up. Every font character is a box. And further, my terminal window is telling me there are all sorts of issues, but I can't really understand what it's telling me. I'll try to cut and paste some of what comes up, from the beginning until it all starts to look the same:

-----begin quoted text------

Last login: Fri May 8 11:30:33 on ttys000
daniel-lowerys-imac:~ Daniel Lowery$ /Applications/Inkscape.app/Contents/Resources/openDoc ; exit;
mkdir: /Users/Daniel: Permission denied
/Applications/Inkscape.app/Contents/Resources/bin/inkscape: line 69: /Users/Daniel Lowery/.inkscape-etc/pangorc: No such file or directory
/Applications/Inkscape.app/Contents/Resources/bin/inkscape: line 70: /Users/Daniel Lowery/.inkscape-etc/pango.modules: No such file or directory
cp: /Users/Daniel: No such file or directory
/Applications/Inkscape.app/Contents/Resources/bin/inkscape: line 73: /Users/Daniel Lowery/.inkscape-etc/gtk.immodules: No such file or directory
/Applications/Inkscape.app/Contents/Resources/bin/inkscape: line 75: /Users/Daniel Lowery/.inkscape-etc/gdk-pixbuf.loaders: No such file or directory

(inkscape-bin:873): Gtk-WARNING **: Locale not supported by C library.
 Using the fallback 'C' locale.

(inkscape-bin:873): Pango-WARNING **: error opening config file '/Users/Daniel Lowery/.inkscape-etc/pangorc': No such file or directory

(inkscape-bin:873): Pango-WARNING **: No builtin or dynamically
loaded modules were found. Pango will not work correctly.
This probably means there was an error in the creation of:
  '/opt/local/etc/pango/pango.modules'
You should create this file by running pango-querymodules.

(inkscape-bin:873): Pango-WARNING **: pango_shape called with bad font, expect ugly output

(inkscape-bin:873): Pango-WARNING **: pango_font_get_glyph_extents called with null font argument, expect ugly output

(inkscape-bin:873): Pango-WARNING **: pango_font_get_metrics called with null font argument, expect ugly output

(inkscape-bin:873): Pango-CRITICAL **: pango_font_describe: assertion `font != NULL' failed

(inkscape-bin:873): Pango-CRITICAL **: pango_font_description_set_size: assertion `desc != NULL' failed

(inkscape-bin:873): Pango-CRITICAL **: pango_font_description_get_family: assertion `desc != NULL' failed

(inkscape-bin:873): Pango-CRITICAL **: pango_font_description_get_style: assertion `desc != NULL' failed

-----end quoted text-----

From here, is just has more "Pango" fails. Any ideas what I could do? Oh, and I've tried the font fixes I thought might help from this forum, but nothing worked. Perhaps I missed something, though.

Thanks for your help

Daniel

Question information

Language:
English Edit question
Status:
Solved
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
Daniel
Solved:
Last query:
Last reply:

This question was reopened

Revision history for this message
Daniel (germandanny) said :
#1

Oh man, I just searched this forum for "pango" and found a guy with exactly the same issue. (https://answers.launchpad.net/inkscape/+question/49080) Sheesh... I've been looking around for help for about the last hour on various sites and it never occurred to me to search for "pango". Could someone please tell me how to run a pango-querymodule? Is this a bug, like mahifiaz said? I don't really know what to do from here. Thanks.

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

Hi Daniel,

Question #49080 is a different problem: Inkscape/OS X chokes when trying to read the System color preferences (Aqua or Graphite) to be able to adjust the inkscape theme colors.

In your case it seems to me, that the space in your account path is the culprit
(/Users/Daniel Lowery/). For whatever reasons the shell script 'openDoc' can't create the needed files in '/Users/Daniel Lowery/.inkscape-etc/'. That's why Pango can't find the required modules and creates those warnings.

My guess ist, your other (working) account has no space in its name?

Have you tried a newer version from <http://inkscape.modevia.com/macosx-snap/?C=M;O=D>?

Revision history for this message
Daniel (germandanny) said :
#3

~suv, thanks for your reply. Now could you please tell me how to change my home folder's name? When I try to rename it I get an message telling me I can't modify or delete it because my "Daniel Lowery is required by Mac OSX". You were right about my second account and also my laptop, both of which work fine—no spaces in the home folder name. That's probably it! Thanks so much for the tip. Now I guess I need just one more tip, please...

Revision history for this message
Daniel (germandanny) said :
#4

I tried the newer version. No dice. Same issues. Also, I found a thread on a Mac OSX forum for how to change my home folder's name. There is no way I want to do that. It seems way too much work for this problem. Thank you for your help, though, ~suv. I appreciate you pointing out the problem.

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

Changing your user name is no option, I know. At least it's a clue to
where the problem is!

This a situation that Inkscape ought to handle IMHO. Maybe you could
detail exactly what changes you tried before (were they related to fonts
/ .fontconfig?). A link to the web sources could be useful too.

Or go ahead and file a bug!

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

Have a closer look at '/Users/Daniel Lowery/' and at
'/Applications/Inkscape.app/', do you find a new folder called 'Lowery',
and inside an invisible directory '.inkscape-etc'?
You have to turn on 'invisible' files or use
'ls -al ~/Lowery' and 'ls -al /Applications/Inkscape.app/Lowery' in
Terminal.app.

the issue:

   mkdir -p ${HOME}/.inkscape-etc

expands to

   mkdir -p /Users/Daniel Lowery/.inkscape-etc

which in turn is read as two seperate arguments:

  mkdir -p /Users/Daniel
  mkdir -p Lowery/.inkscape/etc

If this is true, there's definitely a small bug in the shell script
'Inkscape.app/Contents/Resources/bin/inkscape': ${HOME} needs to be
escaped with quotes (a guess - I'm not an expert in shell scripts either).

I would suggest to use 'create a bug report' from the upper right menu -
this bug could be fixed right before 0,47 comes out. Oh, and add a tag
'osx', as this is a mac-only problem ;-)

Revision history for this message
JiHO (jiho) said :
#7

Hi Daniel,

Sorry not ot have picked that up earlier. First I have a question for you: how were you able to create a home folder with a space in it? Is that something you carried from previous versions of the system?
I tried to create a new account to reproduce the issue and Leopard does not let me input a space in the "short name" field, which is the one used to name the home folder.

Now I can still try and guess where the problem might be. Open Inkcape.app (show package content), navigate to Content/Resources/bin. Open the file named "inkscape" with a text editor (double clicking on it will try to execute it in a termianl so you have to drag and drop it on a text editor, or right-clik open with). Text Edit is OK.
Now, change lines 69 to 77 to:

mkdir -p "${HOME}/.inkscape-etc"
sed 's|${HOME}|'"$HOME|g" "$TOP/etc/pango/pangorc" > "${HOME}/.inkscape-etc/pangorc"
sed 's|${CWD}|'"$ESCAPEDTOP|g" "$TOP/etc/pango/pango.modules" \
    > "${HOME}/.inkscape-etc/pango.modules"
cp -f "$TOP/etc/pango/pangox.aliases" "${HOME}/.inkscape-etc/"
sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gtk.immodules" \
    > "${HOME}/.inkscape-etc/gtk.immodules"
sed 's|${CWD}|'"$TOP|g" "$TOP/etc/gtk-2.0/gdk-pixbuf.loaders" \
    > "${HOME}/.inkscape-etc/gdk-pixbuf.loaders"

That is, put double quotes around all the last parts ${HOME}/.inkscape-etc/something becomes "${HOME}/.inkscape-etc/something". Then try to double click the modifed Inkscape.app and let me know if that works.

Thanks for your patience.

Revision history for this message
Michael Wybrow (mjwybrow) said :
#8

I agree with JiHo, we weren't quoting the $HOME variable in a couple of places.

Also though, I remeber this problem from a couple of years ago and thing there might still be other issues... for example the file $HOME/.inkscape-etc/pangorc should get written as:

[Pango]
ModuleFiles=/Users/$USER/.inkscape-etc/pango.modules
[PangoX]
AliasFiles=/Users/$USER/.inkscape-etc/pangox.aliases

This didn't use to work if $USER had spaces in it, and there didn't used to be any form of quoting that was accepted by pango. This may have changed in more recent versions of pango? Anyway, if it still doesn't work with JiHo's suggestion, then this is probably the next place to look.

Revision history for this message
Daniel (germandanny) said :
#9

Hi JiHo and MIchael, thanks for your help on this as well. In response to your first question, I can't really remember how I created the home folder with spaces. I took a lot of stuff from my older MBP to the newer iMac, but I didn't just use the migration assistant. I think I set the iMac up this way, but my memory is real fuzzy (always is). Second, your Text Edit line replacement worked... sort of. I still have to go through the elaborate process I described in my first post to actually get the app to open (ie, double-clicking on it doesn't work for me still). But when go through the Terminal and click on "OpenDoc" it opens up for me and the fonts display correctly. So I guess it kind of works for me, but nothing like on my MBP or my other iMac account I set up where I just double-click on the Inkscape icon and it opens right up. Anyway, thanks again for your help.

Revision history for this message
Michael Wybrow (mjwybrow) said :
#10

What does Console.app say now when you try and open Inkscape via the icon?

Revision history for this message
Daniel (germandanny) said :
#11

I tried to do what you said with the Console.app open and this is what came up:

5/19/09 8:39:14 AM [0x0-0x11f11f].org.inkscape.Inkscape[2744] /Applications/Inkscape.app/Contents/Resources/script: line 46: test: /Users/Daniel: binary operator expected
5/19/09 8:39:14 AM [0x0-0x11f11f].org.inkscape.Inkscape[2744] /Applications/Inkscape.app/Contents/Resources/script: line 46: test: /Users/Daniel: binary operator expected
5/19/09 8:39:19 AM [0x0-0x11f11f].org.inkscape.Inkscape[2744] /Applications/Inkscape.app/Contents/Resources/script: line 46: test: /Users/Daniel: binary operator expected

Revision history for this message
JiHO (jiho) said :
#12

Open Inkcape.app (show package content), navigate to Content/Resources. Open the file named "script" with a text editor and quote the lines with HOME in them there too. i.e. lines 41 to 49 become:

 # Warn the user about time-consuming generation of fontconfig caches.
 test -f "${HOME}/.inkscape/.fccache-new" || exit 12
else
 # Leopard onwards...

 # Warn the user about time-consuming generation of fontconfig caches.
 test -d "${HOME}/.fontconfig" || exit 12
fi

In the end we'll get all of them right hopefully

Revision history for this message
JiHO (jiho) said :
#13

Oh and BTW, I committed this change already.

Revision history for this message
Daniel (germandanny) said :
#14

Oh man, it worked! Thank you so much for sticking with this. I really appreciate your help with all of this (and of course everyone else that helped, too!).

Revision history for this message
JiHO (jiho) said :
#15

On 2009-May-20 , at 08:29 , Daniel wrote:

> Oh man, it worked! Thank you so much for sticking with this. I really
> appreciate your help with all of this (and of course everyone else
> that
> helped, too!).

Glad it worked. Thanks for testing this, it helped the rest of
Inkscape users on OS X.

Revision history for this message
gwoods (gregjwoods) said :
#16

Just an FYI.

I had the same issue (version 0.46) and my short name does not have a space. However, I am mounting my home over the network and it maps to:

/Network/Servers/ca1/Volumes/Macintosh\ HD/Users....

"Macintosh HD" is the default name for the disk on iMacs and was carried forward when I upgraded to OS X Server.