Opened 5 years ago

Last modified 3 years ago

#1857 reopened defect

Application not conforms XDG Base Directory Specification

Reported by: wolfram@… Owned by: reimar
Priority: normal Component: core
Version: unspecified Severity: normal
Keywords: Cc: faispasierch@…
Blocked By: Blocking:
Reproduced by developer: Analyzed by developer:

Description

mplayer uses ~/.mplayer to save configuration files, but it's significantly better to use $XDG_CONFIG_HOME environment variable if it is defined

Look at http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html for details

Change History (5)

comment:1 Changed 4 years ago by faispasierch@…

  • Cc faispasierch@… added
  • ping

comment:2 Changed 4 years ago by reimar

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

Besides such a move involving significant effort, both code wise and in ensuring users are informed, a far more basic issue is that the "specification" you link to misses even the basic parts like defining the intended scope.
The name "XDG" suggests it should be related to X - in which case it wouldn't be a good idea to use for MPlayer, while it can make use of X, it does not necessarily.
Not to mention what to do on completely different operating systems like *BSD, OSX and Windows.
Anyone who really wants the settings somewhere else can still set MPLAYER_HOME to whatever directory desired.

comment:4 Changed 3 years ago by reimar

Fine, let's just discuss the practical stuff (none of those links seem to address my questions).
What would be a reasonable strategy to switch that does not break things for all current users?
Where should each file that is currently in .mplayer go?
"skins" for example, is that configuration? User data (it is never written by MPlayer).
What about "registry" (for binary codecs)? It contains configuration data, but it also can contain registration keys/passwords etc.
If someone can come up with a good design and convincingly argue for it so I don't have to do any of the thinking I might just take a bit of time at some point and implement it.

comment:5 Changed 3 years ago by faispasierch@…

What would be a reasonable strategy to switch that does not break things for all

current users?

Just continue to use .mpalyer dir if exits, but if not exist use/craete xdg dirs.
A lot of apps have chosen this solution to preserve bacward compatibility.

"skins" for example, is that configuration? User data (it is never written by
MPlayer).

"skins" can be seen as configuration for windows, thus put them in $XDG_CONFIG_HOME

What about "registry" (for binary codecs)? It contains configuration data, but >it also can contain registration keys/passwords etc.

If you remove the .config folder, the user will see all the preferences reset to the default but without any data loss. So "registry" cannot be saved in .config dir because of data loss. Put it in $XDG_DATA_HOME

Where should each file that is currently in .mplayer go?

config, gui.conf, gui.history should got to $XDG_CONFIG_HOME/mplayer
gui.pl and gui.url should go to $XDG_DATA_HOME/mplayer (or maybe $XDG_VIDEOS_DIR)

Note: See TracTickets for help on using tickets.