|
|
2010-08-16
, 07:19
|
|
Posts: 8 |
Thanked: 0 times |
Joined on Aug 2010
@ The Netherlands
|
#1
|
|
|
2010-08-16
, 07:27
|
|
Posts: 1,751 |
Thanked: 844 times |
Joined on Feb 2010
@ Sweden
|
#2
|
|
|
2010-08-16
, 07:27
|
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#3
|
|
|
2010-08-16
, 08:39
|
|
Posts: 8 |
Thanked: 0 times |
Joined on Aug 2010
@ The Netherlands
|
#4
|
|
|
2010-08-16
, 08:44
|
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#5
|
|
|
2010-08-16
, 08:50
|
|
Posts: 8 |
Thanked: 0 times |
Joined on Aug 2010
@ The Netherlands
|
#6
|
|
|
2010-08-16
, 09:04
|
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#7
|
#!/bin/sh # Description: Turn WiFi on/off # Original script from http://wiki.maemo.org/Desktop_Command_Execution_Widget_scripts # Modified by 9000 @ talk.maemo.org on 27/6/2010 # out=`ifconfig wlan0` if [ $? -eq "0" ] ; then if [ `echo "$out" | grep -c RUNNING` -gt "0" ] ; then run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true fi ifconfig wlan0 down rmmod wl12xx rmmod mac80211 rmmod crc7 stop wlancond run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Wi-Fi Disabled' exit 2 else modprobe crc7 modprobe mac80211 modprobe wl12xx wl1251-cal stop wlancond start wlancond iwconfig wlan0 mode managed ifconfig wlan0 up run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Wi-Fi Enabled' exit 0 fi
chmod u+x /home/user/wifi.sh
echo "/home/user/wifi.sh" | sudo gainroot
|
|
2010-08-18
, 13:04
|
|
Posts: 8 |
Thanked: 0 times |
Joined on Aug 2010
@ The Netherlands
|
#8
|
|
|
2010-10-06
, 08:01
|
|
|
Posts: 165 |
Thanked: 18 times |
Joined on Jun 2010
|
#9
|
Save the following script as wifi.sh
Make it executable:Code:#!/bin/sh # Description: Turn WiFi on/off # Original script from http://wiki.maemo.org/Desktop_Command_Execution_Widget_scripts # Modified by 9000 @ talk.maemo.org on 27/6/2010 # out=`ifconfig wlan0` if [ $? -eq "0" ] ; then if [ `echo "$out" | grep -c RUNNING` -gt "0" ] ; then run-standalone.sh dbus-send --system --dest=com.nokia.icd /com/nokia/icd_ui com.nokia.icd_ui.disconnect boolean:true fi ifconfig wlan0 down rmmod wl12xx rmmod mac80211 rmmod crc7 stop wlancond run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Wi-Fi Disabled' exit 2 else modprobe crc7 modprobe mac80211 modprobe wl12xx wl1251-cal stop wlancond start wlancond iwconfig wlan0 mode managed ifconfig wlan0 up run-standalone.sh dbus-send --system --type=method_call --dest=com.nokia.icd_ui /com/nokia/icd_ui com.nokia.icd_ui.show_conn_dlg boolean:false run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteInfoprint string:'Wi-Fi Enabled' exit 0 fi
Execute it:Code:chmod u+x /home/user/wifi.sh
Code:echo "/home/user/wifi.sh" | sudo gainroot
|
|
2010-10-06
, 08:29
|
|
Posts: 1,425 |
Thanked: 983 times |
Joined on May 2010
@ Hong Kong
|
#10
|