View Single Post
YoDude's Avatar
Posts: 2,869 | Thanked: 1,784 times | Joined on Feb 2007 @ Po' Bo'. PA
#113
Something broke!

I followed the instructions and everything went well... icon is present and when pushed window opens and closes. Tested it on 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?


Originally Posted by Bratag View Post
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
Code:
!/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 add the following to /etc/sudoers

Code:
user ALL = NOPASSWD: /opt/bin/boostfm.sh
Now create a file called BoostFM.desktop in /usr/share/applications/hildon which contains

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
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.
__________________

SLN member # 009