site  contact  subhomenews

Setting default path for Open and Save dialogs in Inkscape

September 07, 2019 — BarryK

In EasyOS, I want the Open|Save|Download dialog boxes to default to '/home' or some folder under '/home', not '/root'. The current directory before X starts, is set to '/home', which is good enough for most apps. But not all.

I reported on a fix for mtPaint:

http://bkhome.org/news/201909/request-to-change-default-path-in-mtpaint.html

Inkscape is an odd one. Even though it has a "Save to current directory" checkbox in Preferences, it is ignored, and always defaults to '/root'. Even after having saved or opened elsewhere, always defaults at '/root'.

I found a fix, it is to create /root/.config/inkscape/preferences.xml (nothing else in the folder), with this in it:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<inkscape
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1">
<group
id="dialogs">
<group
id="export"
default=""
append_extension="1"
path="/home/media">
<group
id="exportarea" />
<group
id="defaultxdpi" />
</group>
<group
id="save_as"
default="org.inkscape.output.svg.inkscape"
append_extension="1"
enable_preview="1"
path="/home/media"
use_current_dir="1" />
<group
id="save_copy"
default=""
append_extension="1"
enable_preview="1"
path="/home/media" />
<group
id="open"
enable_preview="1"
path="/home/media" />
<group
id="import"
enable_preview="1"
path="/home/media"
ask="1"
link="link"
scale="optimizeSpeed" />
</group>
</inkscape>

This was not documented anywhere, I just examined 'preferences.xml' and found all of these  empty path="" entries, so put something into them. Inkscape does not seem to support a global preferences.xml under /etc.

Tags: easy