Flatpak - it's bizarre.

Hi. I run opensuse 15.2 with ONLY a LXDE DE. I thought I would give Flatpak a go - just because I was bored. I successfully installed audacity and kdenlive from Flathub.

However, when I ran either app they would not start due to various errors and crash out. I got no joy from the Github authors (not their problem I agree).

So I built a single opensuse VM under QEMU/KVM with all 3 LXDE, KDE Plasma and Gnome desktops because audacity is GTK based and kdenlive is KDE based.

What I found is that the 2 apps ONLY work under the Gnome DE and crash under LXDE and KDE.

Can anyone explain to me what the hell is going on? Yes, I googled the original errors but went around in circles.

Many thanks.

As long as you do not even post one of those errors, I assume not many people can attribute much.

BTW, both kdenlive and audacity can simply be installed using zypper/YaST. I do not know of problems about them posted here.

Probably not a good approach to begin running applications in a per-user Sandbox …

Once you’ve digested that, the correct Flatpak for openSUSE has to be installed – <https://software.opensuse.org/package/flatpak&gt;.

There’s also this documentation related to packaging – <https://en.opensuse.org/Portal:Packaging&gt; and <https://en.opensuse.org/Package_management&gt;.
[HR][/HR]And, there’s the openSUSE Bug #1172316 (with duplicates and, seemingly, resolved … ) <1172316 – Flatpak installation seems to miss necessary directories and files; – duplicate list – <Bug List.

[HR][/HR]A work-around seems to be, to remove the ‘/var/lib/flatpak/repo’ directory …

Ok. I was hoping for this to be a quick and easy discussion (yes it works, no it’s buggy etc):wink: .

Let’s go from square one. Remember, I only have LXDE installed and running on 15.2 - Gnome and KDE are NOT installed.

Install of Flatpak was straight forward -

chris@asus-roc:~> sudo zypper in flatpak
[sudo] password for root: 
Problem retrieving files from 'Packman Repository'.
Permission to access 'http://packman.inode.at/suse/openSUSE_Leap_15.2/repodata/repomd.xml' denied.
Please see the above error message for a hint.
Warning: Skipping repository 'Packman Repository' because of the above error.
Retrieving repository 'Main Update Repository' metadata .............................................................................................................................[done]
Building repository 'Main Update Repository' cache ..................................................................................................................................[done]
Some of the repositories have not been refreshed because of an error.
Loading repository data...
Reading installed packages...
Resolving package dependencies...

The following 4 NEW packages are going to be installed:
  flatpak libflatpak0 system-user-flatpak typelib-1_0-Flatpak-1_0

4 new packages to install.
Overall download size: 1.7 MiB. Already cached: 0 B. After the operation, additional 5.6 MiB will be used.
Continue? [y/n/v/...? shows all options] (y): 
Retrieving package libflatpak0-1.6.3-lp152.3.3.1.x86_64                                                                                             (1/4), 392.5 KiB (791.3 KiB unpacked)
Retrieving: libflatpak0-1.6.3-lp152.3.3.1.x86_64.rpm .................................................................................................................[done (15.2 KiB/s)]
Retrieving package system-user-flatpak-1.6.3-lp152.3.3.1.x86_64                                                                                     (2/4), 129.9 KiB (   80   B unpacked)
Retrieving: system-user-flatpak-1.6.3-lp152.3.3.1.x86_64.rpm ............................................................................................................[done (961 B/s)]
Retrieving package typelib-1_0-Flatpak-1_0-1.6.3-lp152.3.3.1.x86_64                                                                                 (3/4), 137.3 KiB ( 33.6 KiB unpacked)
Retrieving: typelib-1_0-Flatpak-1_0-1.6.3-lp152.3.3.1.x86_64.rpm ........................................................................................................[done (957 B/s)]
Retrieving package flatpak-1.6.3-lp152.3.3.1.x86_64                                                                                                 (4/4),   1.1 MiB (  4.8 MiB unpacked)
Retrieving: flatpak-1.6.3-lp152.3.3.1.x86_64.rpm ....................................................................................................................[done (966.2 KiB/s)]

Checking for file conflicts: ......................................................................................................................................................[done]
(1/4) Installing: libflatpak0-1.6.3-lp152.3.3.1.x86_64 ............................................................................................................................[done]
(2/4) Installing: system-user-flatpak-1.6.3-lp152.3.3.1.x86_64 ....................................................................................................................[done]
Additional rpm output:
useradd -r -s /sbin/nologin -c "User for flatpak system helper" -g flatpak flatpak


(3/4) Installing: typelib-1_0-Flatpak-1_0-1.6.3-lp152.3.3.1.x86_64 ................................................................................................................[done]
(4/4) Installing: flatpak-1.6.3-lp152.3.3.1.x86_64 ................................................................................................................................[done]
chris@asus-roc:~>

And I added myself to the flatpak group and relogged.

I next added the flathub repo and search for audacity and kdenlive.

chris@asus-roc:~> flatpak --user remote-add --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo
chris@asus-roc:~> flatpak --user remotes
Name    Options
flathub
chris@asus-roc:~> flatpak --user search audacity
Name            Description                        Application ID                   Version        Branch        Remotes
Audacity        Record and edit audio files        org.audacityteam.Audacity        2.4.2          stable        flathub
chris@asus-roc:~> flatpak --user search kdenlive
Name          Description       Application ID        Version      Branch      Remotes
Kdenlive      Video Editor      org.kde.kdenlive      20.12.2      stable      flathub

Installed audacity

chris@asus-roc:~> flatpak --user install org.audacityteam.Audacity
Looking for matches…
Found similar ref(s) for ‘org.audacityteam.Audacity’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: 
Required runtime for org.audacityteam.Audacity/x86_64/stable (runtime/org.gnome.Platform/x86_64/3.38) found in remote flathub
Do you want to install it? [Y/n]: 

org.audacityteam.Audacity permissions:
    ipc    pulseaudio    x11    devices   file access [1]

    [1] host

        ID                                                    Branch            Op            Remote             Download
 1. ✓] org.audacityteam.Audacity.Codecs                      stable            i             flathub              8.6 MB / 8.7 MB
 2. ✓] org.audacityteam.Audacity.Locale                      stable            i             flathub              4.4 kB / 5.1 MB
 3. ✓] org.freedesktop.Platform.GL.default                   20.08             i             flathub             95.3 MB / 95.9 MB
 4. ✓] org.freedesktop.Platform.GL.nvidia-460-39             1.4               i             flathub            133.2 MB / 133.3 MB
 5. ✓] org.freedesktop.Platform.openh264                     2.0               i             flathub              1.5 MB / 1.5 MB
 6. ✓] org.gnome.Platform.Locale                             3.38              i             flathub             16.8 kB / 326.1 MB
 7. ✓] org.gnome.Platform                                    3.38              i             flathub            293.0 MB / 344.6 MB
 8. ✓] org.audacityteam.Audacity                             stable            i             flathub             24.2 MB / 31.2 MB

Installation complete.
chris@asus-roc:~>

and kdenlive

chris@asus-roc:~> flatpak --user install org.kde.kdenlive
Looking for matches…
Found similar ref(s) for ‘org.kde.kdenlive’ in remote ‘flathub’ (user).
Use this remote? [Y/n]: y
Required runtime for org.kde.kdenlive/x86_64/stable (runtime/org.kde.Platform/x86_64/5.15) found in remote flathub
Do you want to install it? [Y/n]: y

org.kde.kdenlive permissions:
    ipc     network     pulseaudio     x11     devices     file access [1]     dbus access [2]

    [1] host, xdg-config/kdeglobals:ro
    [2] com.canonical.AppMenu.Registrar


        ID                                                Branch            Op            Remote            Download
 1. ✓] org.freedesktop.LinuxAudio.Plugins.swh            20.08             i             flathub            12.9 MB / 13.6 MB
 2. ✓] org.kde.KStyle.Adwaita                            5.15              i             flathub             6.2 MB / 6.2 MB
 3. ✓] org.kde.Platform.Locale                           5.15              i             flathub            16.8 kB / 341.5 MB
 4. ✓] org.kde.Platform                                  5.15              i             flathub           188.8 MB / 385.0 MB
 5. ✓] org.kde.kdenlive.Locale                           stable            i             flathub             3.5 kB / 2.4 MB
 6. ✓] org.kde.kdenlive                                  stable            i             flathub            42.0 MB / 45.2 MB

Installation complete.
chris@asus-roc:~> 

Run audacity and it fails

chris@asus-roc:~> flatpak --user run org.audacityteam.Audacity 
Gtk-Message: 10:58:21.156: Failed to load module "canberra-gtk-module"
No protocol specified
Unable to init server: Could not connect: Connection refused
10:58:21: Error: Unable to initialize GTK+, is DISPLAY set properly?
chris@asus-roc:~> 

Run kdenlive and it fails

chris@asus-roc:~> flatpak --user run org.kde.kdenlive 
No protocol specified
qt.qpa.xcb: could not connect to display :99.0
qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found.
This application failed to start because no Qt platform plugin could be initialized. Reinstalling the application may fix this problem.

Available platform plugins are: eglfs, minimal, minimalegl, offscreen, vnc, wayland-egl, wayland, wayland-xcomposite-egl, wayland-xcomposite-glx, xcb.

chris@asus-roc:~> 

I read the notes from @dcurtisfra. I removed kdenlive, added the kdeapps repo and installed kdenlive from that. Still doesn;t work.

I’m having doubts about flatpak in regard to having to second guess if any other packages need to be added manually.

So this is where I’m at. What say you?

Thanks.

Flatpack is a per-user Sandbox.

  • It is not
    , a means of installing system-wide applications …

If you were to use either a KDE Plasma desktop or, a GNOME desktop, then, you can install either KDE or GNOME applications on a per-user basis by means of Flatpack.
[HR][/HR]I have absolutely no idea as to whether or not the LXDE desktop developer community is supporting Flatpack or, not

Thanks dcurtisfra. I was thinking that I needed either a KDE or Gnome DE. To me that makes Flatpaks kind of false advertising though I’m sure it has it’s uses. For me, no as I have my DE prejudices.

Deleting all Flatpak items.

Thanks again.

Flatpak is probably no different than other container type apps no matter the container technology…
There is great flexibility how and what to build in the container, and the author has a choice… Pack the container with everything that’s needed and the container becomes big and fat, or write a lean app that requires dependencies provided by the system. So, I’d expect some containers/Flatpaks to install universally on anything and others that don’t.

The errors you threw running your two test apps are self-explanatory, and relate to your choice of running the LXDE Desktop, which on 15.2 does not install either Gnome or KDE framework components today (go back a few openSUSE versions and LXDE was installed on a light version of Gnome). That’s why your attempt to install Audacity was missing a Gnome compoent and kdenlive was missing a KDE component. You could have installed the missing component or run a different Desktop… eg LXDE has been in minimal maintenance mode for years, all the Developers in the LXDE project long ago moved on to the LXQt project where all active development is ongoing. If you install LXQt, you’ll install the same Qt Framework used by KDE, so you probably can install kdenlive without a problem.

And regarding all containers of all types…
You have to either read the documentation closely before installing, or when the source is visible like in Docker, skim the build file to understand what it is, and what is likely required that’s not provided by the container app.

TSU

1 Like

Hi Tsu2, appreciate your reply.

We could argue the pros and cons of containers for a while. For the record I have run a few docker containers without issue under LXDE. It just works “out of the box” whereas Flatpaks needed help, big help!

And for the record, I love LXDE :wink: and am aware that LXQt is the replacement. But had a few issues with LXQt so am staying in LXDE land. But no doubt in an upcoming upgrade I’ll jump ship.

Thanks.

And that would be expected if you ran Docker containers without dependencies.
But Docker is no different than other containers… You can run simple app or complex apps in them, and even an entire OS.

It’s just as possible to build a Docker application that throws the same problems as what you see in your Flatpaks.

TSU