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

    Ubuntu Touch Programming Course

    Scheduled Pinned Locked Moved App Development
    documentationubuntu touch
    113 Posts 27 Posters 67.8k Views 12 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.
      • mimecarM Offline
        mimecar
        last edited by

        @HendriXXX, I think I've got it.

        The steps are:

        • sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
        • sudo apt-get update
        • sudo apt-get upgrade && sudo apt-get dist-upgrade

        Reboot the computer

        • sudo lxd init

        Do you want to configure a new storage pool (yes/no) [default=yes]?
        Name of the new storage pool [default=default]:
        Name of the storage backend to use (dir, lvm, zfs) [default=zfs]:
        Create a new ZFS pool (yes/no) [default=yes]?
        Would you like to use an existing block device (yes/no) [default=no]?
        Size in GB of the new loop device (1GB minimum) [default=15GB]:
        Would you like LXD to be available over the network (yes/no) [default=no]?
        Would you like stale cached images to be updated automatically (yes/no) [default=yes]?
        Would you like to create a new network bridge (yes/no) [default=yes]? no

        LXD has been successfully configured.

        Launch IDE with:

        • ubuntu-sdk-ide

        Configure the kits and restart ubuntu-sdk-ide. A message will appear indicating that the container is faulty. Accept to correct them. After this step it will work fine. I was able to run an example application on the computer and the M10 FHD with these steps.

        Pulsar33P 1 Reply Last reply Reply Quote 1
        • mimecarM Offline
          mimecar
          last edited by

          A question related to the course. Are your applications working well with UBports firmware (I still have Canonical firmware)? Are there any errors other than those related to LXD and Ubuntu 16.04?

          F 1 Reply Last reply Reply Quote 0
          • F Offline
            fulvio @mimecar
            last edited by fulvio

            Hi @mimecar,
            i have successfully installed UBports on my tablet BQ M10 FHD removing Canonical version using UBports installer. Currently i don't have problems about applications running and development (using Ubuntu SDK).
            I have installed on UBports an old application (QML + js) that i have made for Canonical version and works well.
            I'm using Ubuntu SDK and emulator and i don't have problems (i have installed it some time ago). For example i can connect my tablet (running UBports version) with the PC ( running ubuntu 16.04 LTS) and i can run applications from Ubuntu SDK to test them, like previously with the Canonical version.
            I have made i couple of new applications (QML + js), packaged as .click with Ubuntu SDK, deployed on OpenStore and successfully installed on my Tablet (and other people have downloaded them). I can't provide info about Scope and applications made with languages different from QML and javascript.
            If you mean specific tests or info tell me.
            My tablet run UBPorts 15.04 (r9) availabe on Ubports RC channel.

            1 Reply Last reply Reply Quote 0
            • HendriXXXH Offline
              HendriXXX
              last edited by

              Thanks @mimecar, I tried your install steps, but it still didn't work.

              BUT
              I managed to find actual cause of the problem.. it was permission problem. "unix.socket" file was owned by root. So I changed file ownership to lxd and it works.

              sami@acer1:~$ ls -la /var/lib/lxd/unix.socket
              srw-rw---- 1 root root 0 marra 13 12:37 /var/lib/lxd/unix.socket
              sami@acer1:~$ sudo chown lxd:lxd /var/lib/lxd/unix.socket
              sami@acer1:~$ ls -la /var/lib/lxd/unix.socket
              srw-rw---- 1 lxd lxd 0 marra 13 12:37 /var/lib/lxd/unix.socket
              

              Hope this helps if someone else has same problem someday.. 🙂

              1 Reply Last reply Reply Quote 1
              • mimecarM Offline
                mimecar
                last edited by

                Thank you for answering @fulvio. I hope to move on to UBports firmware today.

                @HendriXXX , I will add your answer to the course. Thank you for sharing the solution.

                The Telegram group link of the course is now fixed (previously expired from time to time).

                1 Reply Last reply Reply Quote 0
                • mimecarM Offline
                  mimecar
                  last edited by

                  Good afternoon

                  I just published the December course chapter. In this issue, @fulvio 's example application continues. Based on the temperature recorder, the possibility of displaying temperatures on a graph is added.

                  The concepts are more advanced than those seen in the normal course. For this reason, it is necessary to have a solid base of QML, JavaScript and SQLite. If you have any questions you can ask in the forum.

                  I was planning to publish more content. There is a translation that I have to revise and publish, but for reasons of time I will publish it in January. There are some surprises in the inkwell, but at the moment I won't give any more details.

                  • https://www.gitbook.com/book/mimecar/ubuntu-touch-programming-course/details
                  • https://github.com/mimecar
                  1 Reply Last reply Reply Quote 0
                  • mimecarM Offline
                    mimecar
                    last edited by mimecar

                    Good afternoon.

                    I've posted a new course block. While the previous blocks worked with the Ubuntu Touch SDK, native applications will be programmed in this block on the desktop. There is also a new application that I hope you will be interested in programming.
                    https://mimecar.gitbooks.io/ubuntu-touch-programming-course/content/en/chapter-06.html

                    This month I hope to publish more content I have pending. I will inform you about the news in this forum thread.
                    https://www.gitbook.com/book/mimecar/ubuntu-touch-programming-course/details

                    1 Reply Last reply Reply Quote 2
                    • N Offline
                      Nithin
                      last edited by

                      I am trying to follow the tutorial here and managed to install the new Ubuntu Sdk. When I run or build the app i get the following messages

                      in Issues> error: There was a error in the device detection of desktop, no IP address was returned.
                      in application output> Application failed to start: No private key file given.

                      Couldnt find the solution anywhere to this. Does anyone know what is happening here.

                      1 Reply Last reply Reply Quote -1
                      • mimecarM Offline
                        mimecar
                        last edited by

                        Hi @Nithin,

                        On the Devices tab, have you configured the ports and the SSH connection?

                        1 Reply Last reply Reply Quote 0
                        • N Offline
                          Nithin
                          last edited by

                          HI mimecar, Thanks a lot for the help. I am running Kubuntu, and not Ubuntu. Should that be a problem?
                          This is how my devices tab looks like
                          0_1517946583070_32c560b4-92f9-47c8-910e-88f28dc41634-image.png
                          0_1517946598491_c056bed5-84c4-4daf-b88b-cdeafff9f7db-image.png
                          Also this
                          0_1517946984981_b05f661e-2532-4a63-b344-a25578f68fbe-image.png

                          mimecarM 1 Reply Last reply Reply Quote 0
                          • mimecarM Offline
                            mimecar @Nithin
                            last edited by

                            @nithin, Have you done all the steps in the "Running the Application on a Real Device" section?
                            https://mimecar.gitbooks.io/ubuntu-touch-programming-course/content/en/chapter-02.html

                            On the screen of Ubuntu devices you should get your phone.

                            1 Reply Last reply Reply Quote 0
                            • N Offline
                              Nithin
                              last edited by Nithin

                              Not yet I was still trying to run it on my desktop. When that didn't work i didn't try running it on my Phone. The "Running on your device" section comes after that.

                              1 Reply Last reply Reply Quote 0
                              • N Offline
                                Nithin
                                last edited by Nithin

                                Tried running it on the device. after activating developer mode, the SSH notification doesn't appear at all. Also i tried installing Ubuntu sdk again. At the step

                                sudo apt-get install ubuntu-sdk

                                i get the following error

                                The following packages have unmet dependencies:
                                ubuntu-sdk : Depends: ubuntu-sdk-libs-dev but it is not going to be installed
                                E: Unable to correct problems, you have held broken packages.

                                1 Reply Last reply Reply Quote 0
                                • N Offline
                                  Nithin
                                  last edited by

                                  Assuming Kubuntu being a possible cause for the problem, I decided to try it out on Kde Neon and Ubuntu. Kde Neon again seemed to have the same problem of not wanting to install dependencies. So then I Installed Ubuntu and tried the same on it. only to encounter some other errors, here are a few ones.

                                  during

                                  sudo lxd init
                                  in the question on default storage back-end to use, Ubuntu wouldn't take zfs for an option for some reason.
                                  so had to then use the command
                                  sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable
                                  this doesnt work either. instead one has to use
                                  sudo add-apt-repository ppa:ubuntu-lxc/stable

                                  After this there was no zfs option available at all.
                                  so had to use this

                                  sudo apt install -t xenial-backports lxd lxd-client

                                  after all of this i am back to the same problem which i faced in the first step.

                                  I am trying to follow the tutorial here and managed to install the new Ubuntu Sdk. When I run or build the app i get the following messages

                                  in Issues> error: There was a error in the device detection of desktop, no IP address was returned.
                                  in application output> Application failed to start: No private key file given.

                                  As a last step will try compiling the clock app as mentioned in the Readme.Developers.

                                  T 1 Reply Last reply Reply Quote 1
                                  • mimecarM Offline
                                    mimecar
                                    last edited by

                                    Good evening.

                                    I have uploaded the translation of the chapter "Formatting label and events". I'll upload the source code next week. I have another collaboration from Fulvio pending and I hope to upload it next week.
                                    https://mimecar.gitbooks.io/ubuntu-touch-programming-course/content/en/chapter-04-s03.html

                                    Pulsar33P 2 Replies Last reply Reply Quote 2
                                    • T Offline
                                      Talkless @Nithin
                                      last edited by Talkless

                                      @nithin said in Ubuntu Touch Programming Course:

                                      After this there was no zfs option available at all.
                                      so had to use this

                                      sudo apt install -t xenial-backports lxd lxd-client

                                      Thanks! Using lxd from xenial-backports helped to overcome that Creating the bridge failed with: not implemented issue.

                                      It would be nice to have this hint in Course.

                                      Volla Phone X

                                      1 Reply Last reply Reply Quote 0
                                      • Pulsar33P Offline
                                        Pulsar33 @mimecar
                                        last edited by

                                        @mimecar : following you.
                                        Thanks for your work !
                                        Pulsar33

                                        Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                        Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                        Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                        1 Reply Last reply Reply Quote 0
                                        • Pulsar33P Offline
                                          Pulsar33 @TischlerWilly
                                          last edited by Pulsar33

                                          @tischlerwilly @mimecar : Error No Storage Pool Found
                                          As said by tischlerwilly, I have the same error when installing the developper kits :

                                          No storage pool found
                                          I'm also using MINT 18(.3) 64bits. Did you find the solution, please ?
                                          Best regards
                                          Pulsar33

                                          Oooops ! See below ...

                                          Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                          Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                          Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                          1 Reply Last reply Reply Quote 0
                                          • Pulsar33P Offline
                                            Pulsar33
                                            last edited by

                                            @mimecar @HendriXXX @TischlerWilly :

                                            Hello,
                                            Sorry, I've discovered that when I search for something with CTRL-F in a long thread with Firefox, the process doesn't see all the content. So at the beginning of the thread, searching for "pool", I found only the posts of TischlerWilly and mimecar but no complete answer.
                                            This is why I thought there was no answer ...
                                            If I go at the end of the thread, I find the answers of HendriXXX and mimecar, so I'll give a try to the solution and report here how it goes.
                                            Have a nice day
                                            Pulsar33

                                            Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                            Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                            Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                            1 Reply Last reply Reply Quote 0
                                            • Pulsar33P Offline
                                              Pulsar33 @mimecar
                                              last edited by

                                              @mimecar said in Ubuntu Touch Programming Course:

                                              • sudo add-apt-repository ppa:ubuntu-lxc/lxd-stable

                                              This command returned an error. I tried this instead :

                                              • sudo add-apt-repository ppa:ubuntu-lxc/stable

                                              I hope it was the good choice. Next I followed the proposal of HendriXXX :

                                              • sudo chown lxd:lxd /var/lib/lxd/unix.socket

                                              All the process worked and my kits are created now.
                                              However, I didn't see the error "container is faulty"
                                              Proceeding to the next steps ...
                                              Best regards
                                              Pulsar33

                                              Aquaris BQ E5 HD UBports OTA-25 (currently testing features)
                                              Aquaris BQ E5 HD Ubuntu Edition Canonical OTA-15 (last Canonical version, daily use)
                                              Raspberry Pi 4 B - 4 GB & 8 GB with various OS and Desktops (UBports not OK)

                                              1 Reply Last reply Reply Quote 1
                                              • First post
                                                Last post