48

This is a kinda silly question. I've installed Inkscape on my mac (Marvericks OS) following this page http://www.inkscape.org/en/download/mac-os/

I know there is a command line option with inkscape. I tried to type inkscape on Terminal and there is no such command. I'm confused... Does this mean that I need to install the linux version of inkscape in order to use the command line?

olala
  • 4,146
  • 9
  • 34
  • 44

3 Answers3

67

I have Inkscape installed in /Applications and running this from a terminal does the trick:

/Applications/Inkscape.app/Contents/MacOS/inkscape --help

Usage: inkscape-bin [OPTIONS...] [FILE...]

Available options:
  -V, --version                             Print the Inkscape version number

... etc.

For ease of use symlink it to /usr/local/bin i.e.:

ln -s /Applications/Inkscape.app/Contents/MacOS/inkscape \
      /usr/local/bin/inkscape

In general, on MacOS Inkscape needs to be called with an absolute path, and all files given as arguments should also be full paths. See also:

https://bugs.launchpad.net/inkscape/+bug/1449251

Alexander Pacha
  • 9,187
  • 3
  • 68
  • 108
Josh B
  • 1,748
  • 16
  • 19
  • I've tried this and it opened up the program... not something i want to do. – olala Feb 28 '14 at 02:53
  • This worked! But there are a lot error messages with other things. Another question, do I need to put this path in PATH to be able to invoke inkscape directly? – olala Feb 28 '14 at 04:15
  • adding `/Applications/Inkscape.app/Contents/Resources/bin/` to your path should let you run `inkscape -?`. The error messages can probably be ignored - not certain but I think they aren't as critical as they claim and actually occur when you run the app normally but you can't see them. – Josh B Feb 28 '14 at 04:50
  • 2
    You can add a shortcut to the normal location for such things. `ln -s /Applications/Inkscape.app/Contents/Resources/bin/inkscape /usr/local/bin/inkscape` This creates a symbolic link for inkscape to a folder already in the standard path – Scott Apr 09 '15 at 23:44
  • It should (now) be `/Applications/Inkscape.app/Contents/Resources/bin/inkscape-bin` - I've updated the answer to fix. – ocodo Apr 28 '15 at 03:53
  • 1
    inkscape-bin didn't work for me. then i found http://wiki.inkscape.org/wiki/index.php/MacOS_X, which says that an alias should be used `alias inkscape="/Applications/Inkscape.app/Contents/Resources/bin/inkscape"` – Adam Jul 28 '16 at 12:22
  • 8
    As of 2020, the location on the command line app is now `/Applications/Inkscape.app/Contents/MacOS/inkscape`. – Stan James Feb 05 '20 at 03:24
38

As of 2020, the executable on MacOS is now located at

/Applications/Inkscape.app/Contents/MacOS/inkscape

You can symlink it with:

ln -s /Applications/Inkscape.app/Contents/MacOS/inkscape \
  /usr/local/bin/inkscape

More info about command line usage here.

Stan James
  • 2,535
  • 1
  • 28
  • 35
  • 1
    When I create this symlink then try to use it I get the following error: `/usr/local/bin/inkscape: line 196: /usr/Contents/MacOS/inkscape-bin: No such file or directory /usr/local/bin/inkscape: line 196: exec: /usr/Contents/MacOS/inkscape-bin: cannot execute: No such file or directory` Any ideas? – colmjude May 07 '20 at 09:30
  • @colmjude don't type the "\" backslash in the command line. – GeneCode Aug 20 '20 at 07:30
3

I think some paths and filenames have changed over time and today you should add a symlink in /usr/local/bin to point to the bin directory of inkscape:

sudo ln -s /Applications/Inkscape.app/Contents/Resources/bin/inkscape /usr/local/bin/inkscape

Full credit to @Scott above who has this correct "answer" showing as a comment. This solution allows other subcommands of inkscape to work correctly, whereas creating an alias does not.

Lorna Mitchell
  • 1,819
  • 13
  • 22