maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   SailfishOS (https://talk.maemo.org/forumdisplay.php?f=52)
-   -   Flatpak on Sailfish OS (https://talk.maemo.org/showthread.php?t=100909)

Nekron 2020-04-29 07:27

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1567137)
Flatpak 1.6.3 is out, not tested much so far. Those who wish to test can update, others should wait and see if there will be any complaints.

Thanks for the fast update! I installed it yesterday on X and XA2 but found no issues on both devices after the upgrade. I would say that it's safe to install the new flatpak base.

Pim 2020-04-30 17:27

Re: Flatpak on Sailfish OS
 
What do you think of the comment on the Sailfish blog:

"at we do not see FlatPak as the selected Sailfish OS application bundling framework, mainly due to its high resource usage."

https://blog.jolla.com/sailfish-os-r...now-available/

rinigus 2020-04-30 17:49

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by Pim (Post 1567210)
What do you think of the comment on the Sailfish blog:

"at we do not see FlatPak as the selected Sailfish OS application bundling framework, mainly due to its high resource usage."

https://blog.jolla.com/sailfish-os-r...now-available/

Its absolutely correct. I think it is in the context of making Flatpak apps running Silica/Sailfish stack. As developed here, though, it brings functionality that is not available to SFOS, such as latest Qt and interoperability with other mobile Linux distros out there. A bit kind of Android emulation on SFOS, except you work with apps that are developed closer in terms of API (assuming that its Qt/QML) to what we have on SFOS.

vaskas 2020-05-04 04:04

Re: Flatpak on Sailfish OS
 
Hi guys, sorry for the offtopic. I'm curious in what is involved in having a maliit keyboard pop-up plugin responding to Xwayland (e.g. in https://github.com/elros34/sailfish_ubu_chroot) similar to how it's used in flatpak-runner. And what are your views on adopting Xwayland for the applications that can't be used through the current Flatpak setup (e.g. Firefox)?

rinigus 2020-05-04 06:54

Re: Flatpak on Sailfish OS
 
Re Maliit: Maliit plugin has been adjusted to respond to the info provided by Flatpak Runner (screen orientation and such). For that to work, you have to incorporate Maliit plugin into chroot and adjust Xwindows server to communicate with it.

Maliit plugin has been adjusted as described in my commits at https://github.com/sailfishos-flatpa...ommits/flatpak .

Flatpak Runner code is in https://github.com/sailfishos-flatpa...ree/master/src, mainly dbuscontainerstate.{cpp,hpp} and https://github.com/sailfishos-flatpa...runner.cpp#L67


Re Firefox: I don't know how well Maliit supports Gtk apps. As we don't have them running, never looked into it. So, that will have to be investigated and maybe fixed.

As always with such projects, someone has to do it. To be clear, I am not planning to work on it as I have other projects as a priority. So, you either have to do it yourself or find someone to do it.

rinigus 2020-05-06 20:08

Re: Flatpak on Sailfish OS
 
I have recompiled Flatpak using SFOS 3.3.0.x provided libseccomp and json-glib. This build is available through usual Flatpak distribution channel at OBS.

For devices on SFOS 3.2.1.20 (Sony Xperia Tama and maybe some others), until the update is ready, use https://build.merproject.org/project...atpak:3.2.1.20 . The latter project will disappear once we all update to SFOS 3.3.0.16 as it is not needed in future.

I expect that on SFOS 3.3.0.x, install should be clean and there are no conflicts with Jolla's json-glib. I hope it will automatically uninstall json-glib from my repo when you update Flatpak, but haven't tested it.

Nekron 2020-05-07 07:38

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1567349)
I expect that on SFOS 3.3.0.x, install should be clean and there are no conflicts with Jolla's json-glib. I hope it will automatically uninstall json-glib from my repo when you update Flatpak, but haven't tested it.

This looks good :)

Code:

The following packages have to be installed:
 flatpak-1.6.3.0-1.23.4.jolla.armv7hl  Application deployment framework for desktop apps
 flatpak-runner-0.8.5-1.35.2.jolla.armv7hl      Flatpak runner
 flatpak-session-helper-1.6.3.0-1.23.4.jolla.armv7hl    User D-Bus service used by flatpak and others
 libappstream-glib-0.7.15.1-1.14.1.jolla.armv7hl        Library for AppStream metadata
 ostree-libs-2019.6-1.14.2.jolla.armv7hl        Development headers for ostree
 xdg-dbus-proxy-0.1.2-1.5.2.jolla.armv7hl      Filtering proxy for D-Bus connections
 xdg-desktop-portal-1.4.2-1.10.8.jolla.armv7hl  Portal frontend service to flatpak
Proceed with changes? [N/y] y


Updating packages
Downloading packages
Installing packages
Finished
 [nemo@Sailfish ~]$ devel-su pkcon search libjson-glib
Password:
Searching by details
Querying
Finished
 Installed      libjson-glib-1.4.4-1.2.1.jolla.armv7hl (installed)              Library for JavaScript Object Notation format
[nemo@Sailfish ~]$


Nekron 2020-05-07 07:45

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by Nekron (Post 1567356)
This looks good :)

Code:

The following packages have to be installed:
 flatpak-1.6.3.0-1.23.4.jolla.armv7hl  Application deployment framework for desktop apps
 flatpak-runner-0.8.5-1.35.2.jolla.armv7hl      Flatpak runner
 flatpak-session-helper-1.6.3.0-1.23.4.jolla.armv7hl    User D-Bus service used by flatpak and others
 libappstream-glib-0.7.15.1-1.14.1.jolla.armv7hl        Library for AppStream metadata
 ostree-libs-2019.6-1.14.2.jolla.armv7hl        Development headers for ostree
 xdg-dbus-proxy-0.1.2-1.5.2.jolla.armv7hl      Filtering proxy for D-Bus connections
 xdg-desktop-portal-1.4.2-1.10.8.jolla.armv7hl  Portal frontend service to flatpak
Proceed with changes? [N/y] y


Updating packages
Downloading packages
Installing packages
Finished
 [nemo@Sailfish ~]$ devel-su pkcon search libjson-glib
Password:
Searching by details
Querying
Finished
 Installed      libjson-glib-1.4.4-1.2.1.jolla.armv7hl (installed)              Library for JavaScript Object Notation format
[nemo@Sailfish ~]$


Sorry! I just double checked it and there seems to be a difference even if pkcon reports installation of the Jolla-based json-glib package.

Code:

[nemo@Sailfish ~]$ ls -l /usr/lib/libjson-glib-1.0.so.0.400.4
-rwxr-xr-x    1 root    root        108032 Jan  5 09:37 /usr/lib/libjson-glib-1.0.so.0.400.4
[nemo@Sailfish ~]$ devel-su pkcon install libjson-glib
Password:
Resolving
Testing changes
Finished                                                                [                                    ] (0%)
The following packages have to be installed:
 libjson-glib-1.4.4-1.2.1.jolla.armv7hl Library for JavaScript Object Notation format
Proceed with changes? [N/y] y


Installing
Waiting for authentication
Querying
Installing packages
Downloading packages
Installing packages
Finished
[nemo@Sailfish ~]$ ls -l /usr/lib/libjson-glib-1.0.so.0.400.4
-rwxr-xr-x    1 root    root        107988 Mar 27 08:25 /usr/lib/libjson-glib-1.0.so.0.400.4
[nemo@Sailfish ~]$

See the difference in filedate + size after re-installation of the Jolla-based package.

mosen 2020-05-07 07:46

Re: Flatpak on Sailfish OS
 
Went as expected on 3.3.0.16 Proš.

Code:

Checking for file conflicts: ..............................................................[error]
Detected 1 file conflict:

File /usr/lib/libjson-glib-1.0.so.0.400.4
  from install of
    libjson-glib-1.4.4-1.2.1.jolla.armv7hl (jolla)
  conflicts with file from package
    json-glib-1.4.4-1.8.2.jolla.armv7hl (@System)

File conflicts happen when two packages attempt to install files with the same name but different contents. If you continue, conflicting files will be replaced losing the previous content.
Continue? [yes/no] (no): yes


magic cucumber 2020-05-11 15:03

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1567349)
For devices on SFOS 3.2.1.20 (Sony Xperia Tama and maybe

3.2.1.20:

Fatal error: nothing provides libgdk_pixbuf-2.0.so.0 needed by flatpak-1.6.3.0-1.4.1.jolla.armv7hl

Seems there is no libgdk_pixbuf-2.0 or similar package

rinigus 2020-05-11 18:29

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by magic cucumber (Post 1567408)
3.2.1.20:

Fatal error: nothing provides libgdk_pixbuf-2.0.so.0 needed by flatpak-1.6.3.0-1.4.1.jolla.armv7hl

Seems there is no libgdk_pixbuf-2.0 or similar package

pkcon refresh may help? I just switched to 3.3.0.16, cannot test it here, unfortunately.

magic cucumber 2020-05-12 07:49

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1567413)
pkcon refresh may help? I just switched to 3.3.0.16, cannot test it here, unfortunately.

Aye, it helps. Everything seems OK for now. Thx

woidboy 2020-05-18 19:11

Re: Flatpak on Sailfish OS
 
I'm trying to build a flatpak application for Sailfish OS running on Xperia 10. Since I ran over the QEMU bug when compiling for arm on 64-bit hosts, I tried to use the aarch64 architecture (uname -a on the phone says it is aarch64 und with flatpak, I can install all the aarch64 libraries). However, flatpak-runner fails to launch the application.

I get something like this:
[W] unknown:164 - file:///usr/share/flatpak-runner/qml/MainPage.qml:164:5: QML Image: Cannot open: file:///usr/share/flatpak-runner/qml/flatpak-runner
[W] unknown:164 - file:///usr/share/flatpak-runner/qml/MainPage.qml:164:5: QML Image: Cannot open: file:///usr/share/flatpak-runner/qml/flatpak-runner
[D] onCompleted:424 - Warning: specifying an object instance for initialPage is sub-optimal - prefer to use a Component
[W] unknown:53 - file:///usr/share/flatpak-runner/qml/main.qml:53:26: Unable to assign [undefined] to bool
error: Failed to block syscall -10097

Is this error due to the fact of compiling for the aarch64 architecture? By the way, flatpak-runner is working with arm apps like, e.g., angelfish.

On the github pages, it tells us to use a i686 virtual host with the restriction to use only 32 bits when compiling for arm on 64-bit hosts. Would it be also to compile the code on an arm host, e.g., a Rasperry Pi?

rinigus 2020-05-18 19:21

Re: Flatpak on Sailfish OS
 
Right now launching aarch64 doesn't work. There is issue https://github.com/flatpak/flatpak/issues/3548 and, in addition, we don't have hybris arm64 either.

I did try to compile on older Pi, that was very slow. maybe new ones are better. i686 worked for me.

woidboy 2020-05-19 08:17

Re: Flatpak on Sailfish OS
 
Thanks for this information. Then, I'll try first to compile it on my Rasperry Pi.

Actually, I've one more question. The application which I want to compile is a flight navigation app which needs access to GPS data. In order to check if there is GPS access within flatpak, I've installed your Puremaps application, the one which is available on flathub. Unfortunately, geolocation is not working for this app on my Xperia 10 with the official Sailfish OS. Is it possible to enable geolocation for flatpak apps? Do I just need to set the proper finish-args like, e.g., "--allow=geolocation"?

rinigus 2020-05-19 08:41

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by woidboy (Post 1567532)
Thanks for this information. Then, I'll try first to compile it on my Rasperry Pi.

Actually, I've one more question. The application which I want to compile is a flight navigation app which needs access to GPS data. In order to check if there is GPS access within flatpak, I've installed your Puremaps application, the one which is available on flathub. Unfortunately, geolocation is not working for this app on my Xperia 10 with the official Sailfish OS. Is it possible to enable geolocation for flatpak apps? Do I just need to set the proper finish-args like, e.g., "--allow=geolocation"?

Right now, GPS is not supported. As I have rather large amount of projects, I do not plan to work on it either. However, it is maybe possible to make it work if someone investigates the issues and, possibly, writes some code for it.

Flatpak as of now, supports GeoClue2. SFOS is on Geoclue1 version, I think. So, somehow, you would have to figure out how to connect to geoclue1. For Geoclue2 permissions are as in https://github.com/flathub/io.github...eMaps.json#L18

Also, you have to figure out how to make Qt ask geoclue1 for positioning. I would expect its all doable, but requires time investment and testing. Would be great if someone would pick it up.

coderus 2020-05-19 09:23

Re: Flatpak on Sailfish OS
 
hi, i have bottom bar bug in angelfish on jtab: https://gist.github.com/CODeRUS/2b6d...93c5a3276e37a8
https://youtu.be/2cUKZZtqrOQ

rinigus 2020-05-19 09:34

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1567535)

that was from the start on jtab, right?

coderus 2020-05-19 09:56

Re: Flatpak on Sailfish OS
 
i dont remember exactly, but for a long time :))

woidboy 2020-05-19 13:04

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1567533)
Right now, GPS is not supported. As I have rather large amount of projects, I do not plan to work on it either. However, it is maybe possible to make it work if someone investigates the issues and, possibly, writes some code for it.

Flatpak as of now, supports GeoClue2. SFOS is on Geoclue1 version, I think. So, somehow, you would have to figure out how to connect to geoclue1. For Geoclue2 permissions are as in https://github.com/flathub/io.github...eMaps.json#L18

Also, you have to figure out how to make Qt ask geoclue1 for positioning. I would expect its all doable, but requires time investment and testing. Would be great if someone would pick it up.

Thanks a lot!

rinigus 2020-05-20 17:43

Re: Flatpak on Sailfish OS
 
coderus, is it only with angelfish or have you seen some strange effects on other apps as well?

I suspect that it is caused by some HW acceleration of chromium. Maybe you could try to disable all accelerations through QT Webengine env variable and see if it helps. Don't remember now the settings and which var exactly.

coderus 2020-05-20 18:59

Re: Flatpak on Sailfish OS
 
hm i thought it is disable by default by env variables

rinigus 2020-05-20 19:06

Re: Flatpak on Sailfish OS
 
no, not all of them, as far as I know. try to open chrome://gpu in the browser. That's bit tricky, as we haven't fixed https://invent.kde.org/plasma-mobile...sh/-/issues/15 . You have to open it by running from terminal

flatpak-runner org.kde.mobile.angelfish chrome://gpu

with angelfish closed before that

coderus 2020-05-20 19:13

Re: Flatpak on Sailfish OS
 
1 Attachment(s)
check please

coderus 2020-05-20 19:21

Re: Flatpak on Sailfish OS
 
also for me bar bug seems to be qml related...

rinigus 2020-05-21 07:05

Re: Flatpak on Sailfish OS
 
I presume its QTWEBENGINE_CHROMIUM_FLAGS=--disable-gpu , see https://doc.qt.io/qt-5/qtwebengine-debugging.html

It does look in some aspects as QML bug, I agree. But the problem with QML theory is that I have not seen it on any of my tests and I would have expected to see this. Nobody else has reported it either which points towards HW adaptation. What's strange is also the disturbed painting of address entry pane (text not visible, left button pressed).

I cannot reproduce it at all, so would be hard to help or suggest anything.

PS: From your screenshot, looks like it is disabled, but was probably probed.

coderus 2020-05-21 14:59

Re: Flatpak on Sailfish OS
 
--disable-gpu is somehow added automatically, it did not explicit set by env args

rinigus 2020-05-21 17:59

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by coderus (Post 1567611)
--disable-gpu is somehow added automatically, it did not explicit set by env args

I guess it tried to guess the correct options and couldn't find any.

Well, I am completely blank and have no idea what's wrong in this case and what is causing it. But if I will see it on any of my devices, I'll try to look into it further.

Kabouik 2020-05-27 10:54

Re: Flatpak on Sailfish OS
 
2 Attachment(s)
I wanted a modern terminal emulator on SFOS because I encountered some limitations in Fingerterm with some CLI tools and I don't need the touch keyboard. Turns out we can install Konsole with Flatpak and it is *mostly* works:

First, install Flatpak using Rinigus' instructions, then

Code:

flatpak install --user org.kde.konsole # That's a big install
Then, in the Flatpak app, I enabled "Override DPI" for Konsole and set it around 170 for my 2160×1080 phone. The launcher icon should appear after having opened the Flatpak app.

Out of the box, it's not very useful because the flatpak is sandboxed and has no access to the SFOS filesystem and /home/nemo. To work around it, you can launch Konsole using this command:

Code:

flatpak-runner --talk-name=org.freedesktop.Flatpak org.kde.konsole --fullscreen -e flatpak-spawn --host bash
I made a custom .desktop file in /home/nemo/.local/share/applications/ with this Exec to make this automatic (didn't find how to make it work for new tabs too though). This allows Konsole to access the full filesystem just like Fingerterm, and it should be able to execute binaries as well.

https://talk.maemo.org/attachment.ph...1&d=1590583608
https://talk.maemo.org/attachment.ph...1&d=1590583596

Konsole has better color support, and also supports tabs, tiling different sessions in the same Terminal window, resizing tiles, and even touch support to emulate mouse actions (I enabled mouse support in cmus, and that works in Konsole, not in Fingerterm).

There are still some quirks though: I can occasionally get some crashes (error code 135), which I can reproduce for instance by launching cava in one instance and then going back to another. Also, I can't seem to execute micro, I get "open /dev/tty: no such device or address" while it works fine in Fingerterm. Finally, the menu bar is kinda broken because I can't see the menu items; this seems to be related to the custom DPI. That's why the custom command above launches Konsole in fullscreen mode, the menu bar being useless at the moment [Edit: I don't know what changed, but --fullscreen does not work anymore). If anyone has any ideas how to fix these issues, please let me know.

Thanks to @netman and @enigma9o7 for helping me using Konsole without sandboxing.

[Edit] org.kde.falkon launches correctly too and is meant to be a desktop browser while Angelfish is more of a mobile browser. On the Proš, that's ideal in my opinion. However, it has some menu bugs like those i described above and seems to ultimately cause wonky things: I can't confirm my searches or press Enter when I typed an URL in the address bar.

woidboy 2020-05-31 14:53

Re: Flatpak on Sailfish OS
 
Recently, Calindori and Koko stopped working although they did work before. Have there be any changes?

rinigus 2020-05-31 15:25

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by woidboy (Post 1567755)
Recently, Calindori and Koko stopped working although they did work before. Have there be any changes?

Not on our side. But maybe something changed in the apps

woidboy 2020-06-29 19:27

Re: Flatpak on Sailfish OS
 
On the Readme https://github.com/sailfishos-flatpak/main, it is mentioned that it is possible to install Mirage as a matrix client on SailfishOS via flatpak. However, I did nowhere find the flatpak package for arm. I performed a search on flathub as well as one on the project site where I could only find a flatpak version for the x86 architecture. Does anybody know where I can download the arm version?

rinigus 2020-06-30 07:21

Re: Flatpak on Sailfish OS
 
You have to compile it yourself, as it is now. Which is a pain, as ARM32 QEMU on AMD64 has some issues and, in practice, you need to setup 32-bix x86 virtual machine and compile ARM32 flatpak there.

I wrote the script to package it, but it is not pushed to Flathub. Flathub build servers are running on ARM and would be able compile all without issues. However, for publishing at Flathub, some extras are probably needed. I don't plan to work on it, but you are welcome to contribute.

Corresponding issue: https://github.com/mirukana/mirage/issues/1

vaskas 2020-07-01 03:46

Re: Flatpak on Sailfish OS
 
Hi guys, wondering if it's possible to force Angelfish to open links from other apps (Depecher, Mail etc.) in new tabs of an existing instance instead of starting a new one? Angelfish takes a few seconds to start even on a XA2.

rinigus 2020-07-01 06:55

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by vaskas (Post 1568126)
Hi guys, wondering if it's possible to force Angelfish to open links from other apps (Depecher, Mail etc.) in new tabs of an existing instance instead of starting a new one? Angelfish takes a few seconds to start even on a XA2.

We haven't implemented it yet for Angelfish. Feel free to file the issue at https://invent.kde.org/plasma-mobile...lfish/-/issues

woidboy 2020-07-01 08:18

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by rinigus (Post 1568105)
You have to compile it yourself, as it is now. Which is a pain, as ARM32 QEMU on AMD64 has some issues and, in practice, you need to setup 32-bix x86 virtual machine and compile ARM32 flatpak there.

I wrote the script to package it, but it is not pushed to Flathub. Flathub build servers are running on ARM and would be able compile all without issues. However, for publishing at Flathub, some extras are probably needed. I don't plan to work on it, but you are welcome to contribute.

Corresponding issue: https://github.com/mirukana/mirage/issues/1

Thanks! Then, I'll try to compile it on my Raspberry Pi 3. I've already compiled another app there for flatpak support which worked quite well. Concerning my contribution for publishing on Flathub. At the moment, I'm quite busy but when this is going to change, I might have a look.

cy8aer 2020-07-01 18:19

Re: Flatpak on Sailfish OS
 
I am trying to get angelfish the standard browser.

This is quite simple:

Code:

cd .local/share/applications
cp flatpak-runner-autogen-org.kde.mobile.angelfish.desktop open-url.desktop

edit open-url.desktop and add an %U to the exec line:

Code:

Exec = flatpak-runner org.kde.mobile.angelfish %U
This already works quite good but for every call the browser is started in a new instance. Is there a way/option to transfer the url to a running instance?

rinigus 2020-07-01 18:31

Re: Flatpak on Sailfish OS
 
@cy8aer: two posts before yours. it would need dbus service, I presume. haven't implemented it yet, should do it at some moment. feel free to open the issue :)

PS: Looks like it is something we all miss

taixzo 2020-07-01 19:56

Re: Flatpak on Sailfish OS
 
speaking of Matrix, @cy8aer, is Bluepill still being developed?

cy8aer 2020-07-03 20:49

Re: Flatpak on Sailfish OS
 
Quote:

Originally Posted by taixzo (Post 1568141)
speaking of Matrix, @cy8aer, is Bluepill still being developed?

It is. Actual development state: The python nio based engine works quite well now, including e2e, key verification and many events like typing, read events, and indefinitely scoll up...

For the architecture: the python engine nearly runs stand alone. Because it uses asyncio there are interfaces for the (or any!) gui to call methods and an open signalling system which fires events (in our case this is pyotherside). I am able to run the python engine just in an interactive python shell and on my laptop it is running for weeks now. There is a bucket based cache backend for running it offline. And it looks quite stable (I did not have any "hangings" like in the PoC). It may "sleep" for about 30 seconds but then gets every event which was fired when offline.

Now I need to glue it to the gui. Actual login/logout works, I am just implementing the room list dashboard. The whole thing is really complicated, I need to reimplement a mocking client for the gui but this can be developed on a virtual machine.

What I can say by now: When it is ready it is ways faster than the draft/PoC version that can be found on gitlab.

But please give me some more time... there are many things to do, like e.g. deleting events on the event view when we did read them...

You want to see the running python engine?

https://gitlab.com/cy8aer/bluepill/snippets/1948322


All times are GMT. The time now is 12:12.

vBulletin® Version 3.8.8