• igorlogius@lemmy.world
    link
    fedilink
    English
    arrow-up
    49
    arrow-down
    1
    ·
    11 months ago

    You can actually build “from source/locally” with flatpak. And its actually pretty simple, because in most cases you should only really need the manifest.json/yaml of the flatpak application (contains all the build instructions), and with it you can build the application locally with the flatpak-builder command. (ref. https://docs.flatpak.org/en/latest/flatpak-builder.html )

    This seemed like something people might misunderstand when they view the strip, so i thought it might be interesting to add this information here.

    • aport@programming.dev
      link
      fedilink
      arrow-up
      7
      ·
      11 months ago

      I compile my own flatpak for emacs. It works great and I get to stay up to date with all the new awesome changes upstream

  • varjen@lemmy.world
    link
    fedilink
    arrow-up
    16
    arrow-down
    2
    ·
    11 months ago

    My impression of flatpak is that it was built by someone who doesn’t like or use a terminal.

    • oatscoop@midwest.social
      link
      fedilink
      English
      arrow-up
      9
      ·
      11 months ago

      Why are they so god-damn big? Let’s look at a few pieces of software on Linux Mint

      Stellarium: Real-time photo-realistic sky generator

      • System Package: 197 MB to download, 332 MB on disk
      • Flatpak: 907 MB to download, 2.5 GB on disk

      Blender: Very fast and versatile 3D modeller/renderer

      • System Package: 146 MB to download, 810 MB on disk
      • Flatpak: 955 MB to download, 3.1 GB on disk

      VLC: VLC media player, the open-source multimedia player

      • System Package: 8.5 MB to download, 47 MB on disk
      • Flatpak 724 MB to download, 2.4 GB on disk

      I ran “apt remove vlc --purge && apt autoremove && apt install vlc” to double check, because that seemed insane.

      • lastweakness@lemm.ee
        link
        fedilink
        arrow-up
        11
        ·
        11 months ago

        The huge-looking sizes are not representative of actual size on disk. On first installation of one app of a kind, their runtime packages get installed as well. For example, installing GNOME apps will install the latest GNOME runtime. But after that, installing any other GNOME app takes little to no space.

        In your case, you don’t seem to have any apps installed as Flatpaks, which means even the freedesktop runtimes are missing and need to be installed. That’s probably why it looks so huge.

    • nomadjoanne@lemmy.world
      link
      fedilink
      arrow-up
      3
      arrow-down
      1
      ·
      11 months ago

      Yeah, I sort of wish you could just launch them from the terminal like any other app. flatpak -run com.whatever.whatever is a bit tedious and half the time I have to go into /var/lib/.../ to figure out what the app is officially called anyway.

      That said, for stuff that isn’t in the official repos and (for Arch people) isn’t available as a binary on the AUR or seems kinda sketchy to install from the AUR, then flatpak is a great option. For “app” stuff, like Spotify I am a fan of flatpak.

      • igorlogius@lemmy.world
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        11 months ago

        Try adding ~/.local/share/flatpak/exports/ (for system flatpaks the path should be /usr/share/flatpak/exports/) to your PATH, then you can autocomplete and start the applications just with their appIDs. Also these launchers, might include some addional default run arguments you did not know about. And you can of course use aliases to make new launcher names that correspond to whatever you feel is right. (e.g. firefox, blender)

        Hope this info helps.

  • Simplesyrup@lemmy.ml
    link
    fedilink
    arrow-up
    15
    arrow-down
    3
    ·
    11 months ago

    Omg that sounds awful, and also isn’t compiling it a wast of time, what benefits does it get you? I’m confused not smart

    • Fubarberry@sopuli.xyz
      link
      fedilink
      English
      arrow-up
      18
      ·
      11 months ago

      On Linux, most programs are available pre-compiled through your package manager. However if you wanted a package that wasn’t already available for your specific family of distros, you would usually have to compile it yourself. It’s not that hard to do, but it does take awhile on install and every update after.

      Flatpak (as well as snap and appimage) fix this by being more universal, a flatpak program can be installed on any distro that flatpak is available for.

      There are downsides to flapaks though, and not everyone likes them. But if you want an app that’s not available through conventional means and you don’t want to use flatpak/snap/etc, compiling from source may be the only choice left.

    • andkit@lemmy.world
      cake
      link
      fedilink
      arrow-up
      18
      ·
      11 months ago

      There are a few advantages

      • you can use the latest and greatest upstream versions (even versions under active development)
      • you can let the compiler optimize for your system (especially useful with PGO, but honestly only worth it for a few applications, e.g. video encoders)
      • you have full flexibility over optional features

      And it’s a good learning experience, sooner or later things won’t just work and you have to learn about compilers, linkers, various build systems and script languages etc.

      But yeah, for most people it’s not worth the effort

      • dukk@programming.dev
        link
        fedilink
        arrow-up
        3
        ·
        11 months ago

        That’s kinda why I love Nix. Everything builds no problem, and most of the time it’s already cached so you don’t even have to build it.

        The other day I wanted to patch Picom, it was as simple as creating an overlay to change the source files. Seriously, it’s all so freaking easy.

    • igorlogius@lemmy.world
      link
      fedilink
      English
      arrow-up
      6
      ·
      edit-2
      11 months ago

      Only 2 things i can think of (of the top of my head)

      • You can be sure that the application wasn’t tampered (and does exactly what the source defines) without having to relying on signing/encryption by any other parties.
      • You might be able to increase performance or just ensure correct functionality by tweaking somethings (compile arguments, settings) Might be userful if you have special hardware/system, which isn’t supported otherwise.
    • lungdart@lemmy.ca
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      Many programs have compile time options, and the binaries may not have them enabled.

    • juggling_collie@lemmy.ml
      link
      fedilink
      arrow-up
      3
      ·
      11 months ago

      A list of installed programs forms a web of packages and their dependencies, what you want to install will form constraints of what versions etc. of each package and their shared dependencies that all need to be linked together.

      This means your combination of programs you want to install has to be taken into account when you compile everything. If you are relying on the distribution to do the compilation for you and sending you the binaries, they will have had to have accounted for this combination or otherwise are hoping everything just works.

      This is why on Debian it is advisable to not mix stable and testing repos, and in arch you keep up or are left behind. In gentoo you are limited only by the compatibility’s of the individual packages themselves, not of the specific combiled binaries, and nearly everyone mixes stable with testing or git head all the time. Plus some people like to procrastinate…

    • panCatE@lemm.ee
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      The only benefit is , sometimes the generic compiled code may not work as intended , that is the only time I compile from source !

    • EnglishMobster@kbin.social
      link
      fedilink
      arrow-up
      17
      arrow-down
      1
      ·
      11 months ago

      I use Flatpak all the time. It works a lot better than native apps very often.

      Also it’s a lot easier than fussing with PPAs or whatever. I’m on KDE Neon and wanted to run something through Wine. The Wine in the stock PPAs was an older version with a known bug that wouldn’t let me install the .NET Framework 4.8. I tried fetching the Wine PPA directly, but then I was getting issues about system packages not being compatible with newer versions of Wine.

      The more I dug, the more issues popped up (typical Linux). So I gave up and decided to install Lutris and try it through there, since Lutris has a workaround for those Wine issues. The Lutris in the stock PPAs also was an old version with a known bug where it just… wouldn’t work. You’d click a button and nothing would happen because of an HTTP bug. Rather than fuss around with that, I gave up and installed the Lutris Flatpak.

      30 seconds later, my program was installed and running. No nonsense in the command line, no fussing around with packages. Just open and go.

      A majority of the programs I have are Flatpak now. I have Flatpak for Zoom to let me take work meetings from my Linux partition; I have Flatpak for Parsec to let me remote in to my work desktop from my Linux partition. Blender, Calibre, Chrome, Discord, Thunderbird, PrusaSlicer, Slack, Rider, VS Code… all Flatpak.

      They all work great. I get prompt updates to stay on the bleeding edge. No more dependency hell. I now actively search for Flatpaks before I fall back to apt.

    • PotatoesFall@discuss.tchncs.de
      link
      fedilink
      arrow-up
      18
      arrow-down
      2
      ·
      11 months ago

      Yeah flatpak all the way. Package managers are for system stuff and CLI tools. Sandboxing for GUI apps makes sense on modern systems imo

    • 👁️👄👁️@lemm.ee
      link
      fedilink
      English
      arrow-up
      8
      ·
      11 months ago

      Yes, for every single one of my desktop applications. There’s definitely pain points and cons to them, but they’re generally better then host install.

    • jg1i@lemmy.world
      link
      fedilink
      arrow-up
      9
      arrow-down
      1
      ·
      11 months ago

      Lol. That’s what I was thinking. I feel like this meme should be reversed…

    • miss_brainfart@lemmy.ml
      link
      fedilink
      arrow-up
      8
      arrow-down
      2
      ·
      edit-2
      11 months ago

      Flatpak makes sandboxing an app and controlling its permissions quite accessible and easy, I like that.

      And it’s oftentimes a faster way to get recent versions on stable distros. I can install Inkscape 1.3 right now, the native package on Mint for example is still on 1.1.2

    • Monologue@lemmy.zip
      link
      fedilink
      English
      arrow-up
      5
      ·
      11 months ago

      yes, i am on debian and i enjoy the stability of my base system while i get the latest versions of apps. win-win situation for me. i try to install everything with flatpak first then apt.

    • Nithanim@programming.dev
      link
      fedilink
      English
      arrow-up
      4
      ·
      11 months ago

      I don’t because every time I fall in a weird pitfall where like /tmp is different or samba shares can’t be accessed. Or the UI is blindingly white instead of dark like the rest of the system. Though, I can’t remember on which one I had problems (probably both), it was some time ago and just gave up on them.

    • Tray@social.trayd.xyz
      link
      fedilink
      arrow-up
      2
      ·
      11 months ago

      @dmrzl @fugepe I like using flatpaks for software that has dependencies that would collide with the rest of my system. This lets me keep things pretty clean for the system packages.

    • riodoro1@lemmy.world
      link
      fedilink
      arrow-up
      26
      arrow-down
      2
      ·
      11 months ago

      Sandboxing, no dependency hell and user permissions are the biggest advantages.

    • d_k_bo@feddit.de
      link
      fedilink
      arrow-up
      1
      ·
      11 months ago

      Some applications are available as Flatpak only, because it makes no sense to maintain 2-5 different packages of the same program for multiple distros, when you can also maintain 1 package for all distros.

  • PropaGandalf@lemmy.world
    link
    fedilink
    arrow-up
    4
    arrow-down
    2
    ·
    11 months ago

    I think the perfect combo is compiling from source for all crucial stuff and your system software and flatpaks for graphical programs.

  • Standenboy@lemmy.world
    link
    fedilink
    arrow-up
    1
    ·
    11 months ago

    I’m a bit on the fence about flat pack really, what’s the point if you already have the pkg in your distros repo, I know if you are using musl it’s nice for installing steam and discord, but what’s the point outside of that really?

    • kier@lemmy.world
      link
      fedilink
      English
      arrow-up
      2
      ·
      11 months ago

      Of course, if you’re on Arch, for example; flatpak makes no sense… But if you’re on Fedora, OpenSUSE, or Debian… Believe me, after a while, you would be wanting to use flatpak 😅