I would like to change the default Export As file path in Inkscape from /home/orschiro/
to /home/orschiro/Downloads`.
Screenshot:
The export path is stored in your SVGs. Not only that, when you launch Inkscape, it opens one of the bundled empty 'template' SVGs. You can edit the template to override the default export path.
For now I'm assuming your Inkscape opens the default template and not one of the many internationalized versions.
Make a copy of the bundled template (you may need to mkdir some):
cp /usr/share/inkscape/templates/default.svg ~/.config/inkscape/templates/default.svg
Edit with your favorite editor:
nano ~/.config/inkscape/templates/default.svg
Add a new attribute (inkscape:export-filename
) to the top-level SVG tag. e.g:
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://web.resource.org/cc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
inkscape:export-filename="/your/desired/absolute/path/"
width="210mm"
height="297mm"
viewBox="0 0 210 297">
<defs />
<sodipodi:namedview
Following the logic of a programmer, it makes some sense to use a "default" blank template file to open as a "new file". There is a README file in the folder elusuario mentioned in his post, and it reads:
A template may store any document-specific settings (such as initial zoom and view, paper size, background and borders, metadata, window geometry, grid and guide settings, export hints) as well as any objects.
Unfortunately I tried this on Windows and it did not work. I doubt it is related to the operating system (given this is an Ubuntu forum), as the code to open a template file should be pretty much the same regardless of the operating system.
Open the file "C:\Program Files\Inkscape\share\templates\default.svg".
Make one simple geometric path in the page, for example a square.
Select the file path that you want to be the default in the "Export PNG Image" panel and execute the export.
Delete the geometric path that you previously created, so the document becomes completely blank back again.
Save the default.svg file (if it doesn't let you save, you should modify the "C:\Program Files\Inkscape\share\templates\" folder permission settings accordingly for you to have permission to save in that location).
That is what I did. Next time you open Inkscape, you should have the path you used to export at the "Export PNG Image" panel as the default path for new files in that panel.
foo.png
, orfoo/bar.png
and it works well – brunetton Nov 07 '22 at 15:10