• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login
UBports Robot Logo UBports Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Register
  • Login

What's Inside the Black Box of Ubuntu Touch?

Scheduled Pinned Locked Moved General
49 Posts 9 Posters 10.0k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rob
      last edited by 30 Jan 2020, 20:57

      @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..

      1 Reply Last reply Reply Quote 0
      • R Offline
        rob
        last edited by 30 Jan 2020, 21:04

        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.

        1 Reply Last reply Reply Quote 1
        • R Offline
          rob
          last edited by 30 Jan 2020, 22:53

          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.

          1 Reply Last reply Reply Quote 0
          • A Offline
            arubislander
            last edited by 30 Jan 2020, 22:57

            You are writing your own app, to run specifically in Libertine? To what effect?

            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
            Happily running Ubuntu Touch
            Google Pixel 3a (20.04 DEV)
            JingPad (24.04 preview)
            Meizu Pro 5 (16.04 DEV)

            1 Reply Last reply Reply Quote 0
            • R Offline
              rob
              last edited by 30 Jan 2020, 23:25

              @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..

              1 Reply Last reply Reply Quote 0
              • R Offline
                rob
                last edited by rob 31 Jan 2020, 00:29

                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.

                A 1 Reply Last reply 31 Jan 2020, 05:56 Reply Quote 0
                • A Offline
                  arubislander @rob
                  last edited by 31 Jan 2020, 05:56

                  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.

                  πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                  Happily running Ubuntu Touch
                  Google Pixel 3a (20.04 DEV)
                  JingPad (24.04 preview)
                  Meizu Pro 5 (16.04 DEV)

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rob
                    last edited by 31 Jan 2020, 06:55

                    @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.

                    A ? 2 Replies Last reply 31 Jan 2020, 11:00 Reply Quote 0
                    • A Offline
                      alan_g @rob
                      last edited by 31 Jan 2020, 11:00

                      @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
                      
                      1 Reply Last reply Reply Quote 0
                      • ? Offline
                        A Former User @rob
                        last edited by 31 Jan 2020, 11:23

                        @rob
                        The real goal is to not need either Libertine or Anbox... but have apps running natively in UT.

                        H A 2 Replies Last reply 31 Jan 2020, 11:29 Reply Quote 0
                        • H Offline
                          hummlbach @Guest
                          last edited by 31 Jan 2020, 11:29

                          @3arn0wl lets say the "real ultimate final godlike world domination" goal... πŸ˜‰

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rob
                            last edited by 31 Jan 2020, 22:48

                            @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?

                            A D 2 Replies Last reply 31 Jan 2020, 23:52 Reply Quote 0
                            • R Offline
                              rob
                              last edited by 31 Jan 2020, 22:50

                              @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

                              D 1 Reply Last reply 1 Feb 2020, 17:10 Reply Quote 0
                              • A Offline
                                alan_g @rob
                                last edited by 31 Jan 2020, 23:52

                                @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.

                                1 Reply Last reply Reply Quote 0
                                • G Offline
                                  Giiba
                                  last edited by 1 Feb 2020, 00:21

                                  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.

                                  1 Reply Last reply Reply Quote 2
                                  • D Offline
                                    dobey @rob
                                    last edited by 1 Feb 2020, 05:05

                                    @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 with ubuntu-app-launch from the host. It runs the app with a clean environment, and sets variables that need to be set. As xcb 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.

                                    1 Reply Last reply Reply Quote 0
                                    • R Offline
                                      rob
                                      last edited by 1 Feb 2020, 07:26

                                      @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.

                                      1 Reply Last reply Reply Quote 1
                                      • A Offline
                                        arubislander @Guest
                                        last edited by 1 Feb 2020, 09:47

                                        @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)

                                        πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                        Happily running Ubuntu Touch
                                        Google Pixel 3a (20.04 DEV)
                                        JingPad (24.04 preview)
                                        Meizu Pro 5 (16.04 DEV)

                                        ? 1 Reply Last reply 1 Feb 2020, 13:22 Reply Quote 0
                                        • ? Offline
                                          A Former User @arubislander
                                          last edited by 1 Feb 2020, 13:22

                                          πŸ™‚ I fully understand that, @arubislander.

                                          A 1 Reply Last reply 1 Feb 2020, 15:33 Reply Quote 0
                                          • A Offline
                                            arubislander @Guest
                                            last edited by 1 Feb 2020, 15:33

                                            My apologies, @3arn0wl. Your comment threw me off.

                                            πŸ‡¦πŸ‡Ό πŸ‡³πŸ‡± πŸ‡ΊπŸ‡Έ πŸ‡ͺπŸ‡Έ
                                            Happily running Ubuntu Touch
                                            Google Pixel 3a (20.04 DEV)
                                            JingPad (24.04 preview)
                                            Meizu Pro 5 (16.04 DEV)

                                            1 Reply Last reply Reply Quote 0
                                            34 out of 49
                                            • First post
                                              34/49
                                              Last post