You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Repository navigation
This repository was archived by the owner on Mar 3, 2023. It is now read-only.
Move .atom config to $XDG_CONFIG_HOME on linux #2199
$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.
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: ~/.atom, for now.
The status quo on OSX it's not the dotfile. OSX applications use ~/Library/Preferences/[identifier].plist to store preferences in text format. One file only.
Other data goes into ~/Library/Application Support/[app-name]/
Since .atom stores not only preferences but also packages repo and caches ~/Library/Application Support/is the most appropriate.
See Apple docs: 12
Switching to this standard would require reworking more than just one path since XDG_CACHE_HOME should be used for Atom's compile cache, and XDG_RUNTIME_DIR should probably be used for installed packages & themes.
Currently these are all stored under ~/.atom. Having all of them co-located makes it incredibly easy to backup, transfer, and clean out your machine of all Atom related files. Also using the same path on all platforms makes Atom predictable for people using multiple platforms.
Reacted by Chrıs Seelus, Sindre Røkenes Myren, Maxim Ivanov, Pau Ruiz Safont, soc, Valentin Hăloiu and Sergei von Alis
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.
using the same path on all platforms makes Atom predictable for people using multiple platforms
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.
A common workaround is to define not one, but multiple config paths, and pick up the first existing one. This list of paths should be OS-specific, with $ATOM_HOME taking the precedence over everything else. Then, if the config directory is nowhere to be found, it should be created at the first OS-specific location.
I've noticed, however, that on OS X, the configuration is spread across two directories — ~/.atom and ~/Library/Application Support/Atom. The latter seems to be used for blink-specific files, while the earlier is for user configuration. This unfortunately doesn't help, because ~/Library/Application Support/Atom is the default location for non-plist configuration on OS X, and it's the one where ~/.config should go. Looks like the Linux version has an additional directory ~/.config/Atom-Shell which is likely the same (strangely enough, it's called Atom, not Atom-Shell on OS X).
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 .atom and .config/Atom. Is one of them old now? Looking at their contents, they look quite different.
ls ~/.config/Atom
Cache Cookies Cookies-journal DevTools Extensions GPUCache Local Storage
ls .atom/
compile-cache config.cson nohup.out packages storage terminal-commands.json
Ugh, can't believe this was closed... it should be done the right way. ATOM_HOME is like a slap in the fact to the entire point of XDG.
Reacted by Sindre Røkenes Myren, soc and Sergei von Alis
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!
Activity
[-]Move config to $XDG_CONFIG_HOME on linux[/-][+]Move .atom to $XDG_CONFIG_HOME on linux[/+][-]Move .atom to $XDG_CONFIG_HOME on linux[/-][+]Move .atom config to $XDG_CONFIG_HOME on linux[/+]cgtx commentedon May 14, 2014
This is important to me as well.
cadesalaberry commentedon May 14, 2014
👍
malko commentedon May 15, 2014
👍
alexwhitman commentedon May 15, 2014
So this should be fairly straight forward by updating https://github.com/atom/atom/blob/master/src/atom.coffee#L90 - Something like
which will use
$XDG_CONFIG_HOME/atomif$XDG_CONFIG_HOMEis set, otherwise fall back to~/.config/atom.I'm not sure what the equivalent would be for OSX.
pritambaral commentedon May 16, 2014
It would need to be updated in the docs. What do we replace
~/.atomwith in documentation? A short word would be nice.I'm in the process of doing this. If anybody has a suggestion regarding
darwin's location, please tell. For now, I'm leaving it as~/.atom.alexwhitman commentedon May 16, 2014
Looks like OS X should be in
/Users/<username>/Library/Preferences. Username can be retrieved with https://www.npmjs.org/package/usernamepritambaral commentedon May 16, 2014
The build process also utilises
~/.atomas a cache. Better move to$XDG_CACHE_HOMEwhile we are at it.pritambaral commentedon May 16, 2014
@alexwhitman I see that https://www.npmjs.org/package/username looks at various system env variables.
BTW,
fs-plusalready hasgetHomeDirectory()and.absolute('~/Library/Preferences'). Can you test the latter?alexwhitman commentedon May 16, 2014
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
pritambaral commentedon May 16, 2014
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:
~/.atom, for now.rnhmjoj commentedon Aug 28, 2014
The status quo on OSX it's not the dotfile. OSX applications use
~/Library/Preferences/[identifier].plistto store preferences in text format. One file only.Other data goes into
~/Library/Application Support/[app-name]/Since
.atomstores not only preferences but also packages repo and caches~/Library/Application Support/is the most appropriate.See Apple docs: 1 2
kevinsawicki commentedon Feb 4, 2015
There is now full support for configuring the config location via the
ATOM_HOMEenvironment variable via #5385.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.
aviau commentedon Feb 4, 2015
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.
kevinsawicki commentedon Feb 4, 2015
Switching to this standard would require reworking more than just one path since
XDG_CACHE_HOMEshould be used for Atom's compile cache, andXDG_RUNTIME_DIRshould probably be used for installed packages & themes.Currently these are all stored under
~/.atom. Having all of them co-located makes it incredibly easy to backup, transfer, and clean out your machine of all Atom related files. Also using the same path on all platforms makes Atom predictable for people using multiple platforms.cgtx commentedon Feb 4, 2015
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.
vially commentedon Feb 6, 2015
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.
malko commentedon Feb 6, 2015
👍
I'm working on different platforms and i'm always looking first for platform specific path in first place.
Dremora commentedon Feb 17, 2015
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.
A common workaround is to define not one, but multiple config paths, and pick up the first existing one. This list of paths should be OS-specific, with
$ATOM_HOMEtaking the precedence over everything else. Then, if the config directory is nowhere to be found, it should be created at the first OS-specific location.I've noticed, however, that on OS X, the configuration is spread across two directories —
~/.atomand~/Library/Application Support/Atom. The latter seems to be used for blink-specific files, while the earlier is for user configuration. This unfortunately doesn't help, because~/Library/Application Support/Atomis the default location for non-plist configuration on OS X, and it's the one where~/.configshould go. Looks like the Linux version has an additional directory~/.config/Atom-Shellwhich is likely the same (strangely enough, it's calledAtom, notAtom-Shellon OS X).rbellamy commentedon Mar 29, 2015
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).
colemickens commentedon Jun 26, 2015
I also have
.atomand.config/Atom. Is one of them old now? Looking at their contents, they look quite different.Ugh, can't believe this was closed... it should be done the right way.
ATOM_HOMEis like a slap in the fact to the entire point of XDG.lock commentedon Jan 21, 2019
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!