Because I hate Electron
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
Appimage doesn’t do deduplication of packages does it?
No, I apparently missed that but
Nix is the best solution anyway imo
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.
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.
Agreed. My answer was in the assumption that it’s about desktop apps as the OP mentioned Electron.
Distrobox
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.
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 itsthat way you can also keep the configuration files of the app separated from the host OS.
You can also sandbox appimages with aisap.
There is always firejail which is very “even your mom can use it” in terms of usage.
e.g install it, type
cd /
, then your password and thats it.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).
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.
I’m thinking of using VM but I’m hoping to find a better solution
Short: Yes, of course. Long: Well, this is really a long answer, depending on your needs…
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
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.
Come to the dark side we have version controlled operating systems
Distrobox is probably what you’re looking for.
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