Move .atom config to $XDG_CONFIG_HOME on linux #2199
Comments
This is important to me as well. |
👍 |
👍 |
So this should be fairly straight forward by updating https://github.com/atom/atom/blob/master/src/atom.coffee#L90 - Something like @getConfigDirPath: ->
if process.platform is 'win32'
dir = process.env.APPDATA
else if process.platform is 'darwin'
# osx path
else
dir = if process.env.XDG_CONFIG_HOME then process.env.XDG_CONFIG_HOME else '~/.config'
@configDirPath ?= fs.absolute(dir + '/atom') which will use I'm not sure what the equivalent would be for OSX. |
It would need to be updated in the docs. What do we replace I'm in the process of doing this. If anybody has a suggestion regarding |
Looks like OS X should be in |
The build process also utilises |
@alexwhitman I see that https://www.npmjs.org/package/username looks at various system env variables. |
I don't have a Mac, I just found the information on http://stackoverflow.com/questions/410013/where-do-osx-applications-typically-store-user-configuration-data |
Ah, stackoverflow is dead here. Apparently they updated all their BGP routes today. Anyway, I'm going to stay with the status quo on OS X: |
The status quo on OSX it's not the dotfile. OSX applications use |
There is now full support for configuring the config location via the I'm going to close this issue out since changing the default location at this point is unlikely given how many Atom installs are already out there. |
So Atom will never ever respect the freedesktop standard? Its a shame, 1.0 wasn't released yet. Now should be the moment to make things right. |
Switching to this standard would require reworking more than just one path since Currently these are all stored under |
One of the benefits of XDG Base Directory Specification is that a user can back up configurations and data, but not cache. Forcing all of Atom's data under one directory means that it is much more difficult to do this. |
I think people using multiple platforms are accustomed with different operating systems having different file system layouts. If we were to take this reasoning to the extreme you might be tempted to install the Atom binary in a "/usr/Program Files" directory while on a Linux/Mac machine and I don't think there's anyone who would argue that that's just plain wrong. Given that Atom is still not considered stable I think it's still not too late to change this to support the XDG standard. And while I agree that doing it properly requires a little bit more work to be fully compliant, I think that if the Atom team shows interest in supporting the standard, someone might be able to come up with a pull request to implement it. |
👍 |
Changing default location should never be an issue as long as it's done in a backwards-compatible way, no matter how large the user base is. I've noticed, however, that on OS X, the configuration is spread across two directories — |
I'm on Linux (Arch) and have both $ATOM_HOME/.atom (because I set it in my .profile to $XDG_CONFIG_HOME/.atom) and ~/.config/Atom (NOT ~/.config/Atom-Shell). |
I also have
Ugh, can't believe this was closed... it should be done the right way. |
This issue has been automatically locked since there has not been any recent activity after it was closed. If you can still reproduce this issue in Safe Mode then please open a new issue and fill out the entire issue template to ensure that we have enough information to address your issue. Thanks! |
From feedesktop.org:
$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.
Source: http://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html
Thanks!
The text was updated successfully, but these errors were encountered: