Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use the XDG Base Directory Specification to determine where to store configuration under Linux #6070

Closed
mjog opened this issue Jul 1, 2014 · 5 comments
Milestone

Comments

@mjog
Copy link

mjog commented Jul 1, 2014

The XDG Base Directory Specification is the de-facto standard for determining where to store data such as configuration on Linux. This specifies that an end-user program should check the XDG_CONFIG_HOME environment variable and if unset, use "~/.config".

Currently ipython does not do this, which makes tasks such as backing up all configuration annoying and error-prone.

@minrk minrk added this to the no action milestone Jul 1, 2014
@minrk
Copy link
Member

minrk commented Jul 1, 2014

Closing as duplicate of #48.

@minrk minrk closed this as completed Jul 1, 2014
@takluyver
Copy link
Member

To expand a bit: we actually did use ~/.config/ipython for a while, but we decided to switch back to ~/.ipython because:

  1. Consistency across platforms is more important to us than following the XDG spec. We refer to this location a lot in our docs, and answering questions people ask, and it's nice to be able to just say 'it's in ~/.ipython/blah'.
  2. We were never properly following the XDG spec anyway - we stuffed everything into config, including files that belonged in data, cache and runtime. We're not interested in refactoring our code to split these things out into separate directories.
  3. This is not a battle that it looks like the XDG is winning (screenshot).

You can achieve the same effect as what we used to by setting $IPYTHONDIR to $XDG_CONFIG_HOME/ipython.

@mjog
Copy link
Author

mjog commented Jul 2, 2014

So you're accepting both docs and code patches that implement the XDG specs correctly? There's no reason why you should not be using XDG specs on other platforms.

PS: You're actually on the losing side:

mjg@montbard:~$ ls -d .* | wc -l
158
mjg@montbard:~$ ls .config/ | wc -l
95

@takluyver
Copy link
Member

Sorry, no, I don't think we would accept patches to do that - it would make
our code and docs more complicated.

As far as I know, xdg specs are only relevant for the free desktops.
Windows and Mac have their own, different conventions for storing different
kinds of data. If we followed all the platforms' conventions, explaining
where things are stored would be much worse.
On 1 Jul 2014 20:46, "Michael Gratton" notifications@github.com wrote:

So you're accepting both docs and code patches that implement the XDG
specs correctly? There's no reason why you should not be using XDG specs on
other platforms.

PS: You're actually on the losing side:

mjg@montbard:$ ls -d .* | wc -l
158
mjg@montbard:
$ ls .config/ | wc -l
95


Reply to this email directly or view it on GitHub
#6070 (comment).

@ellisonbg
Copy link
Member

For reference, on my Mac with lots of open source software:

[laptop:~]$ ls -d .* | wc -l 
      49
[laptop:~]$  ls .config/ | wc -l 
       2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants