inkscape command line, where is it on mac?

2020-05-18 08:10发布

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?

3条回答
欢心
2楼-- · 2020-05-18 08:23

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

/Applications/Inkscape.app/Contents/Resources/bin/inkscape-bin --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/Resources/bin/inkscape-bin \
      /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

查看更多
太酷不给撩
3楼-- · 2020-05-18 08:25

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.

查看更多
一夜七次
4楼-- · 2020-05-18 08:37

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.

查看更多
登录 后发表回答