Showing posts with label Environment variable. Show all posts
Showing posts with label Environment variable. Show all posts

Saturday, March 14, 2009

Are XDG Folders Important?

I've written about the XDG specs several times before (and had debates over them). The most conspicuous XDG folders are the ones in your Places menu -- Documents, Pictures, Videos, etc. (possibly localized for you by xdg-user-dirs) -- but they aren't the only ones the XDG specification covers. Application information like data, cache, and configuration is also covered. Ploum writes:
Your application should not have its own folder anymore (and should not use another software hidden folder like .gnome2).
User data should go into $XDG_DATA_HOME (which default to .local/share), user preferences should go into $XDG_CONFIG_HOME (which default to .config) and cached data should go to $XDG_CACHE_HOME (which default to .cache).
Of course, there's no need to read the environment variable yourself : most language provide a library to use XDG folder. For example a patch for a GTK application or one for a python application.
-- Modify your application to use XDG folders - Where is Ploum ?

There's a nice discussion at the linked blog. I disagree with some posters' view that XDG goes against Unix history. I think the spec is well though-out and helps everyone know where to find stuff, which is difficult with a bunch of dot files and directories in $HOME. Is Rhythmbox config in .rhythmbox? No, it's in .gnome2/rhythmbox. Ugh. If you are interested in the details of this spec and how it's evolving, you should  join Freedesktop.org's XDG mailing list.




Reblog this post [with Zemanta]

Other I' Been to Ubuntu Stories

Related Posts with Thumbnails