Opened 10 years ago

Last modified 8 years ago

#262 reopened enhancement/feature request

conform to the freedesktop XDG user directories specification

Reported by: Kiddo Owned by: KaZeR
Priority: minor Milestone: version 0.2.0
Component: core Version: git master
Severity: Keywords: maintainability data persistence
Cc:

Description

As navit's settings autosave is a young/unimplemented feature at the moment, now is the time to make sure that you get the user data directory locations "done right" from the start.

See this Freedesktop spec: http://standards.freedesktop.org/basedir-spec/latest/
Especially: http://standards.freedesktop.org/basedir-spec/latest/ar01s03.html

I first heard about the xdg desktop dirs thing through this post, which does a good job at explaining the issue/challenges that this spec addresses: http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

So, for example, navit would store files like this:

  • $XDG_CACHE_HOME/navit/center.txt
  • $XDG_CACHE_HOME/navit/destinations.txt

- $XDG_DATA_HOME/navit/maps/

  • $XDG_CONFIG_HOME/navit/bookmarks.txt

- $XDG_CONFIG_HOME/navit/various_ui_and_routing_preferences.txt

... with their respective fallbacks (as described in the specs), of course. And the ones in italics are examples of potential files for future autosaved settings.

Change History (4)

comment:1 Changed 10 years ago by Singesang

  • Milestone set to version 0.2.0
  • Type changed from defect/bug to enhancement/feature request

comment:2 Changed 10 years ago by KaZeR

  • Priority changed from major to minor

In fact i wonder if seperating the cache, data and config folder is really needed for navit, given the low number of files we have to store. I personnaly rather have everything related to navit in ~/.navit, i think it's more convenient.

Open for discussion.

comment:3 Changed 8 years ago by kazer

  • Resolution set to wontfix
  • Status changed from new to closed

No updates in 18 months, i'm closing. Please reopen if you disagree with my previous comment.

comment:4 Changed 8 years ago by kiddo

  • Resolution wontfix deleted
  • Status changed from closed to reopened

I do disagree, the whole point of the XDG user dirs is that 1) apps all store their stuff into three standard locations instead of having a million of .$appname directories in the homedir 2) users can more easily determine what is important and what isn't (be able to purge only the cache of all apps, or backup only the config dir, etc).

The fact that you don't have lots of files in those directories doesn't really matter. For example, pitivi's .config/pitivi dir has 4 files, .cache/pitivi has 170+ files, and .local/share/pitivi has only 4 files.

Note: See TracTickets for help on using tickets.