News for hackers. Stuff that matters.
Re:Dotfile madness by nycticorax on Saturday February 02, 2019 @01:04PM (#19064523)
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

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.

Re:Dotfile madness by gnomewascool on Saturday February 02, 2019 @01:47PM (#19064828)
This 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).
Re:Dotfile madness by rjzzleep on Saturday February 02, 2019 @05:54PM (#19066329)
I 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.

Re:Dotfile madness by chmln on Saturday February 02, 2019 @07:13PM (#19066811)
> 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.

Re:Dotfile madness by Something1234 on Sunday February 03, 2019 @12:38AM (#19068066)
I think xdg has an issue of being obtuse when I googled it a while ago, it was very confusing, and I didn't find any real definitions. However I didn't look that hard.
Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @01:39AM (#19068185)
Freedesktop standards are nothing if not overly complicated and confusing.
Re:Dotfile madness by wilmoore on Saturday February 09, 2019 @02:59PM (#19124249)
I agree, you didn't look very hard.
Re:Dotfile madness by gumby on Saturday February 02, 2019 @06:33PM (#19066588)
Can you ln -s /tmp .cache. ?
Re:Dotfile madness by lugg on Saturday February 02, 2019 @07:21PM (#19066858)
You 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.

Re:Dotfile madness by OJFord on Sunday February 03, 2019 @08:05AM (#19069369)
You can export XDG_CACHE_HOME=/tmp
Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:19PM (#19067812)
I just use 'exa' with --ignore-glob option to filter out unnecessary folders as 'ls' replacement and things are clean.

It also has an option to ignore entries listed in your .gitignore.

Re:Dotfile madness by wilmoore on Saturday February 09, 2019 @03:06PM (#19124286)
So, invest in yet another program that likely further exacerbates the issue just to sweep the underlying issue under the rug?
Re:Dotfile madness by afiori on Saturday February 02, 2019 @06:12PM (#19066464)
> unlike flatpak which just dumps everything in ~/.local/share/[...]

Here you are referring to separating the config and data? Is this actually a problem? I can see how for things like games it would be valuable to have a special location for thing like saves games, like how you can move the roaming save for minecraft from a computer to another; but I never understood the net gain from splitting the application files in config/data

Re:Dotfile madness by wilmoore on Saturday February 09, 2019 @03:02PM (#19124264)
Curated configuration generally outlives data. If storage space becomes an issue, there is value in recovering storage space but config is generally small and much more important in the long term.
Re:Dotfile madness by JetSpiegel on Saturday February 02, 2019 @08:20PM (#19067126)
Config is the personal, but public data. "Data" is personal private data.
Re:Dotfile madness by krferriter on Sunday February 03, 2019 @12:01AM (#19067965)
Yeah 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.

Re:Dotfile madness by Spivak on Monday February 04, 2019 @03:04PM (#19080099)
You can customize those 'well known' directories.

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

Re:Dotfile madness by ljm on Saturday February 02, 2019 @04:18PM (#19065776)
This strongly reminds me of installing software on Windows, where most games and programs would use My Documents as a dumping ground.
Re:Dotfile madness by int_19h on Saturday February 02, 2019 @07:39PM (#19066927)
Windows actually has the same dotfile infestation problem these days. I mean, you still get stuff in Documents that shouldn't be there, but on top of that you get apps - often Unix ports - that believe that %USERPROFILE% (i.e. one folder above Documents) is the appropriate place for their configs and such (it's not - that should also go into AppData\Local or \Roaming as needed). And they usually use a dot-prefixed name, just because.

I just looked at my Win10 profile dir, and it has 36 dot-prefixed folders, and 7 more files on top level. Offenders include .gitconfig, .rustup, and .vscode, just to name a few.

Re:Dotfile madness by jimmaswell on Sunday February 03, 2019 @12:24AM (#19068030)
On Windows, you could move the configs elsewhere, make a symlink to them in the old place, and mark the symlink as hidden so you don't see it in explorer. Too bad this can't work on Linux because the hidden-state is encoded in the filename.
Re:Dotfile madness by int_19h on Sunday February 03, 2019 @02:15AM (#19068264)
Well, the hidden-bit on Windows is really semantically equivalent to dot-prefix on Unix, and people set up their file managers to show such files for similar reasons (I don't even use Explorer, mostly). In Win10, it's even exposed as a setting in Settings | For Developers
Re:Dotfile madness by SomeHacker44 on Sunday February 03, 2019 @10:38AM (#19070122)
What do you use in lieu of Explorer, out of curiosity?

15 year Mac user (re)exploring Windows due to bad hardware...

Re:Dotfile madness by int_19h on Sunday February 03, 2019 @04:34PM (#19072382)
For actual file management, and generally working in the terminal, I'm firmly in the "two blue panes" club, so it's Far Manager on Windows (and Midnight Commander on Linux). Far is probably the most advanced text-mode file manager in general right now.

https://www.farmanager.com/screenshots.php?l=en

Re:Dotfile madness by rffn on Sunday February 03, 2019 @12:20PM (#19070814)
Compared to 15 years ago I think Explorer is much better now, it could be even called usable.

Nevertheless there are alternatives. One liked by many are Norton Commander alike file managers like Total Commander or even Far. I am not too much in favor of them though.

I like to use Directory Opus. It is powerful and flexible. Costs money though.

Re:Dotfile madness by anothermindbomb on Sunday February 03, 2019 @06:24PM (#19072880)
Re:Dotfile madness by user5994461 on Saturday February 02, 2019 @04:26PM (#19065822)
It'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.

Re:Dotfile madness by SpaceManiac on Saturday February 02, 2019 @04:37PM (#19065897)
It'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.

Re:Dotfile madness by Dayshine on Saturday February 02, 2019 @05:30PM (#19066200)
Save 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 :)

Re:Dotfile madness by wongarsu on Saturday February 02, 2019 @06:02PM (#19066381)
I 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.
Re:Dotfile madness by user5994461 on Saturday February 02, 2019 @07:16PM (#19066842)
It's ill advised to synchronize game saves by default. Quite a few popular games generate gigabytes of saves.

My witcher saves were 10GB, until I realize that problem and deleted them, no wounder backups were slow. Skyrim is not that far off.

Pretty sure backup is already integrated in steam for these two games.

Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:31PM (#19067865)
I don't know what they save but 10GB is surely not purely saved games. It's those games fault not about 'saving saved games by default'.
Re:Dotfile madness by zingmars on Sunday February 03, 2019 @04:51AM (#19068678)
Nope, Witcher 1 saves are just really large (for some reason in addition to all the flags they also contain some locale data and such). 10GiB is actually pretty reasonable for a Witcher playthrough.
Re:Dotfile madness by user5994461 on Sunday February 03, 2019 @10:24AM (#19070034)
It's similar in the Witcher 2, 3 and Skyrim. The saves start small and they grow to 10MB as you progress in the game. I guess there is a lot of world state and items to hold in an RPG. Count a few hundred saves, manual or autosave and that's a lot of space.

In the witcher 1 there is also an uncompressed BMP thumbnail with each save that is about a megabyte. It's PNG compressed in the witcher 2. They learned from their mistake.

Re:Dotfile madness by Dayshine on Sunday February 03, 2019 @04:19AM (#19068582)
My "Roaming" is 12GB. I don't think Chrome and Firefox listen to that advice.
Re:Dotfile madness by wongarsu on Sunday February 03, 2019 @04:31AM (#19068620)
My AppData/Local is 14GB, mostly caches from Chrome, Firefox and Spotify. My AppData/Roaming is 3.3GB, mostly my emails (with my Browser's localstorage a distant second).

Chrome's cache is in AppData/Local/Google/Chrome/User Data and Firefox's cache is in AppData/Local/Mozilla/Firefox/Profiles/. The only big offender on my system is npm with a cache in AppData/Roaming/npm-cache

Re:Dotfile madness by ygra on Sunday February 03, 2019 @05:31AM (#19068829)
Thunderbird infamously places the local copy of IMAP mails (i.e. Effectively a cache) into Appdata\Roaming. It's the single largest directory I have there. Everything else is quite reasonable in size.
Re:Dotfile madness by ChrisSD on Saturday February 02, 2019 @06:34PM (#19066596)
As noted below there's a special folder called "Saved Games" that's specifically meant for this purpose. A lot of games still don't use it.
Re:Dotfile madness by user5994461 on Saturday February 02, 2019 @07:48PM (#19066980)
To be fair it's widely used now, it just took a while to adopt because of compatibility issues.

Finding the directory requires new APIs introduced in Vista and Server 2008. See SHGetKnownFolderPath

Re:Dotfile madness by ChrisSD on Saturday February 02, 2019 @08:51PM (#19067261)
Sure but in the non-game software world we'd do a runtime check to see if the OS was Vista or later and fallback if not.
Re:Dotfile madness by user5994461 on Sunday February 03, 2019 @10:31AM (#19070075)
You can't do it as a runtime check. You have to compile the software with the flags to import and link to the latest windows library. The program will hard crash if run on an older version.

I just tried to use the API. I literally couldn't find a working example on the internet in 2 hours so I guess noone figured it out in a decade.

Wrote https://stackoverflow.com/a/54499257/5994461

Re:Dotfile madness by ChrisSD on Sunday February 03, 2019 @04:39PM (#19072402)
What's wrong with calling IsWindowsVistaOrGreater[0]?

[0] https://docs.microsoft.com/en-us/windows/desktop/api/version...

Re:Dotfile madness by user5994461 on Sunday February 03, 2019 @05:15PM (#19072586)
You won't have the chance to call anything. If the executable is statistically linked to the latest API, the executable won't be able to load on older systems.

I'm surprised that these new IsWindows...() functions claim compatibility down to Windows 2000. Doubt microsoft knew how they would name their next release 20 years ago. A Google search indicates that they are in fact broken.

Re:Dotfile madness by ChrisSD on Sunday February 03, 2019 @06:58PM (#19073003)
You won't be able to compile with the function imported using the modern lib (because it doesn't exist on XP) but you can conditionally link it at runtime with LoadLibrary/GetProcAddress.

If IsWindows... doesn't work then you can use the VerifyVersionInfo function directly.

Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:28PM (#19067848)
Why did they have to narrow it down to games? Could just go with "Saved config (and data)", so other apps could just dump small config files which can be effectively backed up.
Re:Dotfile madness by runxel on Saturday February 02, 2019 @07:09PM (#19066791)
And here I am, still wanting my save files to reside next to the games exe...
Re:Dotfile madness by ChrisSD on Saturday February 02, 2019 @07:43PM (#19066955)
Fair enough but on multi-user systems you can surely see the value in separate save game folders?
Re:Dotfile madness by chii on Saturday February 02, 2019 @09:34PM (#19067443)
when was the last time a gaming machine is a multi-user system?!
Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:30PM (#19067855)
Since when every person in a house has their own gaming PC?
Re:Dotfile madness by ChrisSD on Saturday February 02, 2019 @09:51PM (#19067505)
I'm currently typing this on a machine that's used for gaming by more than one person.
Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @11:44AM (#19070570)
There's no reason there couldn't be separate per-user folders within the game's installation path for that.
Re:Dotfile madness by not_kurt_godel on Saturday February 02, 2019 @11:17PM (#19067806)
Do you also store your birth certificate in your car's glovebox?
Re:Dotfile madness by runxel on Sunday February 03, 2019 @05:05PM (#19072524)
What a misleading comparison...

I don't even get what you want to say.

Re:Dotfile madness by not_kurt_godel on Sunday February 03, 2019 @08:34PM (#19073337)
A game's exe dir is a long-lived but potentially replaceable thing, like a car. Saved games may be persisted across game versions, so you don't necessarily want them to be in the same directory. Admittedly not the best analogy, but was just observing that it's strange and incongruent to store the 2 together.
Re:Dotfile madness by jamiepenney on Saturday February 02, 2019 @08:25PM (#19067151)
I haven't used My Documents for documents for years now. The directory is useless because of all the cruft, I store useful things elsewhere now.
Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:33PM (#19067873)
My Documents meant as /var/tmp to me ever since it existed. Never put my own files there.
Re:Dotfile madness by sixothree on Saturday February 02, 2019 @06:51PM (#19066693)
It is not okay for some application to store files in My Documents folder. If it's not MY document then it doesn't belong in My Documents.

The user folder exists for a reason. Drop your crap in there.

Re:Dotfile madness by jimmaswell on Sunday February 03, 2019 @12:28AM (#19068043)
It hasn't been "My Documents" since Windows XP. It's just "Documents" now, so if we're taking the name literally, then any document can go there.
Re:Dotfile madness by sixothree on Sunday February 03, 2019 @12:41AM (#19068072)
To be pedantic, My Documents still exists as shortcuts in the user folder.
Re:Dotfile madness by h1d on Saturday February 02, 2019 @11:22PM (#19067828)
That's why I just let them be and create 'Data' folder at the drive's root where no one will taint and to keep the way I want organized.
Re:Dotfile madness by eeeeeeeeeeeee on Sunday February 03, 2019 @12:00AM (#19067962)
Which is sort of an improvement from the past, where user-level config data was thrown into the actual app directory in "program files." So if you ever wanted to back-up those settings, you needed to track down every single unique location for each app.
Re:Dotfile madness by jeffchien on Saturday February 02, 2019 @06:37PM (#19066618)
If it's the entire game, it might be to allow kids to install the game without administrator privilege (read: parental knowledge/consent), though I agree that letting people choose would be best.
Re:Dotfile madness by Spivak on Saturday February 02, 2019 @08:46PM (#19067245)
If your kid can write and execute in any directory on your system then they can run whatever software they like.
Re:Dotfile madness by jeffchien on Sunday February 03, 2019 @03:11AM (#19068397)
What? I'm not sure how that connects to my comment. I'm saying that some games install to "My Documents" to avoid requiring administrator privilege for users who might not have that privilege.
Re:Dotfile madness by Spivak on Sunday February 03, 2019 @09:21AM (#19069658)
Sorry, definitely missed the context on that one. Why wouldn't you want to install in AppData/local?
Re:Dotfile madness by themodelplumber on Saturday February 02, 2019 @02:47PM (#19065210)
I 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.

Re:Dotfile madness by rovr138 on Saturday February 02, 2019 @03:59PM (#19065678)
That’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.
Re:Dotfile madness by themodelplumber on Saturday February 02, 2019 @04:03PM (#19065695)
I'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.

Re:Dotfile madness by nycticorax on Saturday February 02, 2019 @04:45PM (#19065929)
I 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

It looks like maybe the "official" documentation is here:

http://user-dirs.freedesktop.org/releases/xdg-user-dirs-0.17...

But I haven't gone through that carefully.

Re:Dotfile madness by amlib on Saturday February 02, 2019 @08:47PM (#19067249)
You should be able to change the default settings for these directories by changing /etc/xdg/user-dirs.defaults (system-wide) and ~/.config/user-dirs.dirs (users override)
Re:Dotfile madness by petemc_ on Saturday February 02, 2019 @05:53PM (#19066324)
Why would it have to define those directories in particular?
Re:Dotfile madness by jlarocco on Saturday February 02, 2019 @06:46PM (#19066667)
There's no pleasing everybody.

I strongly prefer apps default to the previously used directory, and the home directory otherwise. IME apps are wrong 99% of the time when they guess their own save location.

Re:Dotfile madness by Aeolun on Saturday February 02, 2019 @08:38PM (#19067214)
I 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.

Re:Dotfile madness by krferriter on Sunday February 03, 2019 @12:05AM (#19067979)
It 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.
Re:Dotfile madness by OJFord on Sunday February 03, 2019 @08:11AM (#19069388)
They probably mean it's hard to migrate existing users and not break.
Re:Dotfile madness by dijit on Saturday February 02, 2019 @01:17PM (#19064612)
Same for the default gopath. That was horrifying the first time. At least you can override it.
Re:Dotfile madness by proactivesvcs on Saturday February 02, 2019 @05:12PM (#19066078)
On Windows Golang defaults to install to C:\. Had no problems running it from Program Files instead. It's crazy that a new programming language cannot follow decades-old conventions!
Re:Dotfile madness by marcosdumay on Saturday February 02, 2019 @05:55PM (#19066343)
Python did this until very recently too. Windows has a problem, because people expect to use those programs in the command line and the %PATH% has a size limit and is a bit difficult to set-up properly.
Re:Dotfile madness by wongarsu on Saturday February 02, 2019 @06:09PM (#19066444)
The sum of the length of all environment variables has to be below 32767 characters. That doesn't seem like a good excuse to save 14 characters by putting your program's folder in C:/ instead of C:/Program Files/

If you do deeply nested paths (as npm used to do) then you can run against the old MAX_PATH limit that limits paths to 260 characters, but the correct solution is to either choose a flatter directory structure or use the newer APIs that allow paths with 32,767 characters.

Re:Dotfile madness by airstrike on Saturday February 02, 2019 @11:53PM (#19067940)
C:\ isn't protected by UAC like C:\Program Files, though
Re:Dotfile madness by pjmlp on Sunday February 03, 2019 @04:34AM (#19068629)
The correct place to install local user apps is

C:\Users\username\AppData\Local

Or even better to work with localization

%LOCALAPPDATA%

Re:Dotfile madness by wongarsu on Sunday February 03, 2019 @04:22AM (#19068594)
Steam is doing just fine writing into C:\Program Files (x86)\Steam\steamapps from an unpriviledged process. It just gives all users full rights over that folder. (whether that's a great idea is a different question, but UAC isn't a problem if you just set your access rights correctly)
Re:Dotfile madness by WorldMaker on Monday February 04, 2019 @02:21PM (#19079702)
Steam has definitely been handling Program Files wrong for as long as Program Files has existed. It's a marvel that there isn't more historic Malware intentionally targeting Steam install paths, though it looks like that storm is brewing on the horizon as I've seen references to such malware in the process of becoming a problem.

Steam should have worked to figure out a better approach to UAC years ago. At this point it is one of several big tech debt issues with Steam that has my confidence in Valve at an all time low as a consumer.

Re:Dotfile madness by airstrike on Sunday February 03, 2019 @09:47AM (#19069806)
This assumes the user had admin privileges to begin with
Re:Dotfile madness by wongarsu on Sunday February 03, 2019 @11:11AM (#19070359)
If the user never had admin priviledges then you can't install in C:\ either and the program should just install in AppData\Local (as my sibling poster correctly stated)
Re:Dotfile madness by gesman on Saturday February 02, 2019 @06:15PM (#19066486)
I always add C:\U to my Path and store all standalone executable programs to C:\U

I also have C:\CMD for my own batch files.

Every single program should be fully contained in its own directory including all the settings,logging,configuration etc...

No touching of any common resource or repository.

It should be enough to delete single tree to fully uninstall program with all the garbage it created along the way

Re:Dotfile madness by teknopaul on Saturday February 02, 2019 @07:13PM (#19066816)
Most people like to separatly store data and executables for good reasons.
Re:Dotfile madness by gesman on Saturday February 02, 2019 @11:05PM (#19067764)
\Programs\VendorX\ProgramY\data

\Programs\VendorX\ProgramY\code

Re:Dotfile madness by WorldMaker on Monday February 04, 2019 @02:27PM (#19079765)
The problem there is "how lazy is VendorX"? With \Program Files\ Microsoft has a ton of top level ACLs to lock down access to the directories that everything just inherits by default. How much work does the OS need to do to allow something like "folders named `data` under \Programs\ have ACLs XData and `code` have ACLs YCode"? Does it need to watch for silly mistakes like Devs that localize `code` (`Código` for instance) or misspell it (`ocde` or `coode`)?
Re:Dotfile madness by Falkon1313 on Sunday February 03, 2019 @04:52AM (#19068681)
Also would make it easier to backup the program and its data or copy them to a new system.

But it seems because of the idea that some people may want to back up data and config separately, we end up with stuff scattered everywhere, with some even hidden away in the Windows Registry. Makes backups ridiculously complex.

Re:Dotfile madness by nneonneo on Saturday February 02, 2019 @10:43PM (#19067704)
I always thought it was because that space in “Program Files” was troublesome for a lot of programs, particularly command-line ones. IIRC, older versions of MinGW for instance would simply not work at all if installed in a path containing a space, because some of their startup scripts didn’t properly quote all parts of the path.
Re:Dotfile madness by proactivesvcs on Sunday February 03, 2019 @01:11AM (#19068139)
The last time I went near MingW I think I came across that very problem. Suffice it to say I backed off slowly and didn't go back!
Re:Dotfile madness by weberc2 on Saturday February 02, 2019 @02:22PM (#19065038)
Default 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.
Re:Dotfile madness by ecnahc515 on Saturday February 02, 2019 @04:34PM (#19065875)
They 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.

Re:Dotfile madness by tinco on Saturday February 02, 2019 @04:48PM (#19065943)
Other 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.

Re:Dotfile madness by empath75 on Saturday February 02, 2019 @05:05PM (#19066031)
Ruby dependency and version management is as much a clusterfuck as any other language, imo.
Re:Dotfile madness by tinco on Saturday February 02, 2019 @05:13PM (#19066086)
In my comment I say that it's better than the way Go did it, and Go is switching to the Ruby style, so maybe you could add some kind of argument why it's actually not better than that in any other language?

I can't remember the last time I had a version management problem in Ruby, though the ecosystem is so stable right now not many backwards incompatible things happen any more.

Re:Dotfile madness by incompatible on Saturday February 02, 2019 @09:10PM (#19067330)
The gopath still contains a pkg directory when using modules, it seems.
Re:Dotfile madness by bscphil on Saturday February 02, 2019 @05:57PM (#19066350)
Lots 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.
Re:Dotfile madness by Spivak on Saturday February 02, 2019 @08:48PM (#19067254)
Use the flatpak for Steam! It makes almost all my headaches with the platform disappear including the .steam directory.
Re:Dotfile madness by afiori on Saturday February 02, 2019 @06:27PM (#19066563)
> 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"

Re:Dotfile madness by amelius on Saturday February 02, 2019 @02:36PM (#19065125)
Suggestion. Just do:

    mkdir ~/real_home
And use that as your real home :)
Re:Dotfile madness by theon144 on Saturday February 02, 2019 @03:52PM (#19065642)
Ah, just like on Windows, where one has to create a second My Documents folder to maintain sanity.

Ew.

Re:Dotfile madness by jorvi on Saturday February 02, 2019 @08:01PM (#19067042)
> 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.

Re:Dotfile madness by nycticorax on Sunday February 03, 2019 @01:36AM (#19068181)
Well, 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.

Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @11:50AM (#19070612)
Damn 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.
Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @11:48AM (#19070594)
It's always amazing to me how confident random people on the internet are that they know precisely what the average user wants.
Re:Dotfile madness by phkahler on Saturday February 02, 2019 @09:26PM (#19067406)
They should not be created by default and left empty.
Re:Dotfile madness by _emacsomancer_ on Saturday February 02, 2019 @10:00PM (#19067540)
Snaps 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.

Re:Dotfile madness by vandorjw on Saturday February 02, 2019 @01:24PM (#19064653)
I use ubuntu 18.04 (kde) and my snap folder is /snap

I don't know how I did this.

Re:Dotfile madness by gnomewascool on Saturday February 02, 2019 @01:43PM (#19064790)
Do 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.
Re:Dotfile madness by johannes1234321 on Saturday February 02, 2019 @01:58PM (#19064892)
Running something with sudo?
Re:Dotfile madness by therein on Saturday February 02, 2019 @03:01PM (#19065308)
I am using snap on Arch and my snap folder is /snap as well.
Re:Dotfile madness by bigbugbag on Monday February 04, 2019 @05:04AM (#19075133)
I'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.
Re:Dotfile madness by widforss on Sunday February 03, 2019 @07:12AM (#19069193)
I use a tool from ESA called Snap. It defaults to ~/snap as well. Oh, the collisions.
Re:Dotfile madness by fiatjaf on Saturday February 02, 2019 @06:03PM (#19066390)
I 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?
Re:Dotfile madness by pletnes on Saturday February 02, 2019 @06:15PM (#19066485)
I 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.
Re:Dotfile madness by fiatjaf on Saturday February 02, 2019 @08:33PM (#19067191)
Oh, 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.

Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @11:52AM (#19070623)
If 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.
Re:Dotfile madness by fiatjaf on Sunday February 03, 2019 @09:54PM (#19073632)
So why do they ask me to allow them to add themselves to the system?
Re:Dotfile madness by AnIdiotOnTheNet on Sunday February 03, 2019 @10:15PM (#19073711)
Probably 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.
Re:Dotfile madness by pletnes on Sunday February 03, 2019 @02:26AM (#19068292)
Snap search?
Re:Dotfile madness by pvg on Saturday February 02, 2019 @07:28PM (#19066885)
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.

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.

Re:Dotfile madness by airstrike on Saturday February 02, 2019 @11:54PM (#19067945)
%APPDATA% doesn't require permission
Re:Dotfile madness by sascha_sl on Saturday February 02, 2019 @01:17PM (#19064610)
>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?

Re:Dotfile madness by nycticorax on Saturday February 02, 2019 @05:08PM (#19066056)
Maybe 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...

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.

Re:Dotfile madness by emgee_1 on Saturday February 02, 2019 @01:32PM (#19064713)
Sorry I do not want a directory /Documents if /docs is what i want when i want it...
Re:Dotfile madness by boreq on Saturday February 02, 2019 @01:36PM (#19064733)
It is your lucky day - there is a standard for this as well https://wiki.archlinux.org/index.php/XDG_user_directories
Re:Dotfile madness by gerdesj on Saturday February 02, 2019 @03:54PM (#19065655)
I'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.

Re:Dotfile madness by dbrgn on Monday February 04, 2019 @02:56AM (#19074663)
Oh wow. If this does what I think it does, I'll be forever grateful for that comment.
Re:Dotfile madness by gerdesj on Tuesday February 05, 2019 @05:37PM (#19090728)
It 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.