News for hackers. Stuff that matters.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by tetris11 on Wednesday September 13, 2023 @04:35AM (#37493878)
One thing I like about Linux package managers is that you can query any file to see which package owns it. How does Windows not track this?
Re:Any sufficiently advanced uninstaller is indistinguishabl... by blackpill0w on Wednesday September 13, 2023 @04:42AM (#37493945)
Ok, I see what you're saying here, still, Linux's way is better, I'd rather have my system cluttered with useless files of deleted programs than be exploited because of something that was solved decades ago.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by yankput on Wednesday September 13, 2023 @04:47AM (#37493981)
Except they all leave files everywhere in ~, ~/.cache, ~/.config, ~/.whatevertheyfeellike
Re:Any sufficiently advanced uninstaller is indistinguishabl... by mijoharas on Wednesday September 13, 2023 @05:30AM (#37494369)
The ~/.whatevertheyfeellike is an antipattern (that is annoying) but the others are well defined in the xdg_desktop spec[0].

Personally I appreciate knowing where the config/cache for each application is. (Though it does annoy me when programs don't follow this as in your third example)

[0] https://specifications.freedesktop.org/basedir-spec/basedir-...

Re:Any sufficiently advanced uninstaller is indistinguishabl... by marginalia_nu on Wednesday September 13, 2023 @05:49AM (#37494531)
Why does the XDG spec have authority over software?
Re:Any sufficiently advanced uninstaller is indistinguishabl... by butlerm on Wednesday September 13, 2023 @06:07AM (#37494694)
Software specifications are usually adopted by convention and implemented to minimize surprise and make things interoperable. They are not authorities and cannot make anyone do anything. One of the most common software failure modes is to implement a specification too tightly or in a way that nobody wants although the reverse is a problem as well.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by tetris11 on Wednesday September 13, 2023 @05:55AM (#37494578)
It usually doesn't, and it's mostly a good standards recommendation that even the most GPL of GPL codebases doesn't always follow (looking at you, emacs).
Re:Any sufficiently advanced uninstaller is indistinguishabl... by chimprich on Wednesday September 13, 2023 @06:49AM (#37494998)
Emacs has respected $XDG_CONFIG_HOME for a while now. There are worse offenders (e.g. not likely to see the end of .mozilla any time soon).
Re:Any sufficiently advanced uninstaller is indistinguishabl... by j16sdiz on Wednesday September 13, 2023 @07:51AM (#37495489)
GNU emacs was created at 1984. XDG Base Directory spec was started around 2003..
Re:Any sufficiently advanced uninstaller is indistinguishabl... by Zambyte on Wednesday September 13, 2023 @08:12AM (#37495667)
Also Emacs will reapect files being placed in XDG directories, it just doesn't put them there...
Re:Any sufficiently advanced uninstaller is indistinguishabl... by Maken on Wednesday September 13, 2023 @09:53AM (#37496763)
They don't. XDG specifications are recommendations. Their only power is that your software will integrate poorly with other software (specially desktop software) if you ignore their guidelines.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by parchley on Wednesday September 13, 2023 @05:09AM (#37494182)
Those files are user data, not part of the software package.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by daemin on Wednesday September 13, 2023 @05:13AM (#37494220)
I would disagree, files that the user cannot edit or should not edit should not be going into their home directory. Things like cache files should go into a system wide cache directory instead.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by amenghra on Wednesday September 13, 2023 @05:18AM (#37494256)
Cache files might contain user's sensitive data. Makes sense to keep in them in the user's home directory in those cases.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by Hikikomori on Wednesday September 13, 2023 @05:41AM (#37494463)
File permissions?
Re:Any sufficiently advanced uninstaller is indistinguishabl... by tetris11 on Wednesday September 13, 2023 @05:57AM (#37494596)
Isn't that very anti-linux though, to have a directory owned by root but populated with subfolders owned by other users? /home is the only exception I can think of that does this.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by prmoustache on Wednesday September 13, 2023 @06:41AM (#37494935)
Anti-linux I don't know, but it was not uncommon in unices to have home directories in /usr/home.

And there is no written or unwritten rule about that. In fact, /home is a subdirectory of / which is owned by root.

Re:Any sufficiently advanced uninstaller is indistinguishabl... by TheNewsIsHere on Wednesday September 13, 2023 @09:22AM (#37496396)
True, but /usr/home is no longer a common place to store home directories. It used to be, particularly in Bell Labs Unix. (Does FreeBSD still do this?)

The Linux Foundation’s File Hierarchy Standard puts user homes in /home, but it’s by no means mandatory.

/home being the *nix home folder directory isn’t written in stone, but plenty of software expects it. Of course you shouldn’t hard code things like that, but that has never stopped anyone from doing it. (Not that we should reward that with de facto standards necessarily.)

I understand the various reasons why a root file system hierarchy isn’t part of the Single UNIX Specification, but it might have been nice.

Re:Any sufficiently advanced uninstaller is indistinguishabl... by Hikikomori on Wednesday September 13, 2023 @06:44AM (#37494956)
/tmp
Re:Any sufficiently advanced uninstaller is indistinguishabl... by Zambyte on Wednesday September 13, 2023 @08:14AM (#37495683)
And /run/user
Re:Any sufficiently advanced uninstaller is indistinguishabl... by em-bee on Wednesday September 13, 2023 @08:58AM (#37496153)
also mail and cron
Re:Any sufficiently advanced uninstaller is indistinguishabl... by stavros on Wednesday September 13, 2023 @06:05AM (#37494667)
There's no other path that the user is guaranteed to have write permissions to (except maybe /tmp, I guess).
Re:Any sufficiently advanced uninstaller is indistinguishabl... by remram on Wednesday September 13, 2023 @05:42AM (#37494471)
Why would you want that?

If you have separate partitions, would you really want user data to go to the system partition? Or a third partition?

Do you find having more places that user programs can write a benefit?

Re:Any sufficiently advanced uninstaller is indistinguishabl... by prmoustache on Wednesday September 13, 2023 @06:38AM (#37494913)
I would favor a /var/user/something directory.

The fact that nobody does that is pretty much a consequence of the difficulty of coordinating multiple projects that do not have a common authority, not because it is a bad idea.

Re:Any sufficiently advanced uninstaller is indistinguishabl... by remram on Wednesday September 13, 2023 @07:27AM (#37495295)
Again, what do you prefer about that?

Maybe the reason no one does that is simply that no one shares your preference.

Re:Any sufficiently advanced uninstaller is indistinguishabl... by prmoustache on Wednesday September 13, 2023 @09:16AM (#37496339)
Having a clear separation between actual user data files / documents and stuff like cache for different reasons:

- easier to cleanup/wipe without risking deleting works/personnal files

- backup solution doesn't have to have a town of entries in an ignore/exclude file

- same as above for syncing software

- tier storage separation possibility

- disk space allocation separation depending on data vs volatile stuff

Re:Any sufficiently advanced uninstaller is indistinguishabl... by j16sdiz on Wednesday September 13, 2023 @07:52AM (#37495501)
Should that count towards user disk quota?
Re:Any sufficiently advanced uninstaller is indistinguishabl... by prmoustache on Wednesday September 13, 2023 @06:37AM (#37494902)
I agree cache file should not go into their home directory, however I don't agree they aren't user data and that they would be part of the software installation.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by the8472 on Wednesday September 13, 2023 @08:26AM (#37495815)
If I uninstall ssh I still want to have have my authorized hosts. If I uninstall some firefox version firefox I want to keep my profiles. XDG defines a thumbnailing hierarchy followed by multiple libraries, uninstalling any of those shouldn't clear thumbnail caches.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by tsukikage on Thursday September 14, 2023 @07:56AM (#37507724)
Persistent user-specific state needs to live in a persistent user-specific location. You could choose not to use the concept of a home directory, but you would be doomed to reinvent it.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by goodpoint on Wednesday September 13, 2023 @05:13AM (#37494218)
That's a feature so that users can keep configuration files and even move them across systems.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by prmoustache on Wednesday September 13, 2023 @06:36AM (#37494898)
That is not part of the software itself so it is still correctly installed/uninstalled.

Now I believe all software should have a manpage, dialog and a cli argument that describes where all the files[1] generated by default go but that is another subject.

[1] cache, config and even default save

Re:Any sufficiently advanced uninstaller is indistinguishabl... by devnullbrain on Wednesday September 13, 2023 @10:04AM (#37496926)
Try opening C:\Users\%USERNAME%\Documents\My Games
Re:Any sufficiently advanced uninstaller is indistinguishabl... by mike_hearn on Wednesday September 13, 2023 @05:06AM (#37494157)
MSIX packaged apps do support this, Windows redirects file writes outside of home dirs and other user locations to a package-specific directory that's overlayed back onto the system so the app thinks it's writing to wherever, but it's actually a package-private location.
Re:Any sufficiently advanced uninstaller is indistinguishabl... by chimprich on Wednesday September 13, 2023 @07:00AM (#37495083)
> you can query any file to see which package owns it

Presumably you mean something like using dpkg/apt for a Debian-style system?

I think that only works if a file is actually installed from within the framework. As soon as you've installed a file via npm, flatpak, pip, snap, specialist plug-in, standalone binary, that ancient program you had to install by hand, or one of the other squillions of ways of getting an executable program, you're out of luck and have to figure it out manually.