![]() |
2010-01-04
, 21:44
|
Posts: 2,014 |
Thanked: 1,581 times |
Joined on Sep 2009
|
#112
|
If i use your Solution i get an xterm where i have to type in a Password.
So i just replaced the Exec-Line to "Exec= /usr/bin/sudo /usr/local/bin/boostfm.sh"
The only problem is that it starts a window with nothing in it and just the name BoostFM. If i switch to the Desktop it is gone and worked.
Don't know how to fix this problem.
greetings
Christopher
![]() |
2010-01-04
, 23:05
|
|
Posts: 2,869 |
Thanked: 1,784 times |
Joined on Feb 2007
@ Po' Bo'. PA
|
#113
|
Messed around with the scripts a little and came up with some stuff that doesn't require any outside apps etc to work.
Edit a file called /opt/bin/boostfm.sh
Now add the following to /etc/sudoersCode:!/bin/sh STATE=`fmtx_client | grep state | cut -d '=' -f2` if [ "disabled" = ${STATE} ] then echo "Turning on FM transmitter" fmtx_client -p1 else echo "Turning off FM transmitter" fmtx_client -p0 fi /bin/echo 118 > /sys/class/i2c-adapter/i2c-2/2-0063/power_level exit 0
Now create a file called BoostFM.desktop in /usr/share/applications/hildon which containsCode:user ALL = NOPASSWD: /opt/bin/boostfm.sh
This will open up an xterm, run the script and then close the xterm. It checks to see if the transmitter is on and will turn it off if it is. I used a standard system icon for the icon in the desktop file. All you need to now is put it as a shortcut on your desktop and its one tap on and off.Code:[Desktop Entry] Version=0.1 Type=Application Name=BoostFM Exec=osso-xterm 'sudo /opt/bin/boostfm.sh' Icon=general_fm_transmitter X-Windows-Icon= X-HildonDesk-ShowInToolbar=false X-Osso-Type=application/x-executable
![]() |
2010-01-04
, 23:08
|
|
Posts: 670 |
Thanked: 359 times |
Joined on May 2007
|
#114
|
![]() |
2010-01-04
, 23:10
|
|
Posts: 4,274 |
Thanked: 5,358 times |
Joined on Sep 2007
@ Looking at y'all and sighing
|
#115
|
Something broke!
I followed the instructions and everything went well... icon is present and when pushed window opens and closes. Tested it about:blankon the radio and it rocks!
I came back in to write this post and went to terminal to see what level it reports and couldn't gain root.
xTerm reports:
sudoers file: syntax error, line 75 <<<
sudo: parse error in etc/sudoers near line 75
Now Applications Manager reports "operation failed" and shows no catalogues installed.
Media player does not show any songs and will not close.
I would hate to reflash. Is there anything I can try?
The Following 7 Users Say Thank You to qwerty12 For This Useful Post: | ||
![]() |
2010-01-04
, 23:16
|
Posts: 152 |
Thanked: 41 times |
Joined on Dec 2009
@ Sydney
|
#116
|
For future reference: Use visudo instead of editing sudoers directly. visudo tells you if a line will **** up the entire sudo system when exiting the editor.
![]() |
2010-01-04
, 23:38
|
|
Posts: 2,869 |
Thanked: 1,784 times |
Joined on Feb 2007
@ Po' Bo'. PA
|
#117
|
EXACTLY!!
I was going to write that as I was reading through the last few [new] pages as alot of people are suggesting editing the file directly.
But now someone has made a good example of themselves for the benefit of the community.
Thanks YoDude
![]() |
2010-01-04
, 23:52
|
Posts: 2,014 |
Thanked: 1,581 times |
Joined on Sep 2009
|
#118
|
![]() |
2010-01-05
, 00:36
|
|
Posts: 2,869 |
Thanked: 1,784 times |
Joined on Feb 2007
@ Po' Bo'. PA
|
#119
|
I suspect people cut and paste the line and ended up with a blank line in their sudoers file. Sorry but the code tags seem to add a blank line wether I want it or not.
Agree with visudo comment. I actually used that myself guess I should have specified that. This is why I suck at writing docs
![]() |
2010-01-05
, 04:00
|
Posts: 474 |
Thanked: 283 times |
Joined on Oct 2009
@ Oxford, UK
|
#120
|
1187.5bps is, what, over 100 chars per second? so you could change the 8char field over 10 times per second? Sounds plenty fast to me.
The Following User Says Thank You to jjx For This Useful Post: | ||
So i just replaced the Exec-Line to "Exec= /usr/bin/sudo /usr/local/bin/boostfm.sh"
The only problem is that it starts a window with nothing in it and just the name BoostFM. If i switch to the Desktop it is gone and worked.
Don't know how to fix this problem.
greetings
Christopher