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

    UT device as web server

    Scheduled Pinned Locked Moved Support
    8 Posts 5 Posters 1.2k Views 2 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
        rpetya
        last edited by

        Got OpenHAB installed in libertine, on a Nexus5 running Ubuntu 16.04 (OTA-5).
        The service can be started in Terminal (web interface accessible from other device) but only as long as the Terminal app is in foreground. Once I switch to other apps on the Nexus, the process is stopped (resumable with fg in terminal).
        How to make a service in a libertine container start automatically and run in the background?

        ? advocatuxA D 3 Replies Last reply Reply Quote 1
        • ? Offline
          A Former User @rpetya
          last edited by

          What's the command to get a Libertine app running from the Terminal?

          1 Reply Last reply Reply Quote 0
          • R Offline
            rpetya
            last edited by

            In Terminal libertine-container-manager exec -c "/bin/bash" and then /etc/init.d/openhab2 start

            With OpenHAB there is an other method as well: libertine-container-manager exec -c "/usr/bin/openhab-cli start" which also starts the openhab console (does not return to prompt as above)

            1 Reply Last reply Reply Quote 0
            • advocatuxA Offline
              advocatux @rpetya
              last edited by

              How to make a service in a libertine container start automatically and run in the background?

              @rpetya I haven't tried it but maybe it's possible to do it with UT Tweak tool.

              PS Just in case you don't know it, nymea:app works great (https://open-store.io/app/io.guh.nymeaapp)

              1 Reply Last reply Reply Quote 0
              • D Offline
                doniks @rpetya
                last edited by

                @rpetya said in UT device as web server:

                automatically

                maybe an upstart job can work? like this https://github.com/ubports/ubuntu-touch/issues/226#issuecomment-326745911

                1 Reply Last reply Reply Quote 0
                • R Offline
                  rpetya
                  last edited by

                  Thanks for your tips!
                  If I enable Window Mode with the tweak tool, Terminal keeps running when I switch to Browser. Excellent!
                  Didn't figure out yet how to start the service on boot though...

                  dobeyD 1 Reply Last reply Reply Quote 0
                  • dobeyD Offline
                    dobey @rpetya
                    last edited by

                    @rpetya Is your goal for the device to use it as a phone, or are you just trying to use it more like a RPi to keep plugged in to power all the time and run some web server or such on the WiFi?

                    1 Reply Last reply Reply Quote 0
                    • R Offline
                      rpetya
                      last edited by

                      My goal is to use the phone as a server (a fancy RPi, yes). My current system is running on an old laptop and I was wondering if I could replace that with a Nexus (as it also runs Ubuntu). To my surprise it does a great job, sticked to the wall it makes a very (scratched, but) very cool thermostat. The only thing is, should the device reboot for whatever reason, someone must start apps and services manually.

                      1 Reply Last reply Reply Quote 0

                      Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                      Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                      With your input, this post could be even better 💗

                      Register Login
                      • First post
                        Last post