After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 522811 - Evince doesn't match XDG FreeDesktop directories specs
Evince doesn't match XDG FreeDesktop directories specs
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
2.30.x
Other All
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
: 532616 (view as bug list)
Depends on:
Blocks: 523057
 
 
Reported: 2008-03-16 19:03 UTC by antistress
Modified: 2010-10-10 08:57 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Use XDG base dirs (2.19 KB, patch)
2008-10-14 18:18 UTC, Robin Sonefors (ozamosi)
none Details | Review
Use XDG base dirs (5.12 KB, patch)
2008-10-14 20:34 UTC, Robin Sonefors (ozamosi)
needs-work Details | Review

Description antistress 2008-03-16 19:03:02 UTC
Please describe the problem:
I found that Evince 2.22 (Ubuntu Hardy alpha 6) places its files in .gnome2/evince/
which doesn't match FreeDesktop directories specs :

The default for $XDG_CONFIG_HOME is $HOME/.config, the default for
$XDG_DATA_HOME is $HOME/.local/share. So all applications should look for those
environment variables and use those default values if the variables are not
set.

See http://www.freedesktop.org/wiki/Specifications/basedir-spec
See also
- http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data
(main post and comment#8)
- http://www.aigarius.com/blog/2007/01/10/fhs-extension-for-user-home-folders/


Steps to reproduce:
1. 
2. 
3. 


Actual results:


Expected results:


Does this happen every time?


Other information:
Comment 1 Carlos Garcia Campos 2008-05-13 08:00:51 UTC
*** Bug 532616 has been marked as a duplicate of this bug. ***
Comment 2 Robin Sonefors (ozamosi) 2008-10-14 18:18:58 UTC
Created attachment 120582 [details] [review]
Use XDG base dirs

Use ~/.gnome2/evince/ if it already exists, otherwise use $XDG_CONFIG_HOME/evince/.

If $XDG_CONFIG_HOME/evince/ exists, put accels there, otherwise fall back to the old behavior.

I'm not sure if the fact that it puts the accels in ~/.gnome2/accelsevince and not ~/.gnome2/accels/evince is a bug or not - I left that the way it was.
Comment 3 Christian Persch 2008-10-14 19:02:13 UTC
Personally I think ev-metadata.xml belong more into XDG_CACHE_HOME than XDG_CONFIG_HOME ...
Comment 4 Robin Sonefors (ozamosi) 2008-10-14 19:41:20 UTC
You're right.

Would the same be true for the accels file? I'm not perfectly clear on exactly what it's used for.
Comment 5 Christian Persch 2008-10-14 20:01:15 UTC
It's used by the in-place menu accelerator editing to store the settings. I guess it can be considered user conf data, for XDG_CONFIG_HOME.
Comment 6 Robin Sonefors (ozamosi) 2008-10-14 20:34:33 UTC
Created attachment 120599 [details] [review]
Use XDG base dirs

Put ev-metadata.xml in XDG_CACHE_HOME instead.
Comment 7 antistress 2008-11-16 22:45:03 UTC
it would be great if evince could be XDG Base Directory spec compliant for 2.26
Comment 8 Jason 2009-11-11 03:27:31 UTC
seems evince still using ~/.gnome2/evince to store files. evince 2.28
Comment 9 Jean-François Fortin Tam 2010-05-03 16:50:51 UTC
Um, can the patch be committed? What's holding it back?
Comment 10 Christian Persch 2010-05-03 17:12:12 UTC
Comment on attachment 120599 [details] [review]
Use XDG base dirs

It's totally bitrotten.

This code now lives in shell/ev-application.c.

I think the ordering of the fallback from .gnome2/evince to XDG_CONFIG_DIR/evince is wrong. It should be the other way; that is default to the XDG conformant one, and only fall back to the old one if XDG one doesn't exist, and the old one does exist.
Comment 11 Carlos Garcia Campos 2010-10-10 08:57:24 UTC
Fixed in git master