Can't add keyboard shortcuts if /home/user/.config/keys folder doesn't exist

Bug #1719629 reported by Hachmann on 2017-09-26
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Patrick Storz

Bug Description

Self-compiled on LM18.2 from official source for 0.92.2

When I try to add or edit a keyboard shortcut via Edit > Preferences > Interface > Keyboard shortcuts, the entered shortcut is not accepted and the field is blank again after I hit Enter.

What was necessary was to add the 'keys' folder into my Inkscape user config directory.

I think Inkscape should try to create that directory if it doesn't exist, instead of failing silently.

Patrick Storz (ede123) wrote :

Confirmed on Windows 7 x64 with Inkscape 0.92.2 (5c3e80d, 2017-08-06)

Errors logged on the console:
** (inkscape.exe:876): WARNING **: Can't open file: C:\Users\Username\AppData\Roaming\inkscape\keys\default.xml (doesn't exist)
** (inkscape.exe:876): WARNING **: Unable to read keyboard shortcut file C:\Users\Username\AppData\Roaming\inkscape\keys\default.xml
** (inkscape.exe:876): WARNING **: Unable to create keyboard shortcut file C:\Users\Username\AppData\Roaming\inkscape\keys\default.xml

Should probably be easy to fix.

tags: added: shortcuts
Changed in inkscape:
status: New → Confirmed
importance: Undecided → Low
summary: - Linux: Can't add keyboard shortcuts if /home/user/.config/keys folder
- doesn't exist
+ Can't add keyboard shortcuts if /home/user/.config/keys folder doesn't
+ exist
Hachmann (marenhachmann) wrote :

Thanks for testing on Windows, Eduard!

Hachmann (marenhachmann) wrote :

(btw. the folder doesn't appear to exist by default, so adding/editing keyboard shortcuts would then be impossible for anyone who doesn't know about the workaround)

Patrick Storz (ede123) wrote :

I'll have to check that... I know I never created one myself (and usually I *am* able to use custom shortcuts) so something or somebody creates that folder for me on the systems I use.

As it does not seem to be the installer it must be Inkscape itself (but maybe it creates the whole directory structure in the user's home directory as a whole and fails to detect if only a single subfolder is missing)

Hachmann (marenhachmann) wrote :

For me, by default, the folder is empty apart from the extension error log and the preferences file.

Perhaps it's an issue with my packaging, though, don't know (but even if it is, then Inkscape should be able to create the full path).

Patrick Storz (ede123) wrote :

I already got a fix in line (I'm about to commit the branch for review) that will fix this issue as well as some similar issues (given it does not create any regressions).

That being said Inkscape is supposed to create the whole directory structure in "/inkscape" (including "keys" folder on first start if a "preferences.xml" is missing, see [1].
Might it be you already (only) had the "preferences.xml" for some other reason (e.g. copied manually)? In that case the necessary folders are *not* created (which could cause additional issues), so it might be helpful if you could check for other issues of the kind.


Patrick Storz (ede123) wrote :
Changed in inkscape:
assignee: nobody → Eduard Braun (eduard-braun2)
Hachmann (marenhachmann) wrote :

Yes, sorry, upon closer inspection, this must be an issue with me using a separate profile directory for each version I compile (

It's not compiled into the binary (and probably the ./config/inkscape directory is hardcoded), but modified later by calling Inkscape with the corresponding parameter... Please ignore that part!
It's nonsense to expect Inkscape to create a whole directory tree in just any directory given as PROFILE_DIR.

Just tested on a standard Ubuntu with 0.92.2 from ppa, all directories are created. Sorry again! I forgot...

Hachmann (marenhachmann) wrote :

And: Thank you!

Patrick Storz (ede123) wrote :

Well, while certainly not a common scenario Inkscape should not struggle with it.

I could certainly imagine use cases where one would want to start with a "fresh" profile and a minimal preferences.xml. Deleting any file or folder in the profile directory should be non-fatal in my opinion.

Patrick Storz (ede123) wrote :

Committed to master in

I'll backport to 0.92.x if no regressions are found.

Changed in inkscape:
milestone: none → 0.93
status: Confirmed → Fix Committed
tags: added: backport-proposed
Hachmann (marenhachmann) wrote :

Thank you very much, Eduard!

Patrick Storz (ede123) wrote :
tags: removed: backport-proposed
Changed in inkscape:
milestone: 0.93 → 0.92.3
Bryce Harrington (bryce) on 2018-05-12
Changed in inkscape:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers