View Single Post
No!No!No!Yes!'s Avatar
Posts: 700 | Thanked: 846 times | Joined on Nov 2009
#102
Originally Posted by SallyJane View Post
I'm trying to create a 2G/3G toggle widget.

When I copy and paste the (rather long) 2g3g.sh script from here

http://wiki.maemo.org/Desktop_Comman...cripts#2G.2F3G

into the Command field of the AddCmd settings, all that is entered is the first line of the script

*!/bin/sh
You cannot paste it directly into QBW.
You need to connect to X-Terminal for that and then...:
Code:
 ~ $
cd /home/user
cat > 2g3g.sh
<here you paste the script>
#!/bin/sh
if [ `dbus-send --system --type=method_call --print-reply --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.get_selected_radio_access_technology | awk '/b/ {print $2}'` -eq 1 ]; then
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:2
else
dbus-send --system --type=method_call --dest=com.nokia.phone.net /com/nokia/phone/net Phone.Net.set_selected_radio_access_technology byte:1
fi

<then you press CTRL-D and you get the prompt again>

~ $ chmod 755 2g3g.sh
Now you can "AddCmd": /home/user/2g3g.sh

... and see what happens.
__________________
Have a look at Queen BeeCon Widget (WIKI) Customizable and flexible widget-based multi-instance monitoring, alerting and interactive tool for the N900
Please provide comments and feedback for having QBW supported and enhanced further - (DONATE) - v1.3.3devel / v1.3.3testing / v1.3.3extras
 

The Following User Says Thank You to No!No!No!Yes! For This Useful Post: