this post was submitted on 14 Oct 2024
75 points (100.0% liked)

Linux

47946 readers
1526 users here now

From Wikipedia, the free encyclopedia

Linux is a family of open source Unix-like operating systems based on the Linux kernel, an operating system kernel first released on September 17, 1991 by Linus Torvalds. Linux is typically packaged in a Linux distribution (or distro for short).

Distributions include the Linux kernel and supporting system software and libraries, many of which are provided by the GNU Project. Many Linux distributions use the word "Linux" in their name, but the Free Software Foundation uses the name GNU/Linux to emphasize the importance of GNU software, causing some controversy.

Rules

Related Communities

Community icon by Alpár-Etele Méder, licensed under CC BY 3.0

founded 5 years ago
MODERATORS
 

Because I hate Electron

top 50 comments
sorted by: hot top controversial new old
[–] [email protected] 56 points 2 weeks ago (1 children)

Docker, Distrobox, Toybox, systemd-nspawn, chroot.

Technically those all rely on the same kernel namespace features, just different ways to use it.

That's also what Flatpaks and Snaps do. If you only care about package bloat, an AppImage would do too but it's not a sandbox like Flatpak.

[–] [email protected] 8 points 2 weeks ago (1 children)

Don't use docker with distrobox. Use podman instead as it is rootless and faster

[–] [email protected] 1 points 2 weeks ago (1 children)

Docker for servers and Rodman for home pcs

[–] [email protected] 1 points 2 weeks ago (1 children)

Podman goes well with Kubernetes. It also is more performant than docker.

I use both

[–] [email protected] 35 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

IIRC that's the whole point of flatpak, snap and appimage

Docker can probably do it too, distrobox puts a useful wrapper on that

Nix does that kind of, nix packages aren't isolated in that they can't access resources on your system but all dependencies are stored in the nix store, hashed and isolated from eachother, and wiped when you collect garbage

[–] [email protected] 1 points 4 days ago

Appimage doesn’t do deduplication of packages does it?

[–] [email protected] 20 points 2 weeks ago (3 children)

Snap turns your system into a slug at boot time, makes it take forever to shut down as it unmounts fifty memory file systems, scatters files all over the place turning a neat organized system into a pile of shit. I primary run Ubuntu, but I excise snap from it as one of the first orders of business.

[–] [email protected] 13 points 2 weeks ago (1 children)

At that point, why still bother with Ubuntu?

[–] [email protected] 4 points 2 weeks ago

@naeap As long as it remains the easiest distro for me to get from initial setup to mangled the way I want it to work I'll stick with Ubuntu. It still tends to be more up to date than most other releases save Fedora but I do not care for the Redhat approach at all, they are rather like Windows in trying to force you to do it there way, "thou shall use LDAP and not NIS" for example. I don't like distros that think I should change my whole organization to suit their needs. Yea at some point I probably will switch to LDAP but will do it on my own terms in my own time not dictated by a distribution vendor. It is rather trivial for me to excise snap from Ubuntu, a lot more work to hack NIS into a system that doesn't natively support it.

[–] [email protected] 7 points 2 weeks ago

Luckily I use Arch (btw) so every Linux apps under the sun already available on the AUR, so I have 0 reason to use Snap/Flatpak

[–] 0x0 4 points 2 weeks ago (1 children)

Isn't firefox strickly snapped in latest ubuntus?

[–] [email protected] 9 points 2 weeks ago

@0x0 No, Mozilla maintains their own repository. You can delete snap firefox and snap everything else, add the mozilla repository, and install firefox from there. You'll get a more current version as a side benefit. Instructions found here: askubuntu.com/questions/150203…

[–] [email protected] 17 points 2 weeks ago

Yes

That's called containerization

[–] [email protected] 13 points 2 weeks ago (2 children)

Go with one of the ready to use systems. Flatpak, Snap, AppImage. Snap is largely Ubuntu Ecosystem, Flatpak is independent. AppImage is an option if you do not need/want a Sandbox.

Stay away from Docker and LXC for this use case (graphical applications), they are much more work to get going.

[–] [email protected] 3 points 2 weeks ago (1 children)

Yes, Docker apps are more appropriate for servers and most apps are "made" to run 24/7 to serv the home or workplace.

They are very much worth the "work to setup" as they can be transfered/replicated to any system.

Flatpak and the alike are for running apps on a desktop/laptop.

[–] [email protected] 2 points 2 weeks ago

Agreed. My answer was in the assumption that it's about desktop apps as the OP mentioned Electron.

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago)

You can just use podman+distrobox

Simple and rootless

[–] [email protected] 10 points 2 weeks ago
[–] [email protected] 8 points 2 weeks ago

One way or another, if you want to run an application you are gonna need its dependencies (the key is the name)... they may be bundled into an appimage or come as part of flatpak ruintime, or be confined inside a container, or live in the nix store, but they will "bloat" your system anyway.

Learn how to cleanup your system (ie. uninstall all packages that are not needed by others that have been requested explicitly) and live a happy life. Only bother with other solutions if the software (or version) you need isn't available for your distro.

[–] [email protected] 7 points 2 weeks ago

You can use appimages, more importantly if you make a directory next to the appimage with the name of the appimage + .home the appimage will also set that as its $HOME that way you can also keep the configuration files of the app separated from the host OS.

You can also sandbox appimages with aisap.

[–] [email protected] 3 points 2 weeks ago

Both strange and not, tbh. On one hand, I understand the sentiment; on the other hand, installing more software with its own dependencies to isolate electron's dependencies, and potentially installing twice those libs both electron and something else on your system depend on seems counterproductive (leaving the security benefits of containerization/sandboxing out of the question here, tho).

[–] [email protected] 3 points 2 weeks ago (2 children)
[–] [email protected] 9 points 2 weeks ago (1 children)
[–] [email protected] 6 points 2 weeks ago* (last edited 2 weeks ago)

Points for the correct answer. I work on systems for spacecraft and podman is what we use on those for containerization (better option for a couple reasons)... but we literally just SAY docker to the suits, because that's what they've heard of. Which is why I said docker to this guy.

[–] [email protected] 2 points 2 weeks ago (3 children)

I heard of docker but I'm not really sure what it is, is it free? is it hard to set everything up? Can my computer handle it?

[–] [email protected] 6 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

Docker and podman aren't too bad nowadays I don't think assuming you're not running something huge

(Podman is another tool that does the same thing as docker)

Docker and podman containers are basically like throwaway mini-vms that contain one application to ensure it will always run no matter where so long as the machine you're running them on can run docker

They can run CLI stuff just fine, I'm not sure about desktop apps someone smarter than me will probably tell you about that

[–] [email protected] 3 points 2 weeks ago

Docker can absolutely run desktop apps.

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago)

FOSS lightweight ”virtual machine” (it’s not quite a VM but it’s similar conceptually. It’s much lighter on your system than a VM).

Easy to install, setting it up for your use case may take some coding if it isn’t common (bash scripting experience will help).

[–] [email protected] 1 points 2 weeks ago

Docker and Podman are both free. Podman is the lighter weight, more FOSS, also slightly more DIY option, they are intercompatible - I work on systems for spacecraft and Podman is what we use on those because it's lighter weight. If you want to run something in docker, ChatGPT is actually pretty good at talking you through the specific setup (at least that's been my experience).

[–] [email protected] 3 points 2 weeks ago

There is always firejail which is very "even your mom can use it" in terms of usage.

e.g install it, type cd / && sudo firecfg, then your password and thats it.

[–] [email protected] 2 points 2 weeks ago (1 children)

Distrobox is probably what you’re looking for.

[–] [email protected] 2 points 2 weeks ago

Holy smoke this is it, I can't believe I'm using Linux for 1 years and still haven't heard of this software, I'll give it a shot thanks you very much

[–] [email protected] 2 points 2 weeks ago* (last edited 2 weeks ago)

It depends on your usecase. We need more detail regarding what application (gui/cui/open source/proprietary/custom) you are trying to use

  • Check if the application you want to use exists as snap/flatpak/appimage.
  • If it exists, install the application as per their standard operating mechansim
  • Once used, just remove them. Your original system libs are untouched

If the application doesn't exist in those platforms, it's a different story. You might need to use distrobox or docker. Don't use nix because it's overkill for what you want to do.

[–] 0x0 1 points 2 weeks ago

Look into Incus (formerly LXC) containers or the various i'm gonna replace traditional packaging formats like AppImage, FlatPak and what not.

[–] [email protected] 1 points 2 weeks ago (1 children)

I'm thinking of using VM but I'm hoping to find a better solution

[–] [email protected] 1 points 2 weeks ago (1 children)

Short: Yes, of course. Long: Well, this is really a long answer, depending on your needs...

[–] [email protected] 1 points 2 weeks ago* (last edited 2 weeks ago) (1 children)

I'm only needed to run any apps that has bloat/redundant dependencies so I can remove it anytime I want without screwing up my entire OS ;D

[–] [email protected] 3 points 2 weeks ago (1 children)

Maybe check out nix. It can be installed on any distro and if you install (temporarily but cached) the app trough nix shell you can then just clean the dependencies with nix store gc.

[–] [email protected] 4 points 2 weeks ago

Come to the dark side we have version controlled operating systems

[–] [email protected] -1 points 2 weeks ago

Yea, I have a Manjaro box also, which is based up on Arch with some ugliness added to it, and yes, I have installed and run Arch before so I am familiar, only problem I've run into is every time I go to do an update one or more apps won't compile and I end up having to remove 35 programs and re-installing to fix. There are a lot of things to like about it though, particularly having packages that are just tar files makes them very easy to extract / modify / create. But not a great system if you just need to get things done.