• How to enable Flatpaks in Antergos


    @joekamprad
    Joe, I have written a Wiki Article on how to enable Flatpaks in Antergos.
    I could not get to a point in the Wiki where I could enter the Article. Clicking on Login did nothing. So, I will put it here for now. If I get it into the Wiki, I can edit this post as a link to The Wiki. Thanks.

    How to install Flatpak Capabilities for Gnome on Antergos

    Using Flatpaks works great in Gnome. It may or may not work well in other Desktop Environments, I don’t know having not tried other DEs.

    The advantages of using Flatpaks.

    Sandboxes
    With Flatpak, each application is built and run in an isolated environment, which is called the ‘sandbox’. Each sandbox contains an application and its runtime. By default, the application can only access the contents of its sandbox. Access to user files, network, graphics sockets, subsystems on the bus and devices have to be explicitly granted. Access to other things, such as other processes, is deliberately not possible.”
    Cited from: http://docs.flatpak.org/en/latest/basic-concepts.html#sandboxes

    Sandboxes are a type of container, and the two terms are often interchanged. What does this mean?

    1. Sandboxes provide more isolation between processes, which means it is more Secure.

    2. The sandbox environment contains everything it needs to run, including libraries. Let us say you have Audacity installed, and it uses libsound.1.0 (a made up lib for discussion purposes) then libsound.1.0 will be included in the Audacity sandbox. Then let us say VLC is installed, and it needs libsound.1.2 then libsound .1.2 is included in the VLC sandbox. Then let us suppose the maintainers of libsound come out with libsound.1.3 This will not affect either Audacity or VLC as they have their preferred version of libsound included in their containers. This means that upgrades of libraries or upgrades in general will not break things nearly as much. Actually, theoretically, upgrading should never break containerized applications.

    3. Developers can distribute one flatpak which can be run on any Linux distribution that has Flatpak capabilities enabled. Right now, https://flathub.org/apps/category/All seems to be in the forefront of flatpak remotes. Remotes being the flatpak version of repositories. Buzz on over and see what is currently available. You can also limit your search by using the categories at the left side of the web page.

    Describing everything about Flatpaks is more than the scope of this Wiki article. Do some research and if you decide to try Flatpaks, here is how to enable Flatpaks in Antergos.

    The following instructions are for use in Antergos Gnome.
    Click on “Show Applications”
    Click on “Add/Remove”
    Enter “flatpak” in the search bar
    Click to install “flakpak” and “flatpak support (Gnome software)”
    This will also enable other dependencies to be installed.
    Click “Apply”
    This will bring up a dialog box stating
    Choose optional dependencies for Gnome-software
    fuwpd : fwupd support plugin
    ostree : OSTree support plugin
    select ostree
    Choose provider for xdg-desktop-portal-impl
    select xdg-desktop-portal-gtk
    Click on “Apply” amd it should install flatpak.

    In Firefox, goto https://flathub.org/apps/category/All
    and click on an application that interests you. Such as Handbrake
    This brings up a description of the app and a “INSTALL” icon.
    Click on INSTALL and it will bring up a dialog box that asks
    “What should Firefox do with this file?”
    Enable “Open with” then “Software install (default)”
    You will now get an Antergos software install window, again with a description of the app and an “INSTALL” button. Scroll down and you will see under “Details” that the “Sandboxed” icon is blue (not gray) so it is indeed sandboxed. Also notice to the right that “Source” is “dl.flathub.org” so it is not coming from the Arch repositories.

    Once again, click on “INSTALL”

    Now set back and wait as installing flatpaks is not a quick process for some reason.
    Eventually it will ask for a Password, then install the app.

    Click on “Show Applications” and your new app should be listed.

  • @pudge thanks for the work !

    Bildschirmfoto vom 2019-02-22 10-25-00.png

    wiki is still screwed up… login button is on the bottom of the page (hidden if you are on top of the side)
    https://forum.antergos.com/topic/10758/login-to-wiki-do-not-appear-anymore

    But also the page to create a new entry is not available as a visible link, see here:

    https://forum.antergos.com/topic/10898/forum-issues/11

    to create a new entry use this url:
    https://antergos.com/wiki/create-a-new-article/

  • @joekamprad
    I still cannot login to wiki to write any article.
    My question is: does the wiki need another account, or can I use the same account as in the forum?
    If it must be another account, what does the single sign-on in Antergos wiki mean?

  • @developers
    I tried another account but that didn’t help.
    So for me the SSO to Antergos wiki is totally broken.

  • I found this Flatpak Cheat Sheet.
    Commands I have found useful:
    1 flatpak remotes (List configured Remotes)
    2 flatpak remote-ls <remote name> (List remote contents by remotename as listed by “flatpak remotes”)
    3 flatpak update (updates flatpaks in configured remotes)
    4 flatpak search <term> (Searches remotes by “term”, term can be the name of an app such as VLC)

    These commands can all be entered at a user prompt $ and if root access is needed it will prompt you for it. If not it just runs the command as user. I think it best to run as user as much as possible.

    There are also “flatpak install” and “flatpak run” but I have found it best to let paman install and run the flatpak apps.

    I don’t think paman can notify when flatpak apps have updated versions. So I am planning to run flatpak update at least once a month from a terminal window.

  • Using Flatpaks works great in Gnome. It may or may not work well in other Desktop Environments, I don’t know having not tried other DEs.

    Flatpaks works with i3wm.

    I had some free time today, and I was looking for something to do. It’s been a while since I used TWM (Tiling Window Manager) which is an older version of i3. I loaded up a fresh install of Antergos with i3wm, and started playing. I tried loading flatpak on i3wm.
    pacman -S flatpak
    and it worked. I’ve loaded VLC, Audacity, LibreOffice, Gimp, and Handbrake. All worked right off the bat. I haven’t used them extensively yet, but no problems so far. Since flatpaks are containers, I didn’t have any dependency or codec problems.

    A light OS/windows manager combination as a minimal platform for launching flatpaks. This was on an embedded motherboard based on the Intel J1900 cpu, with 4 Gig Ram and a 60 GB SSD. i3wm on this system was resource friendly and works well.

  • @pudge
    Isn’t snappack slower on start up? That was my experience a year ago, or has it changed?

  • I was also thinking about the pros and cons of using flatpaks as compared to using native packages. I haven’t used flatpaks ever, so please correct me if I’m wrong.

    Pros:

    • includes all required components for an app, so it should work well out of the box
    • uses sandbox/containers for increased security

    Cons:

    • is somewhat slower than native apps
    • takes more space on disk and RAM
    • some components of a flatpak may be outdated?

    Questions:

    • are the flatpak app sources as reliable as distro’s native repos?
    • do sandbox/containers (especially their bugs) create another level of security issues?
    • how much slower flatpaks are? Or are they slower?
  • @Bryanpwo said in How to enable Flatpaks in Antergos:

    @pudge
    Isn’t snappack slower on start up? That was my experience a year ago, or has it changed?

    Bryan. In the early days of VCRs (Video Cassette Recorders) there was a format war between Beta and VHS. Eventually VHS won out. I believe that snappacks and flatpaks are essentially the same thing, competing protocols for application container distribution. I have no experience with snappacks, so I have no information or knowledge on them. But from what I can see, it looks like the industry is leaning towards flatpak rather than Snap. Just my opinion.

    I installed Antergos i3wm on a system with low system resources on purpose. An embedded motherboard based on a Intel J1900 cpu, 4 GB ram and 60 GB SSD to see how it would perform with less powerful computers.
    For Antergos with i3wm launch times were as follows for these flatpak applications
    Audacity 4 to5 seconds ---- GIMP 4 seconds — Handbrake 4 to 5 seconds — Libreoffice Writer 4 to 5 seconds.

    I uninstalled Audacity, Gimp, Handbrake, and Libreoffice flatpaks and re-installed them from the native pacman packages. The native launch times were as follows:
    Audacity 5 to 6 seconds — GIMP 5 to 6 seconds — Handbrake 4 seconds — Libreoffice Writer 4 to 5 seconds

    It wasn’t quite what I was expecting, but the Flatpak installations seem to launch slightly faster, but not enough to really matter. I, like you, was expecting the opposite.

  • @pudge
    Thanks for the excellent review, that was surprising indeed!
    I meant Flatpaks by the way, I don’t know why I wrote Snappacks…

  • @manuel said in How to enable Flatpaks in Antergos:

    I was also thinking about the pros and cons of using flatpaks as compared to using native packages. I haven’t used flatpaks ever, so please correct me if I’m wrong.

    Pros:

    • includes all required components for an app, so it should work well out of the box
    • uses sandbox/containers for increased security

    I am by no means an expert on flatpaks, but from what I understand both of those statements are correct.

    Cons:

    • is somewhat slower than native apps
    • takes more space on disk and RAM
    • some components of a flatpak may be outdated?

    My above post states what I installed Antergos with i3wm on hardware wise. It also describes the launch times evaluation. As to “is somewhat slower than native apps” I can only offer a subjective opinion at this point. Which is I did not experience any significant speed differences when running flatpak vs Native pacman.

    While I was at it, I did some experiments on Disk space and Ram Usage as follows:
    With NONE of the following installed, Audacity, Gimp, Handbrake, and LibreOffice the SSD Disk usage as per the df command was:
    40,019,548 Bytes or 18% disk usage
    With the native pacman packages installed, the SSD Disk usages per df was:
    39,420,212 Bytes or 19% disk usage
    With the native pacman packages uninstalled and the flatpaks installed:
    38,988,440 Bytes or 20 % disk usage
    The flatpaks used 431,722 Bytes more disk space than the native packages. This is for 4 rather large applications and averages about 100 KB per app in this instance. You was right, the flatpaks require more Disk space, but in my opinion not by much.

    Then with the four flatpaks installed, no native packages, I ran Htop and noted the ram usage just prior to launching an app, and then the ram usage immediately after the app launched and sitting idle just as it came up.
    Audacity 330 MB prior to launch 337 MB after launch & idle 7 MB RAM usage
    GIMP 321 MB prior to launch 380 MB after launch & idle 59 MB RAM usage
    Handbrake 315 MB prior to launch 351 MB after launch & idle 36 MB RAM usage
    Libreoffice Writer 329 MB prior to launch 419 after launch & idle 90 MB Ram usage
    I uninstalled the flatpaks and installed the native pacman packages and rechecked
    Audacity 328 MB prior to launch 349 MB after launch & idle 11 MB RAM usage
    GIMP 326 MB prior to launch 386 after launch & idle 60 MB usage
    HandBrake 316 MB prior to launch 351 MB after launch & idle 42 MB RAM usage
    Libreoffice Writer 328 MB prior to launching 418 MB after launch & Idle 90 MB usage

    I know this isn’t the most accurate method of measuring the amount of RAM an app itself uses, but it should be enough for our purposes. Of course RAM usage then varies according to what the app is doing, I hope this eliminates most of that. Anyway, RAM usage appears to be quite close between the two.

    As to “some components of a flatpak may be outdated?” Whether it is a flatpak or an Antergos pacman package, how up to date or outdated an app is determined by the upstream developers.

    Questions:

    • are the flatpak app sources as reliable as distro’s native repos?

    I am assuming you are talking about GPG keys and other methods of autenticity of packages? I think, emphasis on think, that flatpaks either use GPG keys or something very similar. If someone else has more knowledge of this, chime in.

    • do sandbox/containers (especially their bugs) create another level of security issues?

    I would think that a bug operating inside a sandbox/container would less destructive inside the sandbox than outside a sandbox. Again, if anyone has more knowledge about this, chime in.

    • how much slower flatpaks are? Or are they slower?

    I think that was addressed above. Not much if any difference in speed in my observations.

  • After all the above discussion on flatpaks, one might ask “Why should I even be interested in flatpaks?”
    Note: What follows is my opinion of the possible future for Linux. Discuss, but please don’t kill the messenger!

    Well, it all comes down to who is driving the bus and who are the passengers. During the early days of personal computing, I believe the users were driving the bus and the developers were trying to give the users what they wanted. Recently, I believe the developers are driving the bus more and more.

    It started with Smart Phones, especially Android smartphones. The manufacturers didn’t want to hire massive amounts of personnel to develop apps, so they made it easy for independent developers to create apps for the smart phones. The idea seemed to flourish, hence the saying in one commercial “There’s an app for that”.

    I think the developers for Linux apps want to go in that direction. There are hundreds of Linux distributions, numerous different package managers, and at least 8 to 10 different window managers/desktop environments. I have no idea how many different combinations that can be created with these variables. Developers don’t want to have to take all of those variables into consideration. They want to distribute their apps as containers in one centralized place. Then users can download their apps for any Linux distribution that has flatpaks enabled, whether they are Arch, Fedora, Debian, or any of the derivatives there of. Plus developers can control which version of libs they want to use, and system updates won’t affect them. The benefits to developers are many.

    So the question is, who will be driving the bus in the future? I’m betting the developers will be doing the driving. In fact, it is already started. Fedora/Red Hat/IBM is developing a new Fedora workstation based on an immutable OS as a base from which to launch containerized apps. This is too big for the scope of this post, but if you are interested here is info on what MIGHT be the future of Linux. Again, just my opinion. I’m not pushing Fedora Silverblue over Antergos or any other distro. Especially when Silverblue is in it’s infancy. But if you’re interested:

    Silverblue

    P.S. If anyone tries Flatpaks on other DEs such as KDE or others, post your experience of what works and what doesn’t work.

  • The idea of having a cross distro app provider is actually what Linux needs. After some more reading on this subject I’m, like @pudge, thinking that flatpak has the potential to step up on that universal package stage, since Snap is a 100% Canonical product and a lot of Linux users are very weary towards that.
    The main distro’s (Arch, Ubuntu, Opensuse, Debian and Redhat) should actually unite in this one and collaborate to bring some unison in the fragmented Linux landscape. This way it will also simplify for third party appmakers to develop for Linux and I’m not only talking about popular apps like spotify, skype and gaming, but also governmental services, nowadays, if there’s a Linux app for it, it only works on Ubuntu and Debian.

enable13 flatpaks1 Posts 13Views 237
Log in to reply
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.