13 ms·
To 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 aut
by nycticorax 8y ago
To 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?
- emgee_1 8y agoSorry I do not want a directory /Documents if /docs is what i want when i want it...
- boreq 8y agoIt is your lucky day - there is a standard for this as well https://wiki.archlinux.org/index.php/XDG_user_directories https://wiki.archlinux.org/index.php/XDG_user_directories
- gerdesj 8y agoI've only been using Linux for around 10 years as my only desk and laptop OS and this is the first I heard of XDG user dirs! This laptop runs Arch. Thanks for the heads up. I'll drop "/etc/papersize" in return. If you are not familiar with this and do not print to letter paper then you will find it very, very useful.
- dbrgn 8y agoOh wow. If this does what I think it does, I'll be forever grateful for that comment.
- gerdesj 8y agoIt really does make CUPS, Libre Office and all the rest believe you when you say "I want to print on A4, yes A4, no not fucking Letter, A4, end of!" Obviously, substitute your paper size of choice. It probably even lends itself to some form of scripting and perhaps could be changed in reaction to events from say NetworkManager. Whatever. My life at home is now worth living every time the wife hits print. Such a simple idea - brilliant.
- nycticorax 8y agoMaybe I'm being unfair to the snap devs. But maybe not. Comments like this don't inspire confidence: https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053/comments/158 https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1575053... Also, the bug was first reported in 2016, and Mark Shuttleworth himself has commented on it. And yet it's still not fixed. That gives me the impression that the devs don't consider it super-important. Which is odd to me, since I consider not doing this kind of thing to be 'table stakes' for any application that wants me to take it seriously. > 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? Ummm, I came from Linux before they started having default Documents, Videos, etc folders. And, like I said, the nice thing is that, in Linux, I can change the XDG environment variables and delete the (IMHO) foolish Documents, Music, Videos, etc folders.
- dijit 8y agoSame for the default gopath. That was horrifying the first time. At least you can override it.
- weberc2 8y agoDefault gopath was just a way to let newbies get up and running quickly; it originally required you to specify where to put it. I imagine they put it at ~/go so it would be glaringly obvious. Hopefully modules will render it all moot anyway.
- ecnahc515 8y agoThey put it at ~/go because that's what every official document used as the example $GOPATH, before it had a default value, so it's largely just to minimize change from what they previously recommended. That said, for something like source code, it makes sense to go into $HOME, so I don't understand this particular complaint the other poster made.
- tinco 8y agoOther people's code shouldn't be in my $HOME if I didn't put it there explicitly. If it's part of the dependencies of a project, it should be either in a cache directory of that particular project, or in the cache directory of the build tool (that preferably conforms to XDG), like all sane build tools do. GOPATH is an incomplete (thus incorrect) solution to a problem that was being solved correctly and completely in other languages (like Ruby). It's weird that the Go developers were working in such isolation that they didn't pick up on this. All programming languages that I know of that work on modern tooling (Haskell, Rust, Node.JS, even C#!) adopted the Ruby style dependency management when it turned out to be correct years ago.
- empath75 8y agoRuby dependency and version management is as much a clusterfuck as any other language, imo.
- vandorjw 8y agoI use ubuntu 18.04 (kde) and my snap folder is /snap I don't know how I did this.
- gnomewascool 8y agoDo you just have a /snap directory and no $HOME/snap? Normally, snap creates /snap for the binaries (shared among all users) and $HOME/snap for the per-user configuration/data files.
- johannes1234321 8y agoRunning something with sudo?
- therein 8y agoI am using snap on Arch and my snap folder is /snap as well.
- gnomewascool 8y agoThis is particularly weird, since click (snap's "predecessor" at Canonical/Ubuntu) was fully XDG compliant, even encouraging developers to separate data from cache etc. (unlike flatpak which just dumps everything in ~/.local/share/[...], though that is still infinitely better than using ~/snap).
- rjzzleep 8y agoI personally don't like xdg. I have bin files from pip and other stuff in ~/.local/bin. I have huge amounts of cache files in both .cache and .config. It's supposed to make my life easier by being able to backup .config and dump everything. but in reality this doesnt happen. Backing up .config for just the user defined configs is a massive PITA. you have to put so many gitignore exceptions and I'm not even talking about the gigs of data all the chromium derivatives put into that folder.
- gumby 8y agoCan you ln -s /tmp .cache. ?
- lugg 8y agoYou can try. I mount .cache as tmpfs. You need at least 500mb for your browser alone. Browsers tend to work fine. Some apps just fail badly like rofi (command history stored there oof) For what it's worth I also tmpfs+asd .nvm, .npm, and */node_modules, without any major headaches. I did have to fix a couple minor pathing dramas but nothing too drastic.
- OJFord 8y agoYou can export XDG_CACHE_HOME=/tmp
- chmln 8y ago> you have to put so many gitignore exceptions and I'm not even talking about the gigs of data all the chromium derivatives put into that folder Yeah but chrome devs half-assing the trivial xdg spec doesn't mean that xdg sucks - its just not implemented properly.
- amelius 8y agoSuggestion. Just do: mkdir ~/real_home And use that as your real home :)
- featherrust 8y agoYou're not my real dad!
- theon144 8y agoAh, just like on Windows, where one has to create a second My Documents folder to maintain sanity. Ew.
- themodelplumber 8y agoI have a slightly different pet peeve. I don't like applications that default to saving files to my home folder. I wish they would look for e.g. /home/user/Documents or whatever else seems appropriate and even semi-standardized given the type of file. But just dropping stuff in my home directory--look, if I'm in a hurry and my defenses are down, you basically just encouraged me to clutter things up. The last software I found that does this is a "download helper"...even though I have a Downloads folder that my distro already set up, that Chrome and Firefox know to use, this download helper thinks I want those downloads dumped in my home folder. I hope some generous person changes this behavior, meanwhile I forgot to charge it manually for the last batch and I have a bunch of cleanup to do.
- rovr138 8y agoThat’s what the article talks about. How applications should use $XDG_DATA_HOME, $XDG_CONFIG_HOME and $XDG_CACHE_HOME and some defaults if they’re not set.
- themodelplumber 8y agoI'm not seeing it. Where does XDG define when and how an app should use: /home/user/Documents/ /home/user/Downloads/ /home/user/Pictures/ /home/user/Videos/ Let me know what I'm missing.
- nycticorax 8y agoI can't find "official" XDG documentation of this, but the Arch Wiki describes, for instance, the XDG_DOCUMENTS_DIR and XDG_VIDEOS_DIR environment variables: https://wiki.archlinux.org/index.php/XDG_user_directories https://wiki.archlinux.org/index.php/XDG_user_directories It looks like maybe the "official" documentation is here: http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.17.tar.gz http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.17... But I haven't gone through that carefully.
- petemc_ 8y agoWhy would it have to define those directories in particular?
- ljm 8y agoThis strongly reminds me of installing software on Windows, where most games and programs would use My Documents as a dumping ground.
- user5994461 8y agoIt's fair to store documents and saved games in My Documents. Much better than storing them in C:\Windows or C:\Program Files, as was the case a decade ago, before windows introduced UAC and blocked write access to these.
- SpaceManiac 8y agoIt's senseless to store files that don't have user-facing meaning in My Documents. I know games that use it varyingly for web caches, shader caches, binary config files, debug logs, Lua scripts, downloaded mods, and even executables. And while arguably most gamers understand what save files are, they can't be double-clicked to open them, so I don't consider them documents (Maybe this is pedantic). All this kind of stuff is what Appdata\Roaming and Appdata\Local are supposed to be for.
- Dayshine 8y agoSave games is a poor example. Users often need to back them up. Backup systems often include Documents by default but not AppData. Files in AppData are hidden, and you would not expect users to find them. Further, many save games can be opened with a text editor just fine :)
- wongarsu 8y agoI understand not backing up AppData/Local, but everything in AppData/Roaming is supposedly important enough to sync it over the network (if you use domains or another mechanism to give you the same Windows account on multiple computers). Any default policy which doesn't back up AppData/Roaming seems ill advised.
- bscphil 8y agoLots of programming languages and IDEs seem to do this. Rosegarden (the sequencer) and Steam (last time I tried anyway) both create folders right under my home folder as well. Barbarism is right.
- Spivak 8y agoUse the flatpak for Steam! It makes almost all my headaches with the platform disappear including the .steam directory.
- fiatjaf 8y agoI don't understand the whole Snap thing. Not a single snap has ever worked in any of my computers in the past 5 years (I've tried maybe 5 or 6), and they always say they'll add themselves to the system. Add where? Where are these beasts hiding?
- pletnes 8y agoI just «snap install pycharm» and it shows up ready for work. Never had an issue with a snap. Can’t recall where it’s stored, but that’s easy to determine with «which». This is on ubuntu 1{6,8}.04 fwiw.
- fiatjaf 8y agoOh, I was talking about AppImage, not Snap. Sorry. I actually tried the Snap thing too, I don't remember how it went but I would say it was bad. I think I couldn't find a way to search for packages from the CLI.
- pletnes 8y agoSnap search?
- AnIdiotOnTheNet 8y agoIf you're speaking of AppImage, what do you mean by "where are they hiding"? AppImages are quite literally exactly where you put them and nowhere else.
- fiatjaf 8y agoSo why do they ask me to allow them to add themselves to the system?
- AnIdiotOnTheNet 8y agoProbably that was appimaged, the daemon that handles some convenience things like menu integration and attempting (but usually failing) to show appimage files with icons. appimaged is entirely optional.
- afiori 8y ago> And when people complain, the devs have the gall to suggest that this is all fine From my impression the answer was more "we set up things in a hurry because of deadlines and now we are stuck with this until we implement the epoch system"
- pvg 8y agoBut 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. If every desktop application that needed to store cross-invocation state asked for permission we'd probably say it was an invasion of bad-design huns.
- airstrike 8y ago%APPDATA% doesn't require permission
- jorvi 8y ago> 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. Yuuuup. It baffles me how Linux users can simultaneously complain that 'its never the year of the Linux desktop' and then at the same time rile against basic usability tenets. The average users wants/needs Documents, Pictures, Videos, etc folders, and it wants the OS to be aware and use these as such. Now I'm okay with being able to set a specific flag that doesn't make these folders during install, but by default they absolutely should be there, unless you're doing a server install.
- phkahler 8y agoThey should not be created by default and left empty.
- nycticorax 8y agoWell, I know that I hate them. And I know a lot of other people that hate them. And I'm pretty suspicious of 'features' that allegedly make life easier for naive users by definitely making life harder for experienced users. And I guess I would call it a "basic usability tenet" that the computer does what I tell it to. Documents, Music, and Videos folders violate this, because if I do the seemingly-obvious thing of just deleting them, the applications that want to use them will just recreate them unless I edit ~/.config/user-dirs.dirs. So, if developers really think they need to 'help' their 'average users' by creating these folders by default, they should finish the job and honor my desire to not use them, which I've expressed by deleting the damn things. Also, if I want to rename them, the system should honor that. E.g. if I rename "Music" to "music", applications should not then go and re-create a "Music" folder. Or, you know, they could just simplify my life and theirs by not creating these 'special' folders in the first place.
- AnIdiotOnTheNet 8y agoDamn straight. Where does the system get off trying to tell me how I should organize my stuff? Keep system stuff in a folder for system stuff and the rest of the file hierarchy is mine, because it is my goddamned computer. The original Mac got this right and no one else has since.
- Aeolun 8y agoI have great difficulty understanding why the snap developers think the excuse “it’s hard to change!” flies. If it’s hard to change, you should’ve either fixed your architecture from the start, or thought a bit harder about the implications of magically creating a new directory in $HOME.
- krferriter 8y agoIt shouldn't be hard to change unless the string "/snap" is hardcoded all over the codebase. There should be a function like "get_app_dir" or "get_install_dir" or some other config string lookup that doesn't use a static string.
- OJFord 8y agoThey probably mean it's hard to migrate existing users and not break.
- _emacsomancer_ 8y agoSnaps sound good in principle and aren't a horrible solution when they work, but despite the tagline ('Snaps are universal Linux packages') it's not clear that they work well outside of Ubuntu: they aren't sandboxed unless Apparmor is present, and despite their touted 'universality' have a hard (and unnecessary) dependency on systemd. At this point, Guix and Nix seem the most promising for cross-distro packages.
- krferriter 8y agoYeah it is crazy when I noticed Ubuntu created a ~/snap folder that is required when anything is installed via snap. People defend placing application data/config folders in ~/ because they're old and it's always been like that, but Snap is brand new and they still neglected to follow the modern standard. Other "new" softwares that fail to follow best-practices by putting top level files into ~/ just on my laptop are: npm, Ansible, pylint, docker, steam, rustup+cargo, vscode, IDEA IDE, Zoom, AWS CLI. These applications have no excuse. Also I agree on the Documents, Music, Video, etc. I hate upper case letters in my folders, so when I do a reinstall I delete those and restore my backups from the lower-case versions.
- Spivak 8y agoYou can customize those 'well known' directories. https://www.freedesktop.org/wiki/Software/xdg-user-dirs/ https://www.freedesktop.org/wiki/Software/xdg-user-dirs/ The Arch wiki has more instructional docs: https://wiki.archlinux.org/index.php/XDG_user_directories https://wiki.archlinux.org/index.php/XDG_user_directories
- widforss 8y agoI use a tool from ESA called Snap. It defaults to ~/snap as well. Oh, the collisions.
- bigbugbag 8y agoI'm not surprised, I left ubuntu a decade ago because their way of doing things was causing me headaches and they did not seem to care, all that seemed to matter was bug 1 : becoming microsoft in place of microsoft.