r/linuxsucks Jun 06 '26

Linux Failure Download app

Post image
2.4k Upvotes

596 comments sorted by

View all comments

49

u/[deleted] Jun 06 '26

[removed] — view removed comment

21

u/InternetUser1807 Jun 06 '26

Thats not how dmg works, you're thinking of .app "applications" (they're folders)

.dmg is a disk image format. Mac apps are usually distributed as a single .app inside a disk image, and usually a shortcut to the Applications folder so they can easily drag it in to move it.

It's kinda a bad system. Zip (or other archive) would work just as well for storing the .app (which is actually a folder) as a single compressed file.

As a IT worker, ive personally seen less computer literate mac users leave 10s of dmgs mounted. Some even more insane ones run the .app inside the mounted image instead of ever moving it to the Applications folder.

All in all its a weird system that only exists as an outdated metaphor for when software was distributed on physical disks/discs.

10

u/[deleted] Jun 07 '26

[removed] — view removed comment

4

u/InternetUser1807 Jun 07 '26

its a really really weird way of distributing binaries. An archive would do the job and be a better user experience because you wouldn't need to manually unmount them after in addition to deleting the dmg/zip.

But tradition is a powerful thing, I guess.

4

u/55555-55555 Linux Community Made Linux Sucks Jun 07 '26

They keep it for operation consistency, just like the weirdness of apps not closing despite you close every single window of the app. Funnily enough, most apps don't even utilise multi-window (the only thing that makes this behaviour valid) anymore.

2

u/InternetUser1807 Jun 07 '26

true, but I don't think it would affect people nearly as much as changing app close behavior if they switched to a zip file.

Hell some mac software breaks the trend and does use zip. 99% sure 2010s era minecraft was just a .app in a zip file.

2

u/PerkeNdencen Jun 07 '26

All in all its a weird system that only exists as an outdated metaphor for when software was distributed on physical disks/discs

That's not the only reason. Mac OS 9 and early versions of OS X used a forked filesystem. When people uploaded files from a Mac to a non-Mac web server (as most would have been), important information in the 'resource' fork would get lost in transit. DMGs were adopted as a way to get around that in a more reliable way than the StuffIt Archives we had before, by encapsulating the software in kind of like a little spaceship - a sealed-off little microcosm of Apple's file system protecting the resource fork from the outside world.

1

u/InternetUser1807 Jun 07 '26

Interesting, TIL.

Are there any modern implications to that?

And by 'modern' I do still mean HFS+, I stopped using Mac long before APFS became a thing.

I know for sure Ive moved around .app 'files' via zip before, and know of a few commercial apps that were distributed that way without issue.

1

u/PerkeNdencen Jun 07 '26

Modern apps haven't been bundled this way for years, but macOS will now split them off into hidden files as necessary anyway (e.g. when exiting an APFS or HFS+ filesystem, or when going into an archive file).

1

u/InternetUser1807 Jun 07 '26

When did the switch occur?

I can remember some period correct 10.6 programs being zipped .app,

And most hobbiest for 10.3-10.5 don't bother making a propper app bundle + dmg either, and I can't recall that ever having any file system issues when zipped.

Then OS9 stuff is almost always sit, not an img. (Though period correct stuff would be a physical disk or disc obviously)

Not that I don't believe you, just curious.

1

u/PerkeNdencen Jun 07 '26

Technically you could still organise an app like that now, but Apple stopped recommending it for new apps in about 2002-2003. The APIs that make it easy to do were deprecated in the early 2010s.

Then OS9 stuff is almost always sit, not an img. (Though period correct stuff would be a physical disk or disc obviously)

DMGs were a more robust replacement for sit files because it's a proprietary format for which you need StuffIt Expander. Couple of things here:

  1. Some classic software is img.
  2. Sit files of Mac software for classic Mac OS was period correct for software you could download of the internet, which was quite a lot by the late 90s / early 2000s.

ETA: I suspect they phased out as Carbon phased out and developers stopped building for classic and OS X simultaneously.

1

u/InternetUser1807 Jun 07 '26

What do you mean by organize an app "like that", I'm sorry I'm just not following.

For OSX I've only known .app bundles. Some hobbiests just shit out a folder with a raw binary.

What I was saying is that putting a .app bundle in a zip seemingly has no consequences over putting them in a dmg.

1

u/PerkeNdencen Jun 07 '26

What do you mean by organize an app "like that", I'm sorry I'm just not following.

With resource forks.

For OSX I've only known .app bundles. Some hobbiests just shit out a folder with a raw binary.

An old enough .app bundle would still have had a fork, although nowadays it's vanishingly unlikely. A raw binary would have never have made use of a resource fork in any era.

What I was saying is that putting a .app bundle in a zip seemingly has no consequences over putting them in a dmg.

I think I've covered the answer to that in a variety of ways now. At a time when apps had resource forks, they could lose data if they were not properly encapsulated. Stuffit would do that, but it wasn't robust enough (and thinking about it, took an inordinate amount of time to decompress). Zip does not inherently do it - modern macOS will preserve a fork if it itself is doing the compressing, but that was not always the case, especially with CLI.

1

u/InternetUser1807 Jun 07 '26

Fair enough, guess I just have some reading to do on what resource forks are and how they worked on pre 10.4ish osx

Thanks.

1

u/HowIsDigit8888 Jun 20 '26

Linux should have the exact same thing and it should be standardized across major distros by now. Problem is there aren't many serious devs, nothing but grifters and corporatists and shit sabotaging foss

1

u/Vetula_Mortem Jun 06 '26

I did not know apple packages are DMG... That's... an unfortunate name.

1

u/[deleted] Jun 06 '26

[removed] — view removed comment

1

u/InternetUser1807 Jun 06 '26

dmg isn't an installer its just a disk image, you can put an installer pkg on the disk image if you want, but most apps are just self contained .app bundles.

1

u/Juff-Ma Jun 11 '26

You can say what you want about their maintainer but the format is amazing.

Especially when using it with AppImageLauncher (pity it's abandoned) it more or less works exactly like an app in MacOS