![]() |
ubuntu.com - launchpad.net - ubuntu help
|
|
|||||||
Ubuntu 9.10 is out!!!
When downloading Ubuntu 9.10 please consider using bittorrent to get your copy of Ubuntu. The Ubuntu Developers Summit for Lucid Lynx will be held the week of 16-Nov-2009 till 20-Nov-2009 in Dallas, TX USA. Visit the the Ubuntu wiki for more information about UDS and how to participate remotely. |
|
Tutorials & Tips The place to find Ubuntu related Tips & Tricks. |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Gee! These Aren't Roasted!
![]() |
HowTo: Wireless Radio Software Switch
[EDIT:] This thread was renamed as the problem is solved and now it's kind of a HowTo.
-------------------------------------------------------------------------------------- Hi, I want to enable and disable my wireless card using the wlan switch. So I wrote a script that needs root privileges as it needs write access to a sysfs file. For those interested, here's the script: Code:
#!/bin/bash
# this is the script /usr/local/bin/3945-toggle-state
STATE=$(cat /sys/bus/pci/drivers/ipw3945/*/rf_kill)
if [ "$STATE" == 1 ]
then
echo 0 > /sys/bus/pci/drivers/ipw3945/*/rf_kill
else
echo 1 > /sys/bus/pci/drivers/ipw3945/*/rf_kill
fi
exit 0
Code:
me ALL=NOPASSWD: /usr/local/bin/3945-toggle-state Code:
(xbindkey '("m:0x0" "c:149") "sudo /usr/local/bin/3945-toggle-state")
[EDIT:] I guess I just stared too long at the screen... There was an error in the path. I corrected this now, so you can use it as a HowTo Last edited by elektronaut; December 6th, 2006 at 07:51 AM.. |
|
|
|
|
|
#2 |
|
Gee! These Aren't Roasted!
![]() |
Re: HowTo: Wireless Radio Software Switch
One thing still puzzles me: I have this in /etc/rc.local:
Code:
setkeycodes e055 213 Code:
(xbindkey '("m:0x0" "c:118") "sudo /usr/local/bin/3945-toggle-state")
__________________
Last edited by John.Michael.Kane; December 3rd, 2006 at 10:00 AM.. |
|
|
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|