Reply
Thread Tools
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#821
Originally Posted by thedead1440 View Post
as root ofcourse:

Code:
/sbin/stop bme
/sbin/start bme

Edit:

the command by kkarioja should work too; give it a try

Code:
/sbin/initctl restart bme
Oh.. The last command very useful, thanks. Will be added to the N9QT
 
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#822
Originally Posted by Schturman View Post
Oh.. The last command very useful, thanks. Will be added to the N9QT
Maybe you can test it too first?

Also if you add it i think it would be best to come as an icon like the N9QRefresh icon so you click and it does magic

Last edited by thedead1440; 2012-10-21 at 08:27. Reason: s/an/and
 
Posts: 233 | Thanked: 491 times | Joined on Oct 2011 @ Sydney
#823
Originally Posted by ajalkane View Post
ProfileMatic runs as user. So if you need some custom action to run as "root", you'll need to figure out how to invoke the command from script using "devel-su". I seem to remember it's possible, but I don't remember the details.
You can create a script eg. execasroot.sh
in that file you will have
#!/bin/sh

echo rootpassword | devel-su -c command
Now in profileMatic run the custom action linking to this created script I use this method flawlessly.

Of course, if you replace command for "sh /path/of/file.sh" you can create a script that will run various commands all under root.
__________________
Blogs I post to
MyNokiaBlog
UnleashThePhones

Hit thanks if I have helped in some way, or you agree with me

Twitter
-------------------------------------------------------------------------------
Battery Widget
#OperationUnicorn
Harmoji - Emoji for Harmattan

-------------------------------------------------------------------------------
N9 [Black] - Sailfish OS (1.x.x.xx)
N9 [White] - PR 1.3 [Stock]
N950 - Sailfish OS
Z10 LE - 10.2.1.1055
Dev Alpha C - 10.2.1.1055

Last edited by MFaroTusino; 2012-10-21 at 10:03.
 

The Following 2 Users Say Thank You to MFaroTusino For This Useful Post:
Schturman's Avatar
Posts: 5,339 | Thanked: 4,133 times | Joined on Jan 2010 @ Israel
#824
i Tested the first two commands too it's also work, but the second one is one line command
I Can add it to the different button, but i think it to much and not necessary.. I just will add it to refresh button, like third option + to F for full refresh
 

The Following User Says Thank You to Schturman For This Useful Post:
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#825
I succesfully solved the sudden battery drop with this piece of script:
Code:
#!/bin/sh

echo rootme | devel-su -c "/sbin/stop bme"
sleep 10;
echo rootme | devel-su -c "/sbin/start bme"

exit 0;
But now how to run this when the drop occurs? There is no battery percentage check in ProfileMatic.

Any chance getting it there?
Since this only works when the drop is in effect, does nothing if you run it before the drop occurs.

I also tested the restart bme and that did not seem to work.
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 

The Following 6 Users Say Thank You to rooster13 For This Useful Post:
Posts: 1,313 | Thanked: 2,978 times | Joined on Jun 2011 @ Finland
#826
Originally Posted by rooster13 View Post
I succesfully solved the sudden battery drop with this piece of script:
Code:
#!/bin/sh

echo rootme | devel-su -c "/sbin/stop bme"
sleep 10;
echo rootme | devel-su -c "/sbin/start bme"

exit 0;
But now how to run this when the drop occurs? There is no battery percentage check in ProfileMatic.

Any chance getting it there?
Since this only works when the drop is in effect, does nothing if you run it before the drop occurs.

I also tested the restart bme and that did not seem to work.
That's a good reason to add battery level condition to ProfileMatic. I'll look into it.
__________________
My N9/N950 projects:
 

The Following 3 Users Say Thank You to ajalkane For This Useful Post:
rooster13's Avatar
Posts: 319 | Thanked: 221 times | Joined on Jan 2010 @ Finland
#827
Originally Posted by ajalkane View Post
That's a good reason to add battery level condition to ProfileMatic. I'll look into it.
Kiitos ajalkane!
__________________
Sail Raid, an old skool shoot'em up for Jolla
KillDroid, Android service killer for Jolla
goViihde, an Elisa Viihde client for Jolla
goViihde, an Elisa Viihde client for N9
Shortcut Stash Home Screen Widget
 
Posts: 1,313 | Thanked: 2,978 times | Joined on Jun 2011 @ Finland
#828
About the Bluetooth condition... I'm sorry, but it's not happening, at least not done by me. The APIs just do not work for what I'm trying to do, and I've been resorting to using D-Bus to do what is needed. Now I again hit an issue with the APIs not working, and I can't find the motivation to try figuring out the D-Bus APIs to get it working especially as I have no use for the feature myself.

Frankly it's starting to feel too much like work, and that's not a good thing for something I do in my free time without being paid. I think it's best that I do not burn-out myself on this project. It'd be better if someone who has use for this feature implemented it so that there's motivation to it and also it'd be just like wanted.

So, if anyones willing to implement the Bluetooth connection, I can put the work I've already done somewhere up for download (power of open source). The code I have is a bit like sketches and trying out what works and what not, so it's still a long way for getting it finished. But the basic detection of Bluetooth connections works.

Sorry about this...
__________________
My N9/N950 projects:
 

The Following 3 Users Say Thank You to ajalkane For This Useful Post:
Moderator | Posts: 6,215 | Thanked: 6,400 times | Joined on Nov 2011
#829
One thing that just occurred to me (ya slow!) was that with profilematic one should be able to keep his files on device in sync with his pc/cloud/etc while asleep using charging and Wlan conditions...

Has anyone made any script for it thus far?

Over the weekend I'll try my hands at a script for ftp upload and report if anyone else is interested


Edit: A simple google search gave out many scripts for ftp upload...Will set-up for tonight...Let's see how it works out...

Last edited by thedead1440; 2012-10-25 at 03:20.
 
Posts: 30 | Thanked: 25 times | Joined on Jul 2012
#830
How about a possibility to make rule to repeat e.g. every hour or so? With this background trick I talked about earlier (still seems to work btw) I have to make something like 10 rules for one purpose.

Just for usability a rule like "do this at 9.00, repeat every hour until 19.00" it could be nice. Especially when making changes to this kind of activities.

Could it even be useful with this cloud update thedead just mentioned?
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 05:06.