Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the XDG spec is pretty petty. What difference does it make that the files are in ~/.config/mozilla instead of ~/.mozilla? And calling it a bug is presumptuous.


The difference is that I don’t use standard XDG directories because I loathe dot-files, loathe hidden directories, and so I declare my own environment variables to put everything where I want.

Then Firefox (and ansible, and many others) comes barreling in dropping an unconfigurable dot-directory in my fucking home folder ignoring the perfectly good XDG variables I have set.

It is a constant struggle to stop my home folder from not feeling like my home. Developers ought to learn some fucking respect.


This, I set an alias for `adb` to use `"$XDG_DATA_HOME"/android` instead of `~/.android` because it stores the keys there for whatever reason. I would rather not see my home folder being cluttered with hidden files, it makes backing things up unnecessarily complex.

    export ANDROID_USER_HOME="$XDG_DATA_HOME"/android
    alias adb='HOME="$ANDROID_USER_HOME" adb'


Don't forget Gradle ("GRADLE_USER_HOME") and OpenJDK ("-Djava.util.prefs.userRoot"), those too litter.


Perhaps you should've started to launch your shell in "~/home" instead of "~". Now your home is 1 level down, and the only downside is typing "/home" after the tilde.


You could try flatpak Firefox, if that works for you then it takes care of that


There are multiple reasons for this.

One being that it's _my_ $HOME, not some random developers'. I literally had more than 50 different dotfiles and dotfolders in my $HOME at some point. It was a garbage dump and I couldn't even identify the culprit with some of them. Simply disrespectful.

Then there's the issue of cleaning up leftovers and stale cache files. It shouldn't take a custom script cleaning up after every special snowflake that decided to use some arbitrarily-named directory in $HOME.

Not following the spec also makes backing up vital application state much much harder.

In the end, I made my $HOME not writeable so I could instantly find out if some software wants to take a dump. It turns out it's often simply unnecessary as well, the software doesn't even care, just prints an error and continues.


> It shouldn't take a custom script cleaning up after every special snowflake that decided to use some arbitrarily-named directory in $HOME.

Not to take away from your point but I shall introduce you to systemd-tmpfiles

no scripts needed, it can clean up for you if you keep a list of directories/files to clean up


> In the end, I made my $HOME not writeable so I could instantly find out if some software wants to take a dump

A brilliant idea, but goddamn what a shame it is that we have to do such things to keep our homes clean


the main benefit (which even with this change, Firefox won't get) is the separation of configuration, cache files, binaries etc which sysadmins likely want completely different policies for. e.g. cache shouldn't be backed up, config shouldn't be executable etc


Firefox already had the benefit with respect to cache files. They've been in ~/.cache/mozilla for at least 7 years now.

Your point is valid for config/data split, but that seems to be a judgement call and many applications do things differently there.


applications doing many different things here is exactly what the xdg protocol is meant to fix.


By "doing many different things", I meant that everything disagrees on what should be config and what should be data. People will disagree with any division you pick for something with as varied types of data as a web browser. And some of them will be right, and for good reasons, which means you'll have to sign up for repeated migrations across different versions.

I'm not saying it's a bad idea to try to follow xdg, just that it's a complex and ongoing thing. It's a good example of the "Just do X!" fallacy.


Have you ever `ls -al ~/` on a heavily used unix system? Absolute rot and chaos. I have like 100 hidden directories+files in the root of my home directory. Some of them are caches, some are configs.


And now "absolute rot and chaos" is in "~/.config". What is the difference?


I don’t have to look at it quite as often, and i know to back up .config and ignore .cache.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: