← Back to team overview

zim-wiki team mailing list archive

Win32: configuration path



I run zim-0.57 from source on XP, and I arranged/mapped some topics
with appropriate PDF file links, then discovered that I can even
customize which application handles the link. Great!

However, the path to my custom application had spaces in it, and it
failed to launch. OK, figured that and opened "Configure applications"
dialog, but can't change already defined application, so I added new
one and surrounded path in quotes. Done, but there is no function to
remove already defined faulty application, so now I have two "Open
with..." functions with same name.

I started to look for file that stores this data. None in zim source
folder and subfolders, so I thought to look in my "home"
(%USERPROFILE%) folder. To my surprise Zim doesn't create it's own
folder in my "home" folder, but it just writes directly in it. This is
not so good. From available folders in my "home" folder I looked which
are used by Zim. Found some but no trace of the file I was looking

Open "applications.py" to see what Zim is doing while setting custom
application. It writes data to
"XDG_DATA_HOME.file('applications/defaults.list')". OK, at least I
have the name of file and info about the folder name in which it
resides. After a while I found that wanted file is stored in:
%USERPROFILE%\.local\share\applications. These folders are created and
used only by Zim, although I do use other cross-platform application

Now I have a suggestion: If you are willing to change this behavior
for Windows users and their special folders
(http://en.wikipedia.org/wiki/Special_folder), please don't use just
%USERPROFILE% aka "os.path.expanduser('~')", as that's *nix setting.
Appropriate folder for storing application related data is set in env
variable %APPDATA%. Location for local application data which could
pair XDG_DATA_HOME, is not set in env variable in Windows XP, but it
is in Windows 7. Maybe you can just set XDG_DATA_HOME to
"%APPDATA%\zim" or use some instrument to reveal it for both XP/7/...


Follow ups