← Back to team overview

ubuntu-phone team mailing list archive

Re: battery 83% to 0% in 1 hour of not using the BQ

 

On 05/05/15 09:31, Giovanni Meles wrote:
On 05/04/2015 09:13 PM, meles wrote:
>Hi Ed, How would you run a script like the one suggested below to even work when the screen is locked?
>>cheers
meles Am Mittwoch, den 29.04.2015, 22:08 +0200 schrieb Ed Kapitein:
>>On 04/29/15 20:30, Matthias Apitz wrote:
> Hello,
><SNIP><
>>Hi Meles,
> >If you run it in the background ( nohup /path/to/script & ) it will continue to >run, even when the screen is locked. I am happily surprised that a lot keeps >working with a locked screen and that battery life is as good as it is. You can >listen to music, login over wifi, run scripts etc. They did a great job on >getting the best performance on the lowest power budget possible.
>>Kind regards,
>Ed
>

Hi Ed,


I just tried the following command, but it doesn't execute in background:


nohub /bin/bash -c "sleep 20 && /usr/share/ofono/scripts/ipts/send-sms /ril_0 0123456789 \"test msg\" 0" &


i was starting it via the terminal app. Have you got any glue whats the problem?
Hi Giovanni,

Seems like a typo, nohub vs nohup.
( in my motherlanguage they sound the same :-) )
But i would suggest to create a small shell script like this:
----------------
#!/bin/bash

sleep 20
/usr/share/ofono/scripts/ipts/send-sms /ril_0 0123456789 "test msg" 0
----------------

And run that with nohup.
The \" and && can be confusing on a commandline.

Kind regards,
Ed



Greeting
meles









References