this post was submitted on 06 Jan 2024
36 points (60.6% liked)

linuxmemes

20776 readers
1774 users here now

I use Arch btw


Sister communities:

Community rules

  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

founded 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] julianh@lemm.ee 5 points 8 months ago (1 children)

How would the distro tell if the tar.gz is a program or just a bunch of compressed files? I tend to use tar files for compression rather than for distributing or installing software

[–] Darken@reddthat.com 1 points 8 months ago* (last edited 8 months ago) (1 children)

By prompting the user to open as file / install as package

Like how many distros prompt (when opening executables) to open as file / run as a program

[–] 0x4E4F@sh.itjust.works 1 points 8 months ago (1 children)

Yes, but the header of the file says it's a binary, that is why it gives you the option to run as a program or open as a file. Because the OS knows that you can do either with binaries.

[–] Darken@reddthat.com 1 points 8 months ago (1 children)

Is it the +x permission?

Why not use it the same way it is used in executables, but to indicate that a tar is installable

[–] 0x4E4F@sh.itjust.works 1 points 8 months ago* (last edited 8 months ago)

Some file managers might add the +x automatically if you choose to run the binary through the desktop environment (not the terminal)... or ask you if you'd like to mark the file as an executable (i.e. add +x to permissions).

You can't do it the same way with tar, what are you gonna execute, tar is neither a script or an ELF binary. It's like asking for a zip file to be executable, doesn't make sense. You can change the extension to .exe, but it won't run, it's not an exe, no MZ header, nothing 🤷.