Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 184

Warning: mysql_query(): A link to the server could not be established in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 184

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 185

Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 198

Warning: mysql_query(): A link to the server could not be established in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 198

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 199

Warning: session_start(): Cannot send session cookie - headers already sent by (output started at /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php:184) in /home/nokin900/public_html/wp-content/plugins/wp-google-plus-connect/functions.php on line 84

Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php:184) in /home/nokin900/public_html/wp-content/plugins/wp-google-plus-connect/functions.php on line 84

Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 184

Warning: mysql_query(): A link to the server could not be established in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 184

Warning: mysql_num_rows() expects parameter 1 to be resource, boolean given in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 185

Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 974

Warning: mysql_query(): A link to the server could not be established in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 974

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 975

Warning: mysql_query(): Access denied for user 'root'@'localhost' (using password: NO) in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 990

Warning: mysql_query(): A link to the server could not be established in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 990

Warning: mysql_fetch_assoc() expects parameter 1 to be resource, boolean given in /home/nokin900/public_html/wp-content/plugins/maxblogpress-ninja-affiliate/ninja-affiliate-library/include/mbp-ninja-affiliate.cls.php on line 991
[How-To] Save up battery by taking down WiFi | Nokia N900 Blog | Apps | Games | Themes | Wallpapers | Hacks

Home » Featured, Hacks

[How-To] Save up battery by taking down WiFi

3 February 2012Entry by

If you’re interested in saving up battery, here’s a little how-to on adding a desktop-cmd-exec button that will enable/disable WiFi completely upon being pressed.

First, get desktop command execution widget, if you don’t have it already:

sudo gainroot

apt-get install desktop-cmd-exec

Next you would want to get an enable/disable script. For your convenience, I’ve uploaded it to Pastebin: http://pastebin.com/3ZHx11GZ

Copy the script and save it as wifi.sh in your home directory. Make it executable:

chmod +x wifi.sh

Now, to add the button. Switch to a desktop where you wish to place it, go to edit mode (long tap on the screen or tap on an empty space and tap the gear button that appears on top). Add Desktop Command Execution Widget from the menu, and click the wrench on the widget that appeared. Select the “Add cmd” option on the right. Name the command “Enable/Disable WiFi” or however you’d like, in command put this:

echo “/home/user/wifi.sh” | sudo gainroot | echo “”

Add the command, you’ll be kicked back to the edit mode, so press the wrench again. You’ll see that the new command was already chosen (if it is not, chose it), so you need just to adjust a few options, check the “Update on click” option and uncheck “Update on boot” and “Update on desktop change” buttons. Ta-da! Now you have a button to completely disable the WiFi when you don’t need it and enable it on need, which will save up quite some battery charge.

____________________________________________________

Of course, you can utilize the script otherwise, like adding an Alarmed job to disable/enable wifi on certain times.

Comments:


Leave your response!

Add your comment below, or trackback from your own site. You can also subscribe to these comments via RSS.

Be nice. Keep it clean. Stay on topic. No spam.

You can use these tags:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

This is a Gravatar-enabled weblog. To get your own globally-recognized-avatar, please register at Gravatar.

Invalid code.