Thread
:
[Solved]dbus-send --type=method_call --dest=org.freedesktop.Notifications - problem with root privileges
View Single Post
Estel
2011-09-11 , 15:55
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#
15
Thanks, cd'ing inside script solved it!
there is one thing I don't understand, ho ever. Given the fact, that you point is true (it seems that i2cget wasn't called properly from script, when invoked from .desktop file with sudo), why it worked via:
Code:
osso-xterm -e "sudo bnf.sh"
...ShortcutD, or from terminal? everything without cd'ing?
Anyway, enormous thank You and MAG for solving this issue, it was making me scratch my head for a long time. I think it's time to get to work on some scripts
// Edit
If someone think it may be useful, here is "final" version of little script from this thread, alongside correct .desktop file. It shows most important bq27200 info at a glance, and hide/show part of them depending on state (i.e. charger type is irrelevant, if You have no charger/USB cable connected at all).
This one got issue solved + should have correct permission set. As I've said, I use mainly to check battery usage (current now) of fullscreen programs (notification pop-up goes through fullscreen without problem, without pushing you to task manager), or other things that can't be properly checked via 'bq27200.sh 5' running in background, or going to terminal and executing bq27200.sh itself.
It was also only one method I'm aware of, that allowed me to check current of 'echo mem >/sys/power/state', other than checking available mAh, getting it into sleep for an hour, checking mAh after that, and calculating (current we get via i2cget is average from 5 seconds, but it's updated inside fuel gauge in certain intervals - so, getting into hardest power saving state for a while, then getting out of it and executing this pop-up script fast enough, gives You current from 5 seconds inside hardest sleep state).
/Estel
(Actual version is here:
http://talk.maemo.org/showpost.php?p...3&postcount=17
)
__________________
N900's aluminum backcover / body replacement
-
N900's HDMI-Out
-
Camera cover
MOD
-
Measure battery's real capacity on-device
-
TrueCrypt 7.1
|
ereswap
|
bnf
-
Hardware's mods research is costly. To support my work, please consider donating. Thank You!
Last edited by Estel; 2011-09-11 at
19:51
.
Quote & Reply
|
The Following User Says Thank You to Estel For This Useful Post:
peterleinchen
Estel
View Public Profile
Send a private message to Estel
Find all posts by Estel