![]() |
Flatpak on Sailfish OS
2 Attachment(s)
This is to announce Flatpak support for Sailfish. Its raw on the edges, limited, but possible and, hopefully, will be available for your SFOS devices. With it, Flatpak allows you to use latest SDKs for your code development and running applications developed for Linux and distributed in this format.
Development is done via repositories at https://github.com/sailfishos-flatpak. For issues and documentation see https://github.com/sailfishos-flatpak/main Right now, Flatpak support is available for Sony Xperia Tama devices (unofficial port) with the hope that other devices will follow. Due to QtWayland limitations, only Qt/QML applications run well with Gdk apps refusing to start due to the absence of currently standard Wayland extensions. For issues, see README at Github and its issue trackers. Obligatory screenshots below showing KDE Plasma Mobile Web browser running on Sailfish. |
Re: Flatpak on Sailfish OS
:eek: Amazing
|
Re: Flatpak on Sailfish OS
Unbelievable. Great work Rinigus, again. Thanks a lot, the community owes you a lot. :o
|
Re: Flatpak on Sailfish OS
The flatpak is unknown to me. What are the benefits? With "Make Mint faster" instructions the flatpak is one to be deleted for good because of... something. So what are the benefits of flatpak? Curious.
|
Re: Flatpak on Sailfish OS
https://en.wikipedia.org/wiki/Flatpak
In lay terms, it is a packaging format that allows you to run applications in a sandbox. As a result, your application sits in the same perceived environment regardless on whether it runs on Debian, Fedora, Gentoo, or, with the developed support, on Sailfish. There are limitations that make its use limited, but some we could maybe resolve. Now, for us, it means ability to run KDE Plasma Mobile apps. In future, with Wayland compositor update, Gdk apps as well. In addition, it also allows to develop using Qt 5.12/5.13 already now. There is a price to pay. Native look is not available, at least right now. Starting apps takes longer time as container has to be prepared. Keyboard requires special attention and a mod of the app before used. Hopefully, the latter can be resolved and we could use SFOS keyboard. As a developer, I have distributed Pure Maps and OSM Scout Server via Flatpaks. As a result, I can package it in one place and have it on all desktop distributions. For native look, you have to package separately and write accordingly, as done for SFOS and Ubuntu Touch. For my apps, KDE Kirigami (as in Plasma Mobile) style is used for Flatpaks. |
Re: Flatpak on Sailfish OS
There's no locale in OSM Scout Server flatpak?
|
Re: Flatpak on Sailfish OS
Thanks Rinigus, I understand now the benefits. Is this something that can be use also for Leste and N900? And longer starting times do not matter that much if the app works well after launching and if otherwise the application would be without reach with the device. Great work you do.
|
Re: Flatpak on Sailfish OS
Quote:
|
Re: Flatpak on Sailfish OS
Quote:
|
Re: Flatpak on Sailfish OS
1 Attachment(s)
Quote:
There isn't. Works fine in Pure Maps flatpack. |
Re: Flatpak on Sailfish OS
Outstanding work!
|
Re: Flatpak on Sailfish OS
Quote:
|
Re: Flatpak on Sailfish OS
How does the memory usage of Flatpak apps compare with native ones?
|
Re: Flatpak on Sailfish OS
Quote:
|
Re: Flatpak on Sailfish OS
Quote:
So, in practice: - if you have KDE platform with Qt 5.12 installed in home (--user) - all apps using this platform will share Qt libs and all libs in the platform - the libs bundled with the apps (like some ones required for specific action by that app) will not be shared between apps In this respect, it the same for us now. All libs bundled with the apps don't share RAM even if they are the same. So, we get an overhead of loading platform libs to RAM, but we can minimize it by using the same runtime as much as we can. However, the discussion in that linked issue is interesting for getting info on Flatpak internals. |
Re: Flatpak on Sailfish OS
Quote:
For that it's important to note, how Flatpaks & runtimes are actually stored - in a single shared OSTree repo. OSTree provides some key benefits for flatpaks:
Especially the last point is pretty important and should be stressed. Thanks to this, you can have say 5 versions of the KDE (or any other) installed, but it will not consume much less than 5 full copies (basically size of all the shared bits + all the individual differences). The same thing is true for applications - everything is automatically deduplicated against everything else. So if two apps bundle the same thing, say libfoo built the same way, resulting in the same binaries or say some bitmap files - there will always be just a single copy stored for all the apps. To summarize - thanks to its innovative storage layout even with the need for runtimes when compared to "normal" packages, Flatpak is pretty efficient in both storage of runtimes and apps as well as for runtime and app updates. Many of these things are simply not possible or pretty hard to do just with regular RPM (easy parallel installation & automatic deduplication). Also - HUGE thanks to rinigus for working on this - you are really a hero! :) I was secretly hoping Jolla would pick this up as the main native app distribution mechanism given that it fixes many many of the problems of the current platform and store (such as the App version and system version of Qt being the same, turning Qt updates into a tricky and ornerous process). But this is also a way. :) Fingers crossed that this time they they will give priority to any changes needed in the regular Sailfish OS for full Flatpak support, so that Sailfish OS users on as many devices as possible can use it. :) |
Re: Flatpak on Sailfish OS
@MartinK: thanks a lot for the background. I am sure we will be able to get it working on all devices or at least on the updated ones. Right now I am focusing on getting the keyboard working, then would have to polish different aspects and when its end-user usable, get it supported on wide range of devices.
If done well, I am sure Jolla will see the benefit in it. But we don't have to rely on them and let it out as much as we could through community. |
Re: Flatpak on Sailfish OS
very promising at all! i am not able to run the plasma browser, may be i forgot something?
|
Re: Flatpak on Sailfish OS
Quote:
Its not ready yet for general use. Making good progress with the keyboard (can already trigger SFOS one from Flatpak app), but need to polish keyboard-app communication further. When ready, will have to see how to properly incorporate that into the platform. |
Re: Flatpak on Sailfish OS
I have just released new flatpak runner with Sailfish keyboard support. The keyboard required
It could still have some issues with the keyboard, but those could be resolved later. I presume it should also work with the hardware keyboard device as it should be configured on Maliit server side (residing on SFOS). So, right now we can use QML/Qt apps with the keyboard. Keyboard follows application screen orientation, hides when you switch away from it, can be used to enter chars. Example packaging script for Angelfish is in the separate repository, https://github.com/sailfishos-flatpak/example-apps |
Re: Flatpak on Sailfish OS
I have made tmp solution that mounts Maliit plugin into any app running in Flatpak. This solution requires:
- flatpak-maliit-plugin-qt installed in SFOS - app should use KDE 5.12 runtime Just released flatpak-runner will add the plugin into container when app is running and keyboard can be used. So, this means that we can use Flatpak applications as they are provided by KDE and Flathub. No recompile or hacking is needed. Assuming that they are QML/Qt 5.12 ... Proper solution will be to add Maliit plugin as an extension of KDE runtime. Will talk to KDE devs about it. |
Re: Flatpak on Sailfish OS
Yesterday, patches required to libhybris linker were merged and, I presume, will be part of the next SFOS release. Which would bring Flatpak support for many, if not all, devices. If you are using unofficial port, you could already ask maintainers to bump their libhybris to version 0.0.5.34 to get it working in between updates.
|
Re: Flatpak on Sailfish OS
great work, angelfish is running now (a bit sluggish, but that is not the point). would be nice to get some audio apps working, audacity should be possible, i saw the mic levelmeter even with the last version... unfortunally flathub does not have an arm version of mixxx, would be crazy to dj with a mobile!
|
Re: Flatpak on Sailfish OS
Quote:
- should be Qt/QML 5.12 - no additional windows open. Requirements explained in this thread |
Re: Flatpak on Sailfish OS
Quote:
|
Re: Flatpak on Sailfish OS
Quote:
Gtk sits on top of Gdk |
Re: Flatpak on Sailfish OS
New flatpak runner is out: 0.4.0
This time it has been mainly about making it usable. From now on, you don't need to make GL extension manually anymore - its made for you on the first start of flatpak-runner. The app takes care of refreshing the list of flatpak applications installed on your device and generates corresponding .desktop files. As a result, you can launch them as if they are SFOS apps from the app grid. When started without hosting any app, it will show the list of installed flatpak apps and will allow you to tune environment for each of them. You can add default and app-specific env variables, change QT scaling and DPI parameters. For qtwebengine based browser, I recommend to set scaling to 2 or 3 (depending on your device) for better hidpi screen support. Known bugs: https://together.jolla.com/question/...not-respected/ |
Re: Flatpak on Sailfish OS
is tere a list/wiki with usable software? :D i am new to flatpak and no idea what i just installed :DD
|
Re: Flatpak on Sailfish OS
Quote:
- Angelfish available from KDE Flatpak repo, org.kde.mobile.angelfish; developed at https://invent.kde.org/jbbgameich/plasma-angelfish - Maybe Matrix client Spectral, https://gitlab.com/spectral-im/spectral We are limited to QML apps due to QtWayland 5.4 that we have and which is used in the compositor run by flatpak-runner. On top of that, flatpak-runner compositor is in particularly bad and assumes that it has only one window to show. Which does cause some issues. Depending on Qt update on SFOS, we will either have to work with QtWayland 5.4 or just wait with this limitation for now. I'm mainly looking into improving the browser, Spectral has issues with touch controlled devices (issues filed). Browser, as distributed now, is slow. Bugfix is known and already applied, but may require further investigation on my side. As for other software, much is written for desktop. Gtk apps are no go for now (too old QtWayland compositor). In sum, right now, you have to get hands dirty to get software that you want and be ready to fix it. Shouldn't be a problem, right? Did you check that your device has newer libhybris? libhybris-0.0.5.34 is required. |
Re: Flatpak on Sailfish OS
I am trying the github instructions on Proš but struggle at adding the repos.
Code:
[nemo@mosen-Pro1 ~]$ flatpak remote-add -vv --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo Code:
flatpak remote-ls --user kdeapps When installing sth: Code:
[nemo@mosen-Pro1 ~]$ flatpak install -vv --user org.kde.mobile.angelfish |
Re: Flatpak on Sailfish OS
Thanks i installed angelfish just fine. Just wanted to know if there is anything around i can try as well :)
Running on fxtec pro1. |
Re: Flatpak on Sailfish OS
@mosen, I wonder whether you rebooted after install of flatpak.
|
Re: Flatpak on Sailfish OS
I did, after starting up the flatpak-launcher once from gui appdrawer.
Is it a clean way to "zypper remove flatpak flatpak-runner flatpak-maliit-plugin-qt" and try again? |
Re: Flatpak on Sailfish OS
Quote:
/home/nemo/.local/share/flatpak/ first. And check that your /var/lib/flatpak/ is empty. Then add repos again ... |
Re: Flatpak on Sailfish OS
i had no problems installing everything from scratch today. except instaalling missing pyotherside requires :)
|
Re: Flatpak on Sailfish OS
@coderus: requirement added and new release is out (minor)
If you want to develop using Flatpak or compile something, make sure you check https://github.com/sailfishos-flatpa...Development.md and the known issues listed there at the bottom. |
Re: Flatpak on Sailfish OS
Quote:
Anyway, I did install the kde-arm-Qt-5.12 runtime and then the Angelfish on phone. I flatpak installed the org.kde.Platform/arm/5.12 in PC and copied the runtimes to the phone under ~/.local/share/flatpak/runtime/. Installing Angelfish from kdeapps repo went *mostly* fine then on Sailfish the normal way. I observed that the flatpak wouldn't throw the timeout error when accessing flathub if the install/repo-sync operation was carried out quickly after a fresh Sailfish restart. It starts to throw errors after that. |
Re: Flatpak on Sailfish OS
I have heard that Flathub has sometimes net issues, but usually its not too bad. I wonder now whether your phone enters suspend and looses connection because of that. In this case, the timeouts could come with switched off screen, but not with display on.
|
Re: Flatpak on Sailfish OS
Happy lal has similar to tell :)
I thought i was stupid over the last 2 evenings :D But yes, it looks like network issues and i had the same thought and tried with display on while charging and usb plugged in. Can also confirm the kdeapps repo not throwing errors. Also tried to switch wlan off and get repos from mobile data, same. Standing by for debug instructions ;) |
Re: Flatpak on Sailfish OS
TBH, I have no clue the downloads fail. Could be probably many reasons behind it. Maybe something is with infrastructure of Flathub leading to it. But a trick that @lal used should work for you too. If you have PC nearby
|
All times are GMT. The time now is 04:16. |
vBulletin® Version 3.8.8