What's Inside the Black Box of Ubuntu Touch?
-
On the Gobject installation, why did the apt install not automatically handle those dependencies?
-
@rob said in What's Inside the Black Box of Ubuntu Touch?:
Is there further documentation on ubuntu-app-launch? I've been searching for this since early today and haven't found much.
There is some API documentation for developers working on the system, but the
ubuntu-app-launch
tool itself is quite trivial. It only takes one argument, the appid that is being launched.ubuntu-app-launch-appids
will list the installed appids available to launch.@rob said in What's Inside the Black Box of Ubuntu Touch?:
Is this launch command handling the display server? Is the handling of Xmir/Xwayland (future) done automatically? Or do I have to do something else either on the host or in the container?
Xmir does not work in the same way that Xwayland does. A server is started for each X11 app that is being run (so that X11 apps cannot pry into the
$DISPLAY
and steal data from other X11 apps) with Xmir, while Xwayland has a single display server. Therefore, starting of Xmir for each app is handled by theubuntu-app-launch
code, hence why you need to launch GUI apps with it.@rob said in What's Inside the Black Box of Ubuntu Touch?:
On the Gobject installation, why did the apt install not automatically handle those dependencies?
Why should it, if you did not install anything which doesn't need them? As you are the developer in this case, you need to install the dependencies you need when developing an application. The libertine container doesn't know what you need in it, for your own code.
-
@dobey said in What's Inside the Black Box of Ubuntu Touch?:
Why should it, if you did not install anything which doesn't need them? As you are the developer in this case, you need to install the dependencies you need when developing an application. The libertine container doesn't know what you need in it, for your own code.
It's only a comment related to consistency between UT/Libertine-Container vs let's say an Ubuntu 18.04 desktop which is what I'm using. I documented the dependencies needed to install it on Ubuntu 18.04 and am discovering that it is differently packaged for UT. Maybe this is a 16.04 thing..
-
And the ubuntu-app-launch worked on something I installed from apt! Thanks! Slowly making sense.
My python app is still failing on some other aspect of gtk so I'll research that some more. But glad to have made some progress.
-
I moved now to a different approach which is to try to make a Python QT app. So I get the error:
This application failed to start because it could not find or load the Qt platform plugin "ubuntumirclient".Then I see that this is now deprecated and that this will replaced by Xwayland. But this is just a basic Qt app.
I can't even get a simple python Hello World in QT to work in a Libertine Container. That''s all I'm doing.
-
You are writing your own app, to run specifically in Libertine? To what effect?
-
@arubislander hi there! This is more than a simple attempt at making an app. This is a deeper attempt at uncovering how things work on UT. Given that the host system is locked down, the place to do anything else is in a Libertine-Container if that is doable.
This is part of an education series that I'm doing to get more people to appreciate UT (see this video https://youtu.be/rMmWmNyDKG8 )
Yes, I did write a cybersecurity GTK app that I'm sure can be made to run on PureOS on a Librem5 (I don't have one yet so I'm unable to try it). But it runs fine on any Gnome distro. Happy to convert it to QT as well though I have not used QT before.
I can tell you that people will migrate to PostmarketOS on a Pinephone if they can't figure out how UT works. So that is the bigger picture here.
Now for a personal use case, I can easily write things that I can find a purpose for without necessarily wanting to make some Openstore click package. As example, something for a cybersecurity purpose. So doing simple programs is something I expect I can do on any Linux device, for example, a Raspberry PI.
I realize that UT is a different animal but I'm just looking for a predictable behavior so I can push it in a positive way..
-
The other problem that makes it necessary to use the Libertine-Container is that even if I force a read-write on the main system, there's not enough space on /var/cache/apt/archives so you can't really even do much.
And I'm only testing...
Even doing a compile of one of the existing system apps like address-book-app will not work since there's no space to download a build system (perhaps this will not be a limitation on the pinephone since it won't have these specific android partitions)
I realize that many things don't run on Libertine but if I know what the limitations are then it can be put to use. Yes it is pointless running GUI apps like Wireshark, Gimp, Libreoffice and such on it since it's not usable anyway.
I know for example, that non-GUI apps made with Python run fine. Bash stuff runs fine. And that has value, particularly for cybersecurity.
-
Hi @rob, So you want to see how far you can get using UT as a 'regular' Linux distro in Libertine?
In my experience GTK apps work better in Libertine than QT apps. So maybe give the GTK version another go. Only this time Get it compiling and running in a 16.04 LXC container first on your main machine. That should give you a better idea of the dependencies required for your app to run in Libertine.
-
@arubislander thank you. Yes that's been my experience so far. GTK gets me further in Libertine. Which is funny. According to the docs, the host system has a lot of the Qtquick/QML libraries loaded already, so I'm thinking that on a Pinephone, there might be more room to play with it without Libertine and if so I'll try QML on it.
But still as of today, my particular app gets a segmentation fault when I run it using Gtk and started with ubuntu-app-launch. I can simplify the app to figure out where the fault is but this could be one of the many issues with Libertine itself.
This is my plan of action so far. I think that doing any kind of major development on Libertine is not the most productive, other than for an educational exercise. Which I will do for a video.
However, I imagine that the Pinephone will open up more possibilities since it would be no big deal to modify the main UT install. Just have a back UT SD card ready and you're back in business for daily driver use!
From what I understand now of the architecture, some of the limitations I'm finding now may disappear. I'll know for sure on a real Pinephone soon.
-
@rob said in What's Inside the Black Box of Ubuntu Touch?:
GTK gets me further in Libertine. Which is funny. According to the docs, the host system has a lot of the Qtquick/QML libraries loaded already, so I'm thinking that on a Pinephone, there might be more room to play with it without Libertine and if so I'll try QML on it.
It's a long time since I tried developing on the phone, but one thing to bear in mind is the different backends/platforms that toolkits can be configured to use.
The "native" Ubuntu Touch environment uses mirclient, and the corresponding environment variables for Qt, GTK and SDL2 are:
QT_QPA_PLATFORM=ubuntumirclient GDK_BACKEND=mir SDL_VIDEODRIVER=mir
However, for using Xmir (or in the future Xwayland) from Libertine these ought to be:
QT_QPA_PLATFORM=xcb GDK_BACKEND=x11 SDL_VIDEODRIVER=x11
Hope that clarifies some of the issues you're seeing.
PS At some point there will be a migration to Wayland:
QT_QPA_PLATFORM=wayland GDK_BACKEND=wayland SDL_VIDEODRIVER=wayland
-
@rob
The real goal is to not need either Libertine or Anbox... but have apps running natively in UT. -
@3arn0wl lets say the "real ultimate final godlike world domination" goal...
-
@alan_g that is really helpful. Now just to help in my understanding, where, as example does one configure a QT or a GTK so use these settings?
-
@3arn0wl I hope the real objective is freely do whatever we want. Sometimes we use shared public apps. Sometimes we may want to make private apps. Sometimes we just want to play
-
@rob said in What's Inside the Black Box of Ubuntu Touch?:
@alan_g that is really helpful. Now just to help in my understanding, where, as example does one configure a QT or a GTK so use these settings?
These want to be set for the process using the toolkit. Hopefully setting them for the launch command is enough:
QT_QPA_PLATFORM=xcb ubuntu-app-launch ...
There may be further details, it's been a long time since I did any of this.
-
This is tangential, but I feel it relevant to the discussion of apps.
I feel this is what @3arn0wl was getting at:
I think the current app that best represents what the community at large is in need of is Pure Maps. It is well designed, runs natively, and has been portable to multiple OS's. If there is a gold standard, it involves these criteria. I know there are others, I just don't know them off-hand.If the Linux mobile ecosystem had enough apps like that we wouldn't need Libertine and Anbox. At least in a philisophical way, to avoid derailing the discussion.
-
@rob You shouldn't need to "configure" any apps in any way for these things. You need a
.desktop
file for your app in libertine, and you need to launch the app withubuntu-app-launch
from the host. It runs the app with a clean environment, and sets variables that need to be set. Asxcb
is the default QPA, and the app is run under Xmir (and thus has$DISPLAY
set), it should try to use that. If not, perhaps there is a bug somewhere, but libertine is also an experimental feature to allow using legacy apps (which are mostly only usable on larger screens with a mouse and keyboard attached).If you want to develop mobile native apps, really, libertine is not the way to do it.
-
@dobey thank you. the question on the setting was for me to understand how the graphics framework knows to use which display client to use. That's all. Most of my questions here are for discovery and education (for my Youtube videos on UT) and not for anything I'm specifically doing.. One of the videos will discuss Mir specifically.
And it actually came to me as I ran libertine launch and the message about the mirclient came up. I was just curious where that was set.
This is a great community and I hope to be saying many positive things about it and all of you.
-
@3arn0wl,
@rob's goal, as I understand it, is not to create an app at all, but to explore the limits of what is possible with the system, preferably while still remaining within support (i.e. not breaking OTA updates)