Launch Inkscape by specifing a preference.xml file

Registered by Corentin Brulé on 2017-08-03

In bash launching, it would be interesting to have an option to specify a preference file with opening Inkscape session.
Many parameters are editable for specific usage. But the graphical interface "edit > preference..." is just effective for the current session and editing the "preference.xml" file ("~/.config/inkscape/" on Debian) applies to all user sessions.

1) Open or create graphic file with special interface parameters for specif usage can be comfortable and have this environment in a file is the must nomadic.
2) In a command line usage, some output comportments are related to this file. It's now impossible to parametrize this output setting without edit the user config file (and change the comportment definitively).

Examples in fact :
$ inkscape --preference-file=my_preference.xml file.svg
$ inkscape --preference-file=my_preference.xml --verb=EditSelectAll --verb=SelectionSimplify --verb=FileSave --verb=FileQuit file.svg

So, to create a particular xml file, a possible way is use the graphical window ("edit > preference...") and export from it.

Finally, to have a powerful command line interface, it must be interesting to have an option to specify a value of precise parameter.

For example, if I want open one Inkscape session with the grid in px ('options.grids.units="px"' in the xml) :
$ inkscape --specify-parameter options.grids.units="px" file.svg

or save a file after command line manipulation with absolute svg path ('options.svgoutput.pathstring_format="0"' in the xml) :
$ inkscape --specify-parameter options.svgoutput.pathstring_format="0" --verb=FileSave --verb=FileQuit file.svg

I joyfully discover the power of inkscape in command line and I think that each improvement offers thousands of new possible uses.

Thanks for reading :)

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Corentin Brulé
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.