Thursday, January 16, 2014

Inkscape attempts to show gui dialog during batch conversion

Attempting to convert an AutoCAD .dxf file to SVG with inkscape on a headless linux virtual host, the program crashes in a massive heap of text which appear to be trying to interact with the X display.
After installing Xvfb to see what it was displaying, I found this to be a file import setting dialog box asking about the scale of the image.

Looking in <inkscape home>/inkscape/extensions/dxf_input.inx there is a section specifiying the settings for this dialog. To bypass the display of the modal dialog, I commented out the entire section of <param> tags. This will reduce capability in the GUI version of the program but I am using it only for command line purposes on this project.

A better solution would be to accept the defaults when a headless display is detected or the -z argument is passed to inkscape.

No comments:

Post a Comment