Command line --verb options do not seem to work

Post questions on how to use or achieve an effect in Inkscape.
TpEnEpETE
Posts: 1
Joined: Sat May 26, 2012 4:44 pm

Command line --verb options do not seem to work

Postby TpEnEpETE » Sat May 26, 2012 5:10 pm

I just installed Inkscape 0.47 r22583 (Aug 21 2010) on a CentOS 6 system. I'm trying to learn how to use the command line with inkscape with mixed results. The program seems to work fine when exporting an SVG to PNG using the following comand:

Code: Select all

inkscape 12-WINGS-01.svg --export-png=result.png --export-id=Layer_1

This works exactly as intended. The resulting PNG contains the cropped layer "Layer_1". The problem arises when I try to issue the command from the tutorial which flips the layer vertically:

Code: Select all

inkscape --select=Layer_1 --verb ObjectFlipVertically --verb FileSave --verb FileClose 12-WINGS-01.svg

After executing this the input file remains intact with Layer_1 remaining unflipped. I tried something simpler:

Code: Select all

inkscape --verb EditClearAll --verb FileSave --verb FileClose 12-WINGS-01.svg

Still no change. Looks like I'm using the --verb option not the way I should or missing something.

Another issue I'm facing is I can't output the exported image to STDOUT. Tried the following:

Code: Select all

inkscape --print="> out.png" 12-WINGS-01.svg

...and...

Code: Select all

inkscape --print=">&1" 12-WINGS-01.svg

Both returning:

Code: Select all

Emergency save activated!
Emergency save completed. Inkscape will close now.
If you can reproduce this crash, please file a bug at www.inkscape.org
with a detailed description of the steps leading to the crash, so we can fix it.
** Message: Error: Inkscape encountered an internal error and will close now.

Segmentation fault (core dumped)


Please help!

~suv
Posts: 2272
Joined: Sun May 10, 2009 2:07 am

Re: Command line --verb options do not seem to work

Postby ~suv » Mon May 28, 2012 1:00 am

TpEnEpETE wrote:I just installed Inkscape 0.47 r22583 (Aug 21 2010) on a CentOS 6 system. I'm trying to learn how to use the command line with inkscape with mixed results. (…) The problem arises when I try to issue the command from the tutorial which flips the layer vertically:

Code: Select all

inkscape --select=Layer_1 --verb ObjectFlipVertically --verb FileSave --verb FileClose 12-WINGS-01.svg

After executing this the input file remains intact with Layer_1 remaining unflipped. I tried something simpler:

Code: Select all

inkscape --verb EditClearAll --verb FileSave --verb FileClose 12-WINGS-01.svg

Still no change. Looks like I'm using the --verb option not the way I should or missing something.
This mystery (the commands are correct and work with all recent Inkscape versions as expected) was solved on #inkscape (irc): turned out that the inkscape process was executed on a remote system with no $DISPLAY set (without X server). The solution was to install Xvfb there and use it for Inkscape commands which depend on the GUI (unlike other command line options, verbs ('--verb=') do not work '--without-gui', and in order to open the GUI, Inkscape (on linux) needs to be able to connect to a running X server (normal or virtual)).

See also:
TpEnEpETE wrote:Another issue I'm facing is I can't output the exported image to STDOUT. Tried the following:

Code: Select all

inkscape --print="> out.png" 12-WINGS-01.svg
(…)
Known bug: Bug #511361 “0.47 crashes when printing from command line (but not gui)

enryh
Posts: 1
Joined: Wed Nov 07, 2012 10:28 pm

Re: Command line --verb options do not seem to work

Postby enryh » Wed Nov 07, 2012 10:41 pm

I think I have a similar problem.

I would like to merge two objects (elipseA UNION elipseB), but I can't.

I tried using inkscape --shell and this option too:

Code: Select all

inkscape diagram.svg --select=elispseA --select=elipseB --verb SelectionUnion --export-png test.png

Am I doing it wrong? Or it will never work because of Inkscape command line limitations, or am I forgetting something?
I'm a newbie, :\

Thanks a lot
Henry


Return to “Help with using Inkscape”