4

I would like to change the default Export As file path in Inkscape from /home/orschiro/ to /home/orschiro/Downloads`.

Screenshot:

Screenshot Export As Dialog

orschiro
  • 13,317
  • 17
  • 87
  • 161

3 Answers3

2

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
  • Thanks, it works when adding the attribute in the top-level tag indeed, and not with the other inkscape: attributes in the namedview more below. – hsandt Oct 05 '22 at 10:15
  • In addition, if you want to see it listed in File > New from Template... you can specify template info with inkscape:templateinfo at the end, but the most simple is to File > Save Template... and fill metadata to see how it generates the file. Also remember to rename your template .svg appropriately, preferably matching Name metadata. Note that you can always open an svg template directly. If like me, you need one export path per project, then I'd recommend a different approach: create the Inkscape file near the wanted export location, and export files with relative path (no starting slash). – hsandt Oct 05 '22 at 10:21
  • In Inkscape 1.1.2 the path can be relative; ie you can put foo.png, or foo/bar.png and it works well – brunetton Nov 07 '22 at 15:10
0

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.

-2
  1. Open the file "C:\Program Files\Inkscape\share\templates\default.svg".

  2. Make one simple geometric path in the page, for example a square.

  3. Select the file path that you want to be the default in the "Export PNG Image" panel and execute the export.

  4. Delete the geometric path that you previously created, so the document becomes completely blank back again.

  5. 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.

Zanna
  • 70,465
  • 2
    You're at the AskUbuntu site and as such you should assume users are running Ubuntu, not Windows (if they aren't then it's off-topic and all those questions are dealt with accordingly in due time). Now please, either correct your answer or delete it. –  Apr 15 '17 at 21:14