28 ms·
Dotfile madness
- geggam 8y agoThis is not a problem. This is the design. It makes things completely controllable and you know where to look for configuration files.
- reaperducer 8y agoIf it was completely controllable, I’d have the ability to control where they are and put them out of my way. Lazy programmers use home as a default. Home directories have become the *nix version of the Windows Registry.
- geggam 8y agoVery likely you do have the control. You simply haven't taken the time to learn how to configure things.
- reaperducer 8y agoOr not likely at all, since the whole point of TFA is that many popular programs do not follow specifications and user configuration.
- kirion25 8y agoQuite a few applications still have their config path hardcoded. https://wiki.archlinux.org/index.php/XDG_Base_Directory_support#Hardcoded https://wiki.archlinux.org/index.php/XDG_Base_Directory_supp...
- AnIdiotOnTheNet 8y agoJust because it is designed that way doesn't mean the design isn't a problem.
- Jaruzel 8y agoThis isn't just a Linux problem. In Windows, the users /documents folder is polluted in exactly the same way these days.
- s3m4j 8y agoIt's often worse on Windows, since dotfiles aren't hidden and meny dev tools assume they'll be running on *nix even when they support Windows. https://imgur.com/a/Im6G20B https://imgur.com/a/Im6G20B capture from my windows box of my $HOME.
- Novashi 8y agoPlus if you try to rename a dotfile through explorer, it won't let you Then if you try to make a dotfile through powershell, it has a different text encoding than *nix, which some programs (git) rely on
- stinos 8y agoPlus if you try to rename a dotfile through explorer, it won't let you It does, rename it .dotfile. so with an extra . at the end. it has a different text encoding than nix,* You don't specify how you do this, but most text output commands out there have an -Encoding parameter. Or else set it globally to what you want, good read here: https://stackoverflow.com/questions/40098771/changing-powershells-default-output-encoding-to-utf-8 https://stackoverflow.com/questions/40098771/changing-powers...
- deleted 8y ago[deleted]
- fireattack 8y agoAt least "My documents" is separate (as a subfolder) from %HOME isn't it? (I never used MacOS, but from the article it seems not the case for MacOS?)
- gumby 8y ago
- Memosyne 8y agoWhy do programmers do this? What thought process leads to someone thinking this is a good idea?
- saagarjha 8y agoIt’s a convenient place to store user data that works across platforms.
- reaperducer 8y agoIt’s a LAZY place to store user data that works across platforms. FTFY. If you don’t want to follow the spec, keep your program’s data in your program’s directory. If another program needs the data it can follow the $PATH, or ask the user. Even better, ask the user at first run. You know, when asking people to accept some Byzantine EULA, license, and permission to track their grandmother.
- __david__ 8y agoYour program is installed in /usr/bin—you can't write to that directory (nor should you).
- Epskampie 8y agoIn a way a users settings are ‘personal files’, so it can be argued they go in home.
- lytedev 8y agoExcept isn't there a specific directory for such things now in $XDG_CONFIG_HOME? Or is this not standard at all? Either way, $HOME/.config makes perfect sense to me!
- AnIdiotOnTheNet 8y agoWe didn't always have the XDG standards, they were bolted on later and consequently a lot of devs ignore them.
- saagarjha 8y agoOne thing I’ve been thinking about is that it would be nice to tag files with the program that created them. Aside from the clutter in my home directory, I have a lot of files that I have to guess as to where they originated from based on metadata like modification timestamps or permissions, but it would be nice to see something like “~/.config was created by some-tool”.
- boreq 8y agoThat is the exact problem that the standard I talk about was designed to solve (apart from the clutter in the home directory).
- wool_gather 8y agoI think saagarjha's point was that an even simpler standard would be for the creating application to use file metadata to annotate the files. And a simpler standard is generally more likely to be followed, especially if it's unilateral. This doesn't help with installation, obviously, but it helps with cleanup.
- masklinn 8y agoThe classic MacOS had exactly this concept: Creator Code[0], similar to the Type Code[1] but storing a file's creator rather than its "mimetype". [0] https://en.wikipedia.org/wiki/Creator_code https://en.wikipedia.org/wiki/Creator_code [1] https://en.wikipedia.org/wiki/Type_code https://en.wikipedia.org/wiki/Type_code
- wool_gather 8y agoGood point, I had almost forgotten about those!
- lowry 8y agoI'd rather have minimal files in $HOME than megabytes or gigabytes in a deep hierarchy under $XDG_CONFIG_HOME In reality, I have both. In practice, I commit go the vesion control only the dotfiles I care about. And I ignore the rest.
- Epskampie 8y agoOn the one hand this is annoying, on the other it’s great that you can just backup your home dir and have all your files and settings in one go. Also this annoyance is easy to solve, just make one dir in home (my is called after my name) and put all your own files in there.
- s3m4j 8y agoSo you're running everything under `/home/Epskampie/Epskampie` ?
- edoceo 8y agoIt's /home/Epskampie/.home
- lytedev 8y agoYep! This is my favorite trick. I just make home /home/$USER/.home and have my she'll rc start me in /home/$USER - works a treat!
- pkulak 8y agoDoesn't the standard just put everything in /home/user/.local anyway?
- fxfan 8y agoThere are cleaner solutions to this- XDG being one. Thee current situation doesn't give an option to people who don't want to do things this way
- osmarks 8y agoThe XDG directories are by default under your home dir only, so you can keep the same backupability properties. Better ones, even, since the files of things supporting it are in one place.
- xaduha 8y ago> We are no longer in control of our home directories. I can axe my home folder and rebuild it with `nixos-rebuild switch`, it's pretty minimal.
- seqizz 8y agoDo you mean `home-manager switch` or is there a feature in nixos to touch home folders?
- xaduha 8y agoI just keep my home folder in /etc/username and use this construct: (just an example, not actual) environment.etc = { "qemu/bridge.conf".text = ''allow br0''; "username/.inputrc".text = '' \$include /etc/inputrc "\e[A": history-search-backward "\e[B": history-search-forward set show-all-if-ambiguous on set completion-ignore-case on ''; }; to write configs into /etc proper and my home folder.
- seqizz 8y agoHmm that's way radical than I thought. If I understand correctly, this is a read-only home folder. Would be interesting to use, I'll give it a try.
- xaduha 8y agoIt's not read-only, but you need to reset the rights on it if you delete and rebuild it (chown probably can be put here https://nixos.org/nixos/options.html#activationscripts https://nixos.org/nixos/options.html#activationscripts) I haven't used home-manager, but it looks like a bloated thing that I don't need in my life.
- fxfan 8y agoTo name and shame some culprits (the one's who have shame, I won't name java because I won't expect them to care) 1) Mozilla 2) Gnome 3) Gimp 4) GPG 5) Thunderbird (Why is there a sep directory and not under .mozilla) 6) mplayer I guess one reason why this occurs is that it's easier for to be carelessly cross-platform this way. Except you'd expect better from mozilla, specially because they store Windows stuff very well inside %localappdata%
- boreq 8y agoWhich is especially sad as supporting the standard described in my post is a non breaking change if you are still going to read the old location of the configuration and data files as well.
- kondor6c 8y agoWhy not _shame_ openssh? Or vim? Or emacs? I would advise not calling for shame on any of these projects because they have a pattern to support that has been in place longer than the XDG standard has been in place. You can change gnupg's home dir, but it would break a lot of currently functional setups if it just moved.
- fxfan 8y agoI guess I was being nice to old programs. Also, these are programs that a lot of external tools interact with. Nobody cares about where firefox stores its data- except the now almost dead flash plugin.
- kondor6c 8y agoYes, very good point I do think that the older programs/projects have to plan a migration which really can be challenging. I think there are some that might care for example selenium might have the mozilla directory as a default and some might hard code it. The orchestration of such a change is difficult because I don't think too many people read changelog or really keep up with upstream modifications. Good thoughts
- 8y ago
- bauerd 8y agoI don't get the problem. Why bother where dotfiles are written to? GUI file managers and userland tools hide them by default. What would I gain by having them written outside of $HOME?
- withinboredom 8y agoNot everyone has a large $HOME directory. It might be mounted on a 128mb thumbdrive for all you know.
- otterley 8y agoEven better; it means that your preferences will be literally portable.
- withinboredom 8y agoYep, until your program crashes because you weren't expecting a 10b file to run out of disk space.
- otterley 8y agoPreferences files tend to be pretty small; I'd be rather surprised even if a 128MB thumb drive couldn't store them all. The bulk of the space will almost certainly be consumed by other things.
- zapzupnz 8y agoYou cannot and should never assume that dotfiles are just preference files. They might be directories, and those directories might be chock full of big files — or worse, temp files that should really be in /tmp.
- bauerd 8y agoEsoteric setups aside, I'd be interested to hear about problems that people actually have encountered with this convention.
- ryandrake 8y agoThis is a symptom of a bigger problem, which is that programmer respect for resources that belong to the user is at an all-time low. * CPU: We'll just have this web page peg the user's CPU running gobs of code because our designer wants to unnecessarily animate this thinggy or our ad network wants to mine bitcoins. (Related resource: Mobile phone battery) * Memory: We'll just use this web framework and embedded browser that uses up 1GB of the user's RAM, for a one-window chat application we're writing because we can't be bothered to learn anything but Javascript. * Disk/Storage: We'll just cache 20GB of easily-regeneratable internal data so the app seems faster than it is, dumping it somewhere for the user to find and clean up. * Network Bandwidth: Our shopping cart web page load is larger than the full installation of a 2000-era video game because we have to have 6 layers of framework abstraction and taking the time to optimize/minimize it wouldn't let us release fast and "crush it" in the market! Nobody seems to care. "Oh, Xyz is cheap, programmer time is expensive!" is the rallying cry. So let's push the cost our shitty practices to the user and make her buy more hardware.
- darkpuma 8y agoSlight tangent, but I wish there was a standardized way to tell running processes to re-read their dotfiles. If I change my .zshrc, I have to re-source it in each running instance of zsh. Sure, I could automate this. But I'd also like the same done in vim. And in weechat. And in mpv. And in everything using GNU Readline... you get the picture. This is probably at the top of my list "biggest complaints that won't be resolved for numerous reasons." It sure would be nice though.
- ethelward 8y agoSome programs (I can think of Termite and Kitty) use the USR1 signal to this end.
- pseudalopex 8y agoBe careful. Some programs terminate when sent USR1.
- gryfft 8y agoFrom a user standpoint, a lot of of unrecognizable things show up if you pass that -l flag. In my opinion, having a conventional place to look for user configuration in plain text is a good thing, not a bad thing, and of course I would want it to be in the directory on my system where I'm the sole owner. As somebody else mentioned, this means backing up my personal settings and files is braindead simple, too. Asking programmers to respect $XDG_HOME_CONFIG is not a bad idea, but it's no replacement for home directory hygiene. I believe that ultimately, cleanliness is a personal responsibility. Edit: reduced smugness quotient while trying to preserve my argument. I apologize for the pre-edit tone issues with this post.
- reaperducer 8y agoThe other way-- and I'm sorry for how smug this sounds-- is to just not litter in your own home directory without cleaning it up. How about the other way is I’ll just stop using your product/service/business that doesn’t respect my machine?
- gryfft 8y agoThat's my point exactly. Most of these programs have command line flags you can pass to indicate the configuration file that should be used. Doing that, and then by default putting my configuration in the most reasonable place for it--a dotfile-- is, in my opinion, the most respectful way a programmer can treat someone's machine. Not to mention that most of these are free and open source, so building according to convention is the best way to keep their userbase happy (as fiddlerwoaroof pointed out, $HOME was the original conventional dotfile location pre-2003.) So if your program doesn't respect my machine (meaning allow me to configure it to prevent unwanted behavior) then yes absolutely, into the bin with it. And rm -rf its dotfiles after.
- afiori 8y agoyou could check if ~/.local/share and ~/.config exist. also there is a difference between files that the user is supposed to interact with and inner configuration of random apps. ~/.ssh is fine, I need to look at it for many .emacs.d is fine as is something you are expected to edit manually, but I don't even know what some of these are: .aspell.en.prepl .dmrc .dropbox .dropbox-dist .gtkrc-2.0 .joe_state .oracle_jre_usage .pdfsam .pylint.d snap .texlive2016 .wget-hsts .vscode .xdvirc This is from a fresh install 3 months ago, do I need 2 dot-folders for dropbox?
- avip 8y agonode_modules and yarn.lock etc. in the location where the tool was run is a feature, not a bug. Ask any python user digging to find where pip decided to drop it this time.
- godot 8y agoI was going to say, I've been actively working with nodejs for a few years and I've never had node_modules, package-lock.json and yarn.lock in my home dir, on either Linux or macOS. If you run npm/yarn commands in your home dir for some reasons, then you should expect those files there. On the less than handful of times where I ran npm in my home dir accidentally, I make sure to immediately go and delete those files. It's also possible that the author runs a lot of scripts from various projects from github and sometimes those scripts' authors are not careful about running npm/yarn within their projects. I guess I don't play around with OSS enough. :)
- eeeeeeeeeeeee 8y agoI think most of that can be chalked up to someone simply mistakenly running those commands in the wrong directory (root of $HOME). I've never heard of a JS app just randomly storing a global node_modules or yarn.lock to the root of $HOME.
- rb808 8y agoI think it makes a lot of sense to have all apps run in a sandbox or container by default. Everything is segregated and easy to monitor and track what its doing.
- johnchristopher 8y agoWas thinking about that when tinkering with docker: why are volumes created outside the user's home directory by default ?
- diegoperini 8y agoOn my fedora ec2 created with a standard ami, docker doesn't work without sudo (didn't try to reconfigure, so it may if I hack), so that behavior is understandable, though not desirable.
- johnchristopher 8y agoDid you add your user to the docker group ?
- diegoperini 8y agoNope, just installed and started to use.
- sigjuice 8y agoNo. Apps need to be well behaved by default.
- oh5nxo 8y ago~/etc would have been so nice.
- nine_k 8y agoWhat the article describes is indeed "dot file sanity".
- deleted 8y ago[deleted]
- gumby 8y agoThe lack of useful names on the files is IMHO the most egregious issue. (OK using names that don’t start with ‘.’ is worse). I don’t ls -A my homedir as much, but what the hell are .517827.padl? Who created .android (I don’t use android and don’t develop for it) etc. These people are arrogant shitheads and I’d like to know who they are so I can avoid their software. I assume if they do crap like this their software does other nefarious things.
- tyingq 8y agoDoesn't address your concerns, but that ".android" directory is probably from Firefox. https://bugzilla.mozilla.org/show_bug.cgi?id=1146157 https://bugzilla.mozilla.org/show_bug.cgi?id=1146157
- gumby 8y ago...which is not even installed on my machine!
- CGamesPlay 8y ago> These people are arrogant shitheads and I’d like to know who they are so I can avoid their software. Wow, this is really assuming the worst in people. It’s much more likely to be ignorance because the other developer doesn’t know where the file came from either (some compiler flag on a library accidentally enabled), or also doesn’t ls -a in their home.
- gumby 8y ago> Wow, this is really assuming the worst in people. Yes, I am. I'm fed up with programs that spam my system without asking: install plug ins, menu items, directories on the desktop, dock items etc for "convenience" -- it's convenient for them, not me. It's especially painful when I pay for an app and it sprays shrapnel through my filesystem. > It’s much more likely to be ignorance Indeed, but if they can't be bothered to learn basic system hygiene how can I be confident the rest of their package is safe to use? A big driver for sandbox/containers in user systems is not protection against malign actors per se but against the lazy and ignorant. Have I written bugs into code? Of course I have, I'm human. But at least I try to get things right up front; to be a good citizen. (there are additional reasons for containers in server systems, hence my qualification of "user systems" above).
- palotasb 8y agoThat's why I never use $HOME for personal files. All of my files are in the Dropbox folder or another custom folder on my work PC. It's nonstandard, so no one litters in it besides me.
- vandorjw 8y agoI do something similar, everything I want to keep is under /storage.
- rnhmjoj 8y agoI have been fighting this but I gave up: people just don't care or are somewhat opposed, even when presented with a backword compatible patch. Now I just mount the home directory with rewritefs and try make the mess more or less compliant to the spec. It's not ideal: it's a hack and it causes a performance hit but I can be at peace in my ~.
- orangeshark 8y agoWhat were some of the reasons people opposed it?
- rnhmjoj 8y agoMainly increasing the complexity: it usually requires moving the files to three different locations and handling the migration from the old location.
- sneak 8y agoWould exporting HOME to something else (eg the xdg root/appname) prior to invoking programs solve this problem for most apps without code changes?
- pseudalopex 8y agoXDG has different roots for configuration, cache, and data files.
- 20190202 8y agoCrazy idea: what if we were to just nest a personal directory within ~? i.e., New standard directory `~/personal`, new environment variable, $PERSONAL. If we could come up with a default `~` like character for globbing to `$PERSONAL` like `~` does to `$HOME`, say, `@` (obviously that isn't the char to go with and I'm not a BASH expert to be able to pick one not already occupied). All your personal dotfiles are in `~`, all your personal files are in `@`. Default `cd` without args to `$PERSONAL`. No worries about tons of files that are in `~` because you live in `@`.
- gumby 8y agoThis is adding pain for the victim to get around abuse. And then abusers would simply pollute $PERSONAL. “There is no problem in computer science that can't be solved using another level of indirection.”
- katbyte 8y agoI already kinda do this, ~/company for work, ~/kt for personal, and a bash scrip it’s alias’ and vars to make it easy
- Waterluvian 8y ago.files are very useful. I like the consistent idiom for where your "global" settings go for virtualenv, npm, tslint, flake8, git, whatever. But it would have been so nice just to move it into a ~/cfgs or fine... even a ~/.cfgs or whatever. I'm guessing engineers went, "ewww, I'd have to walk down the tree to find the next most relevant config file to use and then go UP into a directory when I hit home."
- toflon 8y agoMost of what I use supports the XDG ~/.config directory, which is nice. But there's still some that doesn't support it. https://wiki.archlinux.org/index.php/XDG_Base_Directory#Hardcoded https://wiki.archlinux.org/index.php/XDG_Base_Directory#Hard...
- angusp 8y agoOne of the advantages, though, is per-user config for the same program, e.g. the .bash files. It's pretty common to have separate /home and / partitions too, and less common but doable to dual-boot different distros but share the same /home partition. Which is itself actually a reason to be very careful with back-compatability of dotfiles
- nycticorax 8y agoTo me, the real problem is not the dotfiles, but the regular (i.e. non-hidden) files that applications surreptitiously create in my home folder. (Which the author does mention as being particularly bad.) dotfiles in the home folder are not a new thing on Linux (e.g. .bashrc, .profile, .emacs, etc.), even if it would be better if more applications used the XDG folders. And if I don't see them when I "ls", they don't bother me. But nowadays, lots of applications seem to think it's OK to put normal files in my home folder without asking first. This is just outright barbarism. In particular, Ubuntu now seems like it's all-in on snaps, and if you use snaps, they create a non-hidden "snap" folder in the user's home folder. Madness! And when people complain, the devs have the gall to suggest that this is all fine: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053 https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053 I like the idea of snap/flatpak in the abstract, but until they get their act together, and stop creating non-hidden files in my home folder without asking first, I am never going to use snaps. And of course, all this is on top of the new fashion for the OS to "helpfully" create Documents, Music, Video, etc folders in my home folder, and set the XDG environment variables to point to them. Noooooope. But at least in that case the user can change the environment variables and delete the stupid folders. No such luck with ~/snap.
- sascha_sl 8y ago>And when people complain, the devs have the gall to suggest that this is all fine. You're complaining on a really high level and nobody suggested "this is fine". They suggested "wishlist" is fine according to their definition of "if it's not immediately broken and a fix is not trivial" If you have an issue with default folders that are quite normal in a modern desktop environment I suggest you move back to Arch or wherever you came from and install i3 again?
- kardos 8y agoIt seems to me that distros are in the right position to nudge this in the right direction. For example, Fedora did the /usr merge, moved to systemd, wayland, etc. The great dotfile cleanup would probably work by patching all packaged software to do config files the right way, plus sending the patches upstream. Then in a few release cycles this would be more or less solved.
- grahamm 8y agoGet over it.
- deleted 8y ago[deleted]
- jecxjo 8y agoOddly I feel completely the opposite about this topic. I think dot files in your home directory are exactly the way to go. Using the XDG standard leaves you with whatever the distro decides is the correct location for these files. While their recommendation is all in the home directory, I wouldn't put it past some of these distro developers to make some crazy /var/users/{uid}/config directory. This is important when setting up your partitions. I keep home and the system separate so that I can easily swap out the OS. Home should be the only location a user has write access.
- AnIdiotOnTheNet 8y agoSo rather than use a standard that allows you to override it simply by changing some environment variables, you think that hardcoding a specific path is a better solution? Definitely a unix developer.
- kiallmacinnes 8y agoI agreed, right up until the unnecessary second paragraph!
- zzo38computer 8y agoI think dot files in home directory for configuration files are fine, especially if the user creates the files themself rather than the program created them (although sometimes a program may wish to create a user cache file, for example Free Hero Mesh creates a file ~/.heromeshsession by default but you can configure a different name if you wish; also some programs such as web browsers may store cookies and so on, although you should be allowed to reconfigure that, too). A program might also support a command-line switch and/or environment variable to override what file (in what directory) to use. Requiring files in your home directory that do not have a dot at first (with a fixed name) is no good, though.
- pseudalopex 8y agoA user can override any environment variables set by a distro.
- 8y ago
- deleted 8y ago[deleted]
- charlesdaniels 8y agoA lot of other people have made some fantastic points here, so I won't harp on "putting random crap in ~/ bad!" any further. However, since it has not been mentioned, I would like to shout out to the Python "appdirs" module[1], which neatly solves this issue for those writing programs in Python with minimal effort. The best part is that it uses the platform's native standards, so XDG on Linux, plus whatever macOS and Windows call their implementations. Sadly I am not aware of comparable options for other programming languages. I think having high-quality easy to use libraries for this sort of thing would go a long way. 1 - https://pypi.org/project/appdirs/ https://pypi.org/project/appdirs/
- int_19h 8y agoIn C# and other .NET languages, you'd use this: https://developers.redhat.com/blog/2018/11/07/dotnet-special-folder-api-linux/ https://developers.redhat.com/blog/2018/11/07/dotnet-special... Many of these are named Windows-centric because of the history of the API. But where possible, they still map to something reasonable elsewhere. Looking at the mapping table, I can't think of anything it doesn't cover.
- OJFord 8y ago> The best part is that it uses the platform's native standards, so XDG on Linux, plus whatever macOS and Windows call their implementations. Boo. Apps not using XDG on macOS drive me mad anyway; 1000 times more so when they do on Linux, but use Library or whatever stupid place on macOS despite the presence of XDG environment variables.
- Crontab 8y agoI personally detest the whole XDG thing but lots of non-XDG applications are guilty of littering the home directory. For example, every time I use the Less pager, it creates a .lesshst file (fixable by setting "LESSHISTFILE" to "-"). Vim creates .viminfo files so I had to create an alias to it where vim equals "vim -i NONE".
- git-pull 8y agoMy project cihai (http://cihai.git-pull.com/ http://cihai.git-pull.com/) and unihan-etl (https://github.com/cihai/unihan-etl https://github.com/cihai/unihan-etl) both use the XDG specification. The reason I like it is it provides directories to use across platforms (edit: Not sure about Windows), relative to the user. Since the applications download a file (UNIHAN database [1]) to bootstrap, we want to store it in the user's files, not the systems. The other thing I do that's helpful is using sqlite (which is often built with Python). This combination gives a database, and a place to store configuration, downloaded/built files, in an organized way across systems. The nice things XDG "standardizes" which I'm using: $XDG_DATA_HOME defines the base directory relative to which user specific data files should be stored. If $XDG_DATA_HOME is either not set or empty, a default equal to $HOME/.local/share should be used. $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. $XDG_CACHE_HOME defines the base directory relative to which user specific non-essential data files should be stored. If $XDG_CACHE_HOME is either not set or empty, a default equal to $HOME/.cache should be used. Why the implementation is helpful: It defines a common directory for cache/data/config files, with applications inside them, e.g. ~/.config/i3, ~/.config/tmuxp, rather than adding more stuff to ~/.i3, ~/.tmuxp. When standards aren't being followed, programs end up storing their configurations / data / etc all over. Another thing is it defines directories relative to the user themselves and for the system files. Dotfiles may imply configuration / artifacts in the users home directory, it doesn't have. The thing I like is I can check for configuration in user files (for instance ~/.gtk-3.0/), then fall back on checking the system files (/etc/gtk-3.0). The benefit of user files is they're writable out of the box, so if there's going to be any file generated that the user needs to keep (like an unzipped version of UNIHAN) that can be cached so they don't have to download it again. (XDG Link: https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/basedir-...) [1] https://www.unicode.org/reports/tr38/ https://www.unicode.org/reports/tr38/
- quotemstr 8y ago> $HOME/.local/share Just look at that path: "$HOME": It's my home directory. Cool. ".local": It's in my home directory, but local to it, and not somewhere else? This doesn't make a lot of sense, but er, Okay. "shared": For Christ's sake, what is this? It's in my home, and local within it, but also shared? With whom? How? Why? I give up. Why would anyone want to do this? What concrete benefit does this path give us? What specific thing does it let you do that ~/.myprogram doesn't? The article is bad, and the XDG standard is bad. The traditional approach is fine.
- howard941 8y agoI tend to carry $HOME around with me when I change systems. When I ls -Alr it was like opening up a time capsule, or a hope chest. The first 4 pages on a 23 line terminal had file and directory names for content old enough to buy liquor in all 50 states, old friends like .cshrc, .addressbook, .X11Startup, .nofinger, amd.home, .zirconrc, dot.signature, aub.home, and so on.
- rkagerer 8y agoSame mess on Windows with the My Documents folder. I simply abandoned it, treating the folder as "My Spam From App Programmers", and keep the meaningful stuff in a totally different place.
- krschultz 8y agoI appreciate that this article doesn't just end with the complaint but follows through on a recommendation on how to do handle this correctly.
- quotemstr 8y agoI have the opposite perspective. Dotfiles are fine, and I find the proliferation of XDG directories confusing, mostly because they're misused. Why should a game's save files be under .config? Making dotfiles under $HOME is a simple approach that's worked for a long time and that doesn't cause serious problems, and I see no need to adopt the XDG approach, which I see as overengineered.
- yesco 8y ago> I find the proliferation of XDG directories confusing, mostly because they're misused. Why should a game's save files be under .config? A game's save should be $XDG_DATA_HOME, misuse is exactly that, misuse. I have hundreds of games installed on my linux machine and not a single one has put it's save files into my $XDG_CONFIG_HOME folder. On the other hand many DO outright ignore XDG and dump all their garbage into .game_name/.dev_name folders (looking at you Factorio). I think you are exaggerating the issue. > Making dotfiles under $HOME is a simple approach that's worked for a long time and that doesn't cause serious problems, and I see no need to adopt the XDG approach, which I see as overengineered. What exactly is over engineered here? It's just a set of environmental variables, developers ALREADY use $HOME to spam up my home directory. The only real effort a developer needs to put into this is making sure they separate their config, data and cache folders which is something most already do within their cute .program_name folders. while maybe not "serious" I certainly do find it do be quite the problem that all user-specific program data is randomly dumped into poorly named hidden folders within my home directory. *Nix systems at a root level already divide config files into /etc, cached files into /var and /tmp, and data files into /usr. Why can't there be at least a little symmetry with how the home folder is handled?
- quotemstr 8y agoThe XDG approach is over-engineered: it adds complexity and provides no benefit. What is the specific concrete advantage of putting some parts of foo's state in ~/.config/foo, some in ~/.local, and so on? All this approach does is scatter what's conceptually a single state blob across different parts of the filesystem. I dealt with this stuff in Windows for years, and we don't need it in the Unix world. The conventional dotfile approach is just fine: there's an application and it puts state under a directory named after itself.
- michaelcampbell 8y ago> Avoid creating files or directories of any kind in your user's $HOME directory in order to store your configuration or data. This practice is bizarre at best I believe the article itself is an existence proof that it is in fact, not bizarre.
- _pmf_ 8y agoIf you think this is madness, try the alternatives.
- quickthrower2 8y agoLike Windows Registry. Yay!
- TheRealPomax 8y agoThis kind of just sounds like more standard crazy unix/linux "someone did the wrong thing and now everyone's doing the wrong thing and it's too late to realistically fix", for which it's easier to just come up with another subversion (waves at the three different 'user' solutions) like not just building a user home dir, but creating a dir inside that the user's usename as well, so that ~ is for all the bullshit dotfiles and ~/yourusername is actually your data. And then someone will no doubt come up with an alias that takes you to that dir instead of just the original homedir, like "cd `" instead of "cd ~" (and no, ~ doesn't make any more sense than ` would, it's just what we got used to)
- toss1 8y agoIndeed!! Some of us would like to manage our systems, and processes like backups, transfer to a new system, etc., in something resembling an orderly process. The very concept that architects, designers, &/or programmers think it's OK to just litter our systems with their stuff wherever happens to be convenient to them to code up this afternoon is no better than people just deciding to crap wherever they feel. When I see software doing this, I automatically downgrade them in my assessment of what I want to use going forward. The simple concept is that there are a few categories of storage used -- these should each be kept separate & independent, under the USER's control. Why is this a difficult concept? Program code, system-config, per-user-config, user data. A simple table of the default and user-overridden location for each. If you as a coder have a problem with this, I really have to wonder what other complexity you will handle badly. If this simple system is a mess, why would I expect other parts of your system to be any good?
- grok2 8y agoNot sure what the problem is -- dotfiles or other application files need to be somewhere, whether in the home directory or somewhere else (that the OS doesn't enforce but just requires by convention) makes no difference. What would really help is what another comment mentioned -- the ability to tell which modules owns a particular file -- that would be really cool.
- deleted 8y ago[deleted]
- chrisweekly 8y agoRelated pet peeve: macOs '.DS_Store' files. Can someone better-informed than me please explain how to prevent heir creation? Barring that, I'd settle for a justification.
- giornogiovanna 8y ago.DS_Store contains the positions of file icons, the last view mode (list, icons, etc.), and other stuff for Finder. You can avoid creating it by not using Finder, and you can probably also avoid it if you carefully avoid not dragging icons around. If it bothers you because you keep committing it into your Git repo, then you can exclude it in a global .gitignore[0]. [0]: http://egorsmirnov.me/2015/05/04/global-gitignore-file.html http://egorsmirnov.me/2015/05/04/global-gitignore-file.html
- extra88 8y agoThey store attributes used by the Finder for the they're within [0]. You can set a Mac to prevent their creation on mounted network volumes [1] but to my knowledge there isn't an option to prevent their creation on local volumes. For Samba shares, you can configure it to prevent their creation. [0] https://en.wikipedia.org/wiki/.DS_Store https://en.wikipedia.org/wiki/.DS_Store [1] https://support.apple.com/en-us/HT208209 https://support.apple.com/en-us/HT208209 [2] https://e-rave.nl/disable-creation-of-ds_store-files-on-samba-shares https://e-rave.nl/disable-creation-of-ds_store-files-on-samb...
- dmitrygr 8y agoHow else do you propose storing xattrs on fat32?
- Varriount 8y agoJust don't? Besides, .DS_Store files are created on non-FAT filesystems too, even when the filesystem does support extended attributes.
- rovr138 8y agoWindow size, folder view settings, icons locations etc is what I understand is store there. No idea how to prevent them (except on networked folders.).
- durbatuluk 8y agoTIL I'm using ~ in the wrong way. For me ~ was always the default place for user-level configurations and time taught me to do so: .X* .bash* .vimrc and others. Than I create my personal folders ~/{src, docs, bin, porn, anime etc}. ~ is for temporary files I'll delete after use like windows users do with their Desktop folder. Also my ls isn't an alias with -a flag...I'm alone here? :|
- zzo38computer 8y agoI do the same kind of things actually. I do not have ls alias with -a flag, and I do other thing like you mention, too. You are not alone here.
- wrboyce 8y agoI rarely type ls; I have l aliased to something like ls -lAhFvN
- rovr138 8y agoI think an issue I have with it is if I want to move the configuration to another place, the only way I can do it is via a symlink. If applications used the variables above, you would be able to easily organize things differently if you choose to. This would also allow you to test if something there is causing issues or if you wanted to format and reset things. Just delete that directory or set the variable to another path. I don’t set ls to ls -a, but sometimes I create hidden folders and files on ~/ so it’s not distracting. Scanning through a lot of things because everything is dumped there is a mess.
- durbatuluk 8y agoIndeed, without env. var we are stuck with ~ "madness"
- Skunkleton 8y agoWhy should non-desktop applications follow the XDG standard? Even for applications designed for "desktop" use, the standard is questionable IMO. After all, the "Desktop" folder that OP is complaining about is an XDG recommendation.
- drivingmenuts 8y agoAll of this is a leftover from the days when *nix was a multiuser OS and used as such. It completely ignores the way we use machines now, with only one owner, and expectations of only one user. In fact, I can’t imagine loaning my work laptop to anyone, for security reasons, nor my personal laptop, because that’s just gross AND a security violation. Computing power is so cheap now, that we don’t need to share machines when working in the cloud, either. We can, and do, log into our own VMs, work on data and software and commit back to an intermediary before final merge into a shared repository. Perhaps it’s time to return to some version of single user OSes and clean up the relics left behind by no-loner-needed multiuser environments.
- akerro 8y agoSo, what's gonna happen on Wayland when these X-variables aren't defined? Am I going to lose config and have to copy directories from XDG to .config/ because that's new default?
- yakubin 8y agoBy "X-variables" you mean $XDG_CONFIG_DIRS, $XDG_DATA_DIRS etc.? They aren't related to the X server. The "XDG" is for the old name of the Freedesktop.org project (X Desktop Group) [1]. Freedesktop.org is the host for the XDG Base Directory Specification [2]. Apart from that they are also involved in Wayland. So I see no reason for worry. [1] https://en.wikipedia.org/wiki/Freedesktop.org https://en.wikipedia.org/wiki/Freedesktop.org [2] https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html https://specifications.freedesktop.org/basedir-spec/basedir-...
- afiori 8y agoThe standard defined default for when they are not defined, from my experimenting with various distros they are almost never defined explicitly.
- abathur 8y agoI have a short, related tale. In a long battle to be more intentional about what I keep around, I wanted ~/ to function both as my desktop and downloads directory, on both macOS and nixos. Using it like this would force me to deal with cruft quickly, and avoid crap silently piling up out of sight until its origin is forgotten (though desktops will hide the .dotfiles; those could still accumulate unnoticed). It was easy to set this up on nixos, but I found the handful of apps dropping non-hidden files there grating. Magic folder behavior on macOS didn't work as well with this. I ended up replacing ~/Desktop and ~/Documents with links to ~/Downloads. The naming isn't sensible, but I'm happy with how this works on both systems so far.
- aerovistae 8y agoI have long deplored the sheer amount of config files that clutter the top level of any project nowadays. .gitignore, package.json, webpack.config.js, babelrc, travis.yml, it’s endless. This very short list is really the tip of the iceberg. These things need to be in a dedicated config folder. It’s so nice to see this article at the top of HN. I had long thought I was the only one who felt this way.
- omnifischer 8y agoDont forget .cache. Both chromium and firefox dump gigabytes of space there!
- pointytrees 8y agoI prefer to use `ls -lah` which always shows the dot files. It sure would be nice if these were placed in a different folder. Maybe ~/.../ to put all the things. Sure, cat ~/.bash_history would need to be cat ~/.../.bash_history which isn't as convenient. But, I sure do agree with the frustration. My work machine has nearly a hundred hidden things. My Chrome usually downloads things to ~/Downloads/ but Firefox often likes to store the file in ~ which then is often hard to find when I jump over to a console. I've made an effort to clean things up. Trying to set firefox to download to the Downloads folder, deleting everything personal out of the home folder. But, of course, then that just goes to prove that I do not have control of my ~ folder. I'm doing everything I can to keep my own stuff out of it. Which is sad.
- kevinpet 8y agoTo me, there's a big difference between: If you want to override the defaults of this command line program, create a .programrc file in your home directory. and Thanks for trying out this program, I'll just create a whole directory structure of config files and caches in your home directory.
- chatterbeak 8y agoI like the way Windows does it with the AppData folders
- miguelmota 8y agoWhat's the equivalent of $XDG_CONFIG_DIRS for macOS and Windows?
- pseudalopex 8y agomacOS has Application Support, Caches, and Preferences folders under /System/Library, /Library, and ~/Library. Windows has %ProgramData%, %AppData%, and %LocalAppData%.
- oskkejdjdkjd 8y agoFiles in the Linux ecosystem are a mess. Files scattered everywhere and each instance of Linux uses some different arbitrary directory scheme. We really need a reboot. New micro kernel based OS with clear directory logic and dedicated directories for applications to keep stuff.
- zozbot123 8y ago> dedicated directories for applications to keep stuff. That's what /opt is for!
- mr_toad 8y agoFiles everywhere are a mess. Windows, Linux, MacOS, Solaris, HP-UX, VMS, CP/CMS. Every corporate network share I’ve ever seen has been a dumpster fire. There are actually consultants who advise organisations on cleaning up their file systems.
- sakoht 8y agoThe real problem is that any app I run accesss all files I own with equal permissions. App1 and App2 shouldn’t write their data to my home, or read each other’s data, or, please, be able to write each other’s data. A video game can read my tax forms. WTF. Mobile & tablet OSs solve this. Everything has to follow. Until then, basically every app should run in a docker container. Then it can do what it wants.
- pmontra 8y agoYou can create another user and sudo / gksudo to it when working on sensitive data. It never occurred to me before reading your comment. I could start doing it myself.
- darkmighty 8y agosu - <username> also works. Indeed the capability exists (unix/linux pioneered it?), but it relies on manual containment by the user. It should be automated, with prompts at install or execution time, like on mobile OSs. An idea is each file should have its own user, basically, with both relative and absolute file creation/modification permissions. If you run an arbitrary executable as a user there's great security risk since it can do anything you can (without sudo of course). It seems like the natural progression from Run everything as root -> Separate root and day-to-day user -> Don't use root and achieve things with sudo -> Each file has its own permissions (i.e. essentially its own user) set by the parent user Permissions should be both for individual actions and permanent classes of actions, on the user's discretion (i.e. allow it to create this file or always allow it to create files) This approach is even naturally hierarchical, executables could create other executables as long as they have permission to do so, and set the child permissions to at most its own. In this context an executable asking for permissions can be akin to sudo: it really is a file-user asking for its parent file-user for expanded permissions. To give a real life allegory, consider a Technician in a company wants to make a tool purchase, so he asks the Engineer. The Engineer doesn't have permission, so he denies or asks the Manager. Finally the Manager either denies or asks the CEO which has permission over everything.
- 8y ago
- spacesuitman2 8y agoIf only everyone would just put it in the `.config` dir and be done with it. Predictable. Simple. And without shrapnel in home.
- house_atr 8y agoI've always been so annoyed that every program I install seems to think that my home folder is a garbage dump for it to pile on whatever it wants.
- gesman 8y agoThis is the consequence of enterprise practices of hiring el-cheapo, hit-and-run contractors or outsourcing development to middlemen in “cost-efficient” regions. End developer is inexperienced, temporary, not valued and hence his deliverables
- macjohnmcc 8y agoI'll take dotfile madness over registry madness. I have been trying to figure out where in the registry Visual Studio 2015 puts its install location so I can remove that registry value when I reinstall it to put it in it's default location. So far I've wasted a ton of time trying to accomplish this. A single file .VS2015 would be preferable.
- lphnull 8y agoThere is a program for windows that does this if I recall correctly. It records every file and registry entry created during installation and allows you to compare snapshots of "before" and "after" installation.
- macjohnmcc 8y agoI recorded the installation of VS2015 and it was a shocking number of files and registry values. 10's of thousands of each!
- int_19h 8y agoJust delete this entire key: HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\VisualStudio\14.0
- macjohnmcc 8y agoI will give it a shot. Thanks!
- uhrlocher 8y agohttps://www.theatlantic.com/magazine/archive/2017/04/why-is-silicon-valley-so-awful-to-women/517788/ https://www.theatlantic.com/magazine/archive/2017/04/why-is-... https://www.newsweek.com/2016/06/17/silicon-valley-takeover-468182.html https://www.newsweek.com/2016/06/17/silicon-valley-takeover-... https://medium.com/@preethikasireddy/why-im-leaving-silicon-valley-72919edb3297 https://medium.com/@preethikasireddy/why-im-leaving-silicon-... https://getlighthouse.com/blog/silicon-valley-bad-managers/ https://getlighthouse.com/blog/silicon-valley-bad-managers/ https://www.philanthropy.com/article/A-Star-Performer-Created-a/243159 https://www.philanthropy.com/article/A-Star-Performer-Create... https://www.theglobeandmail.com/report-on-business/international-business/a-valley-too-far-is-the-toxic-culture-of-the-tech-world-beyond-repair/article35610645/ https://www.theglobeandmail.com/report-on-business/internati... https://www.geekwire.com/2018/emily-chang-brotopia-silicon-valley-companies-can-tackle-toxic-culture/ https://www.geekwire.com/2018/emily-chang-brotopia-silicon-v... https://www.entrepreneur.com/article/297481 https://www.entrepreneur.com/article/297481 https://thenextweb.com/insider/2017/03/11/bro-culture-poisoning-silicon-valley/ https://thenextweb.com/insider/2017/03/11/bro-culture-poison... https://www.quora.com/Is-the-culture-in-the-Silicon-Valley-becoming-increasingly-toxic?share=1 https://www.quora.com/Is-the-culture-in-the-Silicon-Valley-b... https://www.vanityfair.com/news/2016/06/ellen-pao-memoir-silicon-valley-toxic-culture https://www.vanityfair.com/news/2016/06/ellen-pao-memoir-sil... https://www.recode.net/2018/2/5/16972096/emily-chang-brotopia-book-bloomberg-technology-culture-silicon-valley-kara-swisher-decode-podcast https://www.recode.net/2018/2/5/16972096/emily-chang-brotopi... https://www.glassdoor.com/Reviews/Silicon-Valley-Community-Foundation-Reviews-E331546.htm https://www.glassdoor.com/Reviews/Silicon-Valley-Community-F... https://www.wired.com/story/everyone-hates-silicon-valley-except-its-imitators/ https://www.wired.com/story/everyone-hates-silicon-valley-ex... https://www.intelligencesquaredus.org/debates/silicon-valley-has-lost-its-soul https://www.intelligencesquaredus.org/debates/silicon-valley... https://yourstory.com/2017/07/silicon-valley-bro-culture/ https://yourstory.com/2017/07/silicon-valley-bro-culture/ https://www.wsj.com/articles/the-quiet-efforts-to-battle-silicon-valleys-bro-culture-1541943938 https://www.wsj.com/articles/the-quiet-efforts-to-battle-sil... https://thebolditalic.com/a-source-of-sorrow-in-silicon-valley-1a81ccd80ac2?gi=bc741a45779e https://thebolditalic.com/a-source-of-sorrow-in-silicon-vall... https://www.bizjournals.com/sanfrancisco/news/2019/01/25/is-silicon-valley-the-real-villain-in-the-theranos.html https://www.bizjournals.com/sanfrancisco/news/2019/01/25/is-... https://www.rawstory.com/2018/07/silicon-valley-become-next-detroit-struggles-survive-toxic-mess-created/ https://www.rawstory.com/2018/07/silicon-valley-become-next-... https://builttoadapt.io/so-you-want-to-build-a-silicon-valley-like-software-developer-culture-focus-on-the-people-809ddf4c426a?gi=af0b0c66fd4f https://builttoadapt.io/so-you-want-to-build-a-silicon-valle... https://www.youtube.com/watch?v=h3-bMDaMhLg https://www.youtube.com/watch?v=h3-bMDaMhLg https://www.theguardian.com/world/2017/mar/01/silicon-valley-sexual-harassment-startups https://www.theguardian.com/world/2017/mar/01/silicon-valley... https://www.indiewire.com/2018/07/silicon-valley-actress-alice-wetterlund-t-j-miller-co-stars-enabled-bullying-1201985168/# https://www.indiewire.com/2018/07/silicon-valley-actress-ali...! https://www.theneweconomy.com/technology/silicons-sexist-brogrammer-culture-is-locking-women-out-of-tech https://www.theneweconomy.com/technology/silicons-sexist-bro... https://news.ycombinator.com/item?id=17051800 https://news.ycombinator.com/item?id=17051800 https://www.losaltosonline.com/news/sections/schools/210-school-features/55819- https://www.losaltosonline.com/news/sections/schools/210-sch...
- frankz00 8y agoI think this is a silly complaint. These are preferences storage. The home directory is absolutely the most logical place for these. I actually like that there are applications that actually still have preferences. My biggest pet peeves are applications WITHOUT preferences. Careful what you wish for.
- pi-maker 8y agoI agree that the home directory is the most logical place for files like these, but it would still be nice if they were in a consistent place. That way, if you wanted to delete your preferences for a specific application, you know exactly where to go without searching around. Personally, I think this should be enforced by the operating system instead of leaving it up to the developers.
- mcnichol 8y agoGonna say I expect to see the dot files and don't really care. I think to be upset over that is just looking for a fight. It works across all of my OS's, I know its config specific to the app, and if I want to jump in and get some info it is just a ~/ away...the overhead is so low I've spent more time thinking about it in this statement vs all the time ever wrestling through them or battling tribal knowledge. I guess I just don't see a strong enough argument here.
- actionowl 8y agoThe "Serverless Framework" modified my .bashrc and for that they will never be forgiven.
- basicplus2 8y agoI create my own "home" area so nothing messes with it.. only my stuff resides there as no program knows where it is
- j16sdiz 8y agoMy program is not X-based, it is not designed for Desktop. Why should XDG apply ?
- dkarl 8y agoThis smacks of somebody looking for a problem. If it's not a problem when you don't look, and you have to go out of your way to look, how is it a problem? Anything where your own way of seeing it creates the problem, and you can't describe the problem any other way, you're not ready to pitch it as a problem to other people. Find some harm independent of your perception, and then you've got a reason for people to listen.
- zapzupnz 8y agoThey've explained why it's a problem. Having an alternative viewpoint on "why programs are randomly polluting my home folder, a sensitive location with my personal data, with unwanted files without leaving any trace of their origin" isn't going to help.
- deleted 8y ago[deleted]
- zapzupnz 8y agoAnd to Linux developers who've made the jump to macOS development or are making a cross-platform port, please use NSFileManager to find the paths for this or that, don't hardcode everything into Library/Application Support. Not only that, but a lot of stuff ported from Linux could stand to put things in .app bundles rather than _every bloody where_.
- deleted 8y ago[deleted]
- est 8y agomaybe we do need some kind of registry, tree based key-value with an API for access.
- jesseschalken 8y agoYou're never going to be able to stop developers dumping their shit in ~/. The best you can do is create your own directory like ~/Data to put your stuff in. Since programs don't already know about it, it will stay clean.
- AnonymousRider 8y agoI agree. If I hit ‘Ctrl-H’ my lovely, clean Nautilus File Manager becomes a heinous, ugly clutter which is impossible to navigate. I’ve tried to delete some or move others to no avail. Please follow this standard. It’s clean, organized, and beautiful. Once done, we can then tackle the next problem (I’m looking at you & Snaps Shuttleworth!).
- revskill 8y agoI hate dotfiles, simply because it's not programming. It's configuration.
- deleted 8y ago[deleted]
- h1d 8y agoHomebrew just started offering Linux support but they would put stuff under /home/linuxbrew/ but wtf is this about? Won't be using until this is fixed. https://docs.brew.sh/Linuxbrew https://docs.brew.sh/Linuxbrew
- saagarjha 8y agoI haven't used Linuxbrew, but Homebrew is kind of finicky if you try to install anything to a non-standard folder. I remember a while back they used to say "you can change the default folder" but then later said that this was not recommended.
- eeeeeeeeeeeee 8y agoYep, I tried to run mine in ~/.homebrew but gave up. I can't remember why, but stuff was breaking and it was clear Homebrew didn't want you to do it. I've spent some of my career building packages from source and I know the assumptions you get stuck with because the app developer hard-codes certain things. So it makes sense they just go for what is most standard and expected.
- eeeeeeeeeeeee 8y agoI definitely have looked at my home directory in awe at the number of dot files, but I think the article is a bit hyperbolic. I get that it's "clutter" but I think the simplicity of storing configuration in $HOME might be worth that trade-off. Even the $XDG_ env variables still require the user to set that up, or the OS maintainer needs to set it up. If the OS maintainer sets it up, the user probably won't know where to find configuration. The reason $HOME is so commonly used is because the developer knows with almost 100% certainty that the unprivileged user will 1) be able to read/write to it without superuser privileges and 2) it keeps all configuration data contained in the user's home directory for portability, instead of throwing it all over the file system in locations nobody will know. That portability will come in handy when you're backing up or restoring from backups, which I just did yesterday. It means restoring is as simple as copying your entire home directory back. I don't need to tell each app where my configuration is, it just knows it will be in $HOME. And that assumption will be correct for almost any *NIX-based operating system. I do agree that non-dotfiles should not be created in $HOME, that is a nuisance.
- eletious 8y agoYou missed the point - they default to a dotfolder where all of those dotfiles go. You likely already have one! The default is there to allow users and OS maintainers to not worry about it. It still goes in your home directory, but at least it's organised.
- user501254 8y agoSomebody had to say it! Thank you!
- upofadown 8y agoYeah, great, rather than just going to the .foo directory for the foo program to find user specific state for that program I have to first figure out where the particular distribution likes to put things by default and then hunt through something like 5 different hierarchies for the foo directory. The "old" way forced program developers to put things in a very specific place. The new way allows then to interpret the XDG standard however they want and scatter everything all over the place.
- calvinmorrison 8y agoWouldn't a simple union mount + cron job solve this problem relatively easy?
- crooked-v 8y agoI just published an NPM package to help deal with this kind of thing for Electron apps and the like: https://www.npmjs.com/package/basedirs https://www.npmjs.com/package/basedirs Warning, its Windows support is all theorycraft so far (Travis CI + Windows is totally broken for Node projects right now). PRs welcome if anyone wants to give it a try.
- LoSboccacc 8y ago> decided to hijack the primary location designed as a storage for my personal files. that's the basic misunderstanding, the user folder is for everything that's not system wide on a multiuser system; it's not there for your convenience, it's there to allow programs a writable space that doesn't conflict with everyone's else. instead of subdirectoring everything else pretending programs to follow some weird never agreed upon specification, just add a "document" folder and put your user generated content there, problem solved. Edit: apparently even on "hacker news" the mentality of forcing everyone else into obeying instead of solving minor inconveniences the only logical way has taken hold. Not even on widows with their nice buckets and environment variables could solve this, resulting in an exposion of games, my games, three app datas, documents/pictures/videos with apps doing whatever (i.e. shadow play putting screenshots under videos) but no, Rando comes over recycling three environmental variables that are specific of a program and everyone sucks up to it ignoring all the technical, social and other issues to the approach, while shitting upon the only sensible action that can and will work. So much for applied brains.
- jxramos 8y agoWow I though this was going to be about graphing dot files and I was like what could this madness possibly be about. But hidden dot files, eg “.fileXYX” is spot on in the problems of their proliferation.
- Tucanix 8y agoI create a "Library" directory on my machines because of this, it's not a great fix at all but it makes it a little more sane. With this I can also more easily sync my files across machines.
- minitech 8y ago> It is beyond me why my home directory ended up up containing a node_modules directory, package-lock.json, a yarn.lock file (I have never even consciously used yarn!), Sounds like there’s a bigger problem.
- qwerty456127 8y agoWhy do we even need hidden files? Why not just put all the configuration files/directories under a single directory specifically dedicated for this and use file system attributes for all the directory-local metadata?
- tomxor 8y agoI realised that keeping a clean user home directory was futile long ago... this is not even unique to linux or *nix. Just don't put anything you care about in home directories: in the modern world people own computers not user accounts, you likely have ultimate control over your system, therefore designate your own "home" directory, don't give the other "developers" the choice to polute it by making it non-standard. I like to be able to nuke my user-home directory whenever I like, I achieve this without pain by additionally placing my hand picked application configurations that I care about into a read only XDG config directory.
- CivBase 8y agoThe title seems misleading. The problem here isn't dotfiles. The problem is that developers are using $HOME instead of a standard directory for storing user-level config files. I had never even heard of $XDG_DATA_HOME before reading this article.
- bigbugbag 8y agoI have abandoned my home directory to this madness. I have a home sub folder where my actual home lives allowing for portability. This trend is killing the usefulness and practical aspects of having a home folder.
- eithed 8y agoOn Windows I've never put anything in C:/, yet I have a shitload of install.res.xxxx.dll files, shitload of eula.xxxx.txt files, globdata.ini, vcredist.bmp, install.ini, VC_RED.msi. In my home folder I've .QtWebEngineProcess folder (never installed qt), .mongorc.js (which is empty), .v8flags.xxxx.json, .dbshell, and so on and so on. I'm not delving into insanity which is /Program Data, Windows/Temp, or [user]/AppData