Opened 11 years ago

Closed 11 years ago

Last modified 8 years ago

#4911 closed enhancement (wontfix)

Pidgin does not adhere to the freedesktop.org XDG Base Directory Specification

Reported by: timnik Owned by: lschiere
Milestone: Component: unclassified
Version: 2.3.1 Keywords:
Cc:

Description

The specification can be found at: http://standards.freedesktop.org/basedir-spec/latest/index.html

A agree with what aigarius.com says: Currently there is a huge mess of files and folders that start with a “.” in any users home folder. There is no structure or policy on how applications should choose file and folder names for data that needs to be stored in users home directory. Additionally there is no established consistency between Gnome, KDE and most other applications. Gnome application have part of their configuration information in gconf folder and other part in a gnome subfolder. KDE applications have a complex structure under .kde/. And most other applications either have one file directly in users home folder or have their own dot-folder there.

From the specification:

########################################## There is a single base directory relative to which user-specific data files should be written. This directory is defined by the environment variable $XDG_DATA_HOME.

There is a single base directory relative to which user-specific configuration files should be written. This directory is defined by the environment variable $XDG_CONFIG_HOME.

$XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used.

$XDG_CONFIG_HOME defines the base directory relative to which user specific configuration files should be stored. If $XDG_CONFIG_HOME is either not set or empty, a default equal to $HOME/.config should be used. ##########################################

The reasoning behind this is so that it's easy to remove config files while not affecting any user data. This is especially important when a user upgrades their OS, i.e. Ubuntu 7.10 -> Ubuntu 8.04, and wants to start with the default settings for their applications. It will also help organise the ever so horrid mess in the home folder.

A simple rule might be: Data for which there exists sane defaults, is config data. Data which should not be lost is user data.

i.e. settings such as whether or not the user wants tabs to be used in their IM windows are "CONFIG" values, where as usernames, passwords, and more importantly chat history are user "DATA".

Change History (7)

comment:1 Changed 11 years ago by rekkanoryo

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

This standard does precisely two things:

  • Relocate the mess of configuration and data files and directories
  • Split configuration and data into a million different places for no good reason.

This "specification" is a solution looking for a non-existant problem.

comment:2 follow-up: Changed 11 years ago by timnik

Every few months when I upgrade to the next version of my OS, I get the newest pidgin. I would like to have all my application settings reset so that I can take advantage of the latest sane defaults, should they have changed, and also to undo all the experimental mess of the last several months. Essentially, I would like to start with a clean install - but it's very important to me to not loose my account information like usernames, passwords and especially any history. This applies equally to all other programs. The specification, from what I understood, aims to separate this data, so all I would have to do is delete the $XDG_CONFIG_DIR and I would be safe, as all the personal information that should never be lost is kept in $KDG_DATA_DIR.

You're right about the home folder, it's a big mess. If it were to be separated into the two categories of user data and general config, then it would most certainly be much tidier than before and help me and all the other users to be able to keep the important non-replaceable data safe. I would like to be able to revert my settings back to the default without worrying about loosing anything.

Another blogger explains the issues from his own perspective and gives reasons for following the specification here: http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

Don't you think there is a very real problem here?

comment:3 in reply to: ↑ 2 Changed 11 years ago by rekkanoryo

Replying to timnik:

Essentially, I would like to start with a clean install - but it's very important to me to not loose my account information like usernames, passwords and especially any history. This applies equally to all other programs. The specification, from what I understood, aims to separate this data, so all I would have to do is delete the $XDG_CONFIG_DIR and I would be safe, as all the personal information that should never be lost is kept in $KDG_DATA_DIR.


There is a flaw in this argument--accounts are configuration data, thus accounts.xml would be stored in $XDG_CONFIG_DIR with prefs.xml. Simply wiping out $XDG_CONFIG_DIR would cause you to lose accounts. Restoring a default configuration without losing acounts would require deletion of only prefs.xml, as it does now. This standard serves no useful purpose in this case.


You're right about the home folder, it's a big mess. If it were to be separated into the two categories of user data and general config, then it would most certainly be much tidier than before and help me and all the other users to be able to keep the important non-replaceable data safe. I would like to be able to revert my settings back to the default without worrying about loosing anything.


Everyone who trumpets this specification and its benefits completely overlook one key factor--separating the configuration and data just relocates the mess and doubles it by requiring not just one directory, but two. While it may make $HOME "tidier" in the eyes of some, I would rather have 100 dot directories directly in my $HOME than be required to have a total of 202 directories in this specification's trees.


Another blogger explains the issues from his own perspective and gives reasons for following the specification here: http://ploum.frimouvy.org/?184-cleaning-user-preferences-keeping-user-data

Don't you think there is a very real problem here?


I do not. This blog post demonstrates nothing to me except that some developers are criminally stupid in how they store data when they don't follow the standard. It seems a pretty clear argument to me that developers need to use common sense when storing data instead of tossing random crap wherever they feel like.

comment:4 Changed 11 years ago by timnik

There is a flaw in this argument--accounts are configuration data, thus accounts.xml would be stored in $XDG_CONFIG_DIR with prefs.xml. Simply wiping out $XDG_CONFIG_DIR would cause you to lose accounts. Restoring a default configuration without losing acounts would require deletion of only prefs.xml, as it does now. This standard serves no useful purpose in this case.


Hmmm, when seeing it from this point of view you're right. I guess what I'm looking for is not in this specification after all. It's nice to know that all I have to do for pidgin is to delete the prefs file. I only wish it was this easy with other applications. I guess I'm looking for a consistent convention for separating general settings that have default values from settings that contain important user data such as account settings. It's a headache to go through each applications folder and try and figure out what conventions they're following, especially if you're having to go through 50+ applications.


I appreciate your feedback and agree that my proposed solution is not the right one. Thanks!

comment:5 Changed 11 years ago by Eidutrukan

"wontfix" is really mean. Are you really sure you want to boycott this specification? Just think, you could set $XDG_CONFIG_DIR and $XDG_DATA_HOME to $HOME, if you want. You also can suggest base directory variables you prefer for this specification.

comment:6 Changed 11 years ago by deryni

We (pidgin) cannot set them to anything, and we don't care what they actually point to. Read our comments again. Our issue is that we do not find the specification at all meaningful in its distinctions of data types for our purposes and that we do not agree that moving the configuration directories (and splitting them so as to require likely double the total number of directories) is in fact something useful (for us, and possibly in general).

Oh, and no 'wontfix' is not mean, it is simply an indication that we have no plans to fix this 'issue'.

comment:7 Changed 10 years ago by rekkanoryo

Ticket #9159 has been marked as a duplicate of this ticket.

Note: See TracTickets for help on using tickets.
All information, including names and email addresses, entered onto this website or sent to mailing lists affiliated with this website will be public. Do not post confidential information, especially passwords!