How to run --verb commands ?

Asked by Geoffrey

I am trying to run some commands to do some simple treatment on a file. Basically just put it in grayscale.

However if I run without the -g flag, I get errors saying the verbs are ignored without gui :

inkscape -f file_1454436983_4.svg --verb EditSelectAll --verb org.inkscape.color.grayscale --verb FileSave --verb FileClose

Gives :

WARNING: ignoring verb EditSelectAll - GUI required for this verb.

** (inkscape:26217): CRITICAL **: static void Inkscape::EditVerb::perform(SPAction*, void*): assertion 'ensure_desktop_valid(action)' failed
WARNING: ignoring verb org.inkscape.color.grayscale - GUI required for this verb.

** (inkscape:26217): CRITICAL **: static void Inkscape::Extension::Effect::EffectVerb::perform(SPAction*, void*): assertion 'ensure_desktop_valid(action)' failed
WARNING: ignoring verb FileSave - GUI required for this verb.

** (inkscape:26217): CRITICAL **: static void Inkscape::FileVerb::perform(SPAction*, void*): assertion 'ensure_desktop_valid(action)' failed
WARNING: ignoring verb FileClose - GUI required for this verb.

** (inkscape:26217): CRITICAL **: static void Inkscape::FileVerb::perform(SPAction*, void*): assertion 'ensure_desktop_valid(action)' failed
terminate called after throwing an instance of 'Inkscape::Extension::Output::save_failed'

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.

Aborted

So I searched for this error and discover you can force the gui with -g. However, I'm running this on a VPS which doesn't have a graphical interface and if I run with -g I get this :

(inkscape:26237): Gtk-WARNING **: cannot open display:

I tried running :

sudo yum groupinstall "X Window System" "Desktop" "Desktop Platform"

But that did not help. Still the same error.

inkscape -V

Gives :

Inkscape 0.91 r13725 (Jan 26 2016)

What could be missing for this to work ? Is the GUI really necessary for this ?

Question information

Language:
English Edit question
Status:
Invalid
For:
Inkscape Edit question
Assignee:
No assignee Edit question
Solved by:
johnc
Solved:
Last query:
Last reply:
Revision history for this message
Hachmann (marenhachmann) said :
#1

Hi Geoffrey,

I can confirm this...
inkscape -z -f drawing.svg --verb=EditSelectAll
results in the same error message.

Some searching turned up this post by ~suv:
http://www.inkscapeforum.com/viewtopic.php?t=12155#p45071

which links to this bug report:
https://bugs.launchpad.net/inkscape/+bug/843260

and in the specific forum thread case, the solution was to install https://en.wikipedia.org/wiki/Xvfb as a workaround.

Kind regards,
 Maren