View Single Post
Estel's Avatar
Posts: 5,028 | Thanked: 8,613 times | Joined on Mar 2011
#17
Originally Posted by peterleinchen View Post
Just one question/remark:
why don't You put it directly in /usr/sbin/, as this script requires root privileges anyway?
Good point, I've moved it to '/usr/sbin/'
Ho ever, even there, it need cd /usr/sbin/ inside script to work via desktop shortcut.

And huge thanks for advice about line formatting - I wasn't able to figure it out, never thought about trying regular next line, instead of \n. It was somehow tricky job to format it properly using spaces - many variables here got different output length on different states, so many times everything "collapsed" on changes, until I've found correct number of spaces for every line. Thankfully, it's not needed now. I've also modified things related to "hidden line", because in "new line" approach, it was show as totally empty line, when it should be hidden at all.

BTW, does anyone know why script work from terminal/ShortcutD without cd'ing to /usr/sbin (outside or inside script), but does not when invoked from .desktop shortcut/QBW/DEW?

---

If someone got use for it, here's updated version - alongside .desktop file (that one was not changed) and with correct sudoers file, missing from last upload. Correct placement of files:
Code:
/usr/sbin/bnf.sh
/usr/share/applications/hildon/bnf.desktop
/etc/sudoers.d/bnf.sudoers
Attached Files
File Type: tar bnf.tar (10.0 KB, 94 views)
__________________
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:53.