UT device as web server
-
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 withfg
in terminal).
How to make a service in a libertine container start automatically and run in the background? -
What's the command to get a Libertine app running from the Terminal?
-
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) -
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)
-
@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
-
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... -
@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?
-
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.