VLC and the XDG Base Directory Standard

*nix specific usage questions
marinmo
New Cone
New Cone
Posts: 1
Joined: 02 Nov 2009 16:58

VLC and the XDG Base Directory Standard

Postby marinmo » 02 Nov 2009 17:18

According to the change log for 0.9, VLC (at least the Linux port) "now complies with the XDG Base Directory Standard". However, this is not the case of at least the HTTP interface. I wrote the information on access control on the wiki, and if the XDG standard had been followed, that information would've been correct (I've - for now - commented that out so the wiki only states information known to work). However, it seems VLC does not obey the $XDG_CONFIG_HOME variable - if it did, ~/.config/vlc/http/.hosts would be read and parsed on startup. Alternatively, ~/.config/vlc/.hosts could be used but that'd be inconsistent with the path used for global configuration. The XDG spec says:
$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.
/usr/share/vlc/http/.hosts get overwritten on every single reinstall and upgrade unless your package manager supports some kind of CONFIG_PROTECT variable (gentoo have this). This is important because some (all?) remote control software utilize the HTTP interface, which means you have to redo changes to this file every time you update VLC.

I hope I get corrected on this, but as it stands now it seems XDG compliance is only partial and the change log should be updated to reflect this, alternatively VLC should be changed to obey the full XDG spec.

For reference:
vlc --version
VLC media player 1.0.3-rc Goldeneye
VLC version 1.0.3-rc Goldeneye
Compiled by root@stargate.
Compiler: gcc version 4.4.2 (Gentoo 4.4.2 p1.0)

Thank you!

Rémi Denis-Courmont
Developer
Developer
Posts: 15345
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: VLC and the XDG Base Directory Standard

Postby Rémi Denis-Courmont » 02 Nov 2009 21:32

Neither automake, nor Linux packages managers support installing per-user files. Hence, it is only natural that VLC puts the HTTP data in /usr/share/vlc. In the unlikely but possible event that you want per-user HTTP interface, you can override --http-dir manually. As far as we consider that data to not be per-user, the XDG directories specifications are irrelevant.

For the record, Debian puts .hosts in /etc, with a symbolic link in /usr/share, to avoid overwrite during reinstallation. You can also flag the file as no overwrite in the RPM specfile, if I remember correctly. It's really up to the packagers.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded


Return to “VLC media player for Linux and friends Troubleshooting”

Who is online

Users browsing this forum: No registered users and 16 guests