Update: partially working via run-standalone.sh See ps
I live in a area with free wifi provided by none other than google and ruckus. However some zones have very sparse coverage.
I've come up with some solutions.
Here's a script i've been working on to send a popup (toaster) notification to the user that there is a open access point available.
Right now currently it doesn't work. (Need some help changing that)
What does work
- Queen Beecon does tell me that the command has been interpreted.
- The base command is interpreted correctly and returns desired results.
What doesn't work
Everything else.
Here's two versions of the current script i've come up with so far.
The first version
Code:
while true ; do sudo iwlist scan | grep "key:off" && dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Open networks are available" uint32:0 string:"OK" ; sleep 120 ; done
The second version
Code:
while sleep 120 ; do sudo iwlist scan | grep "key:off" && dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Open networks are available" uint32:0 string:"OK" ; done
The two above with sudo ifconfig up
The first version
Code:
while true ; do sudo ifconfig wlan0 up && sudo iwlist scan | grep "key:off" && dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Open networks are available" uint32:0 string:"OK" ; sleep 120 ; done
The second version
Code:
while sleep 120 ; do sudo ifconfig wlan0 up && sudo iwlist scan | grep "key:off" && dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Open networks are available" uint32:0 string:"OK" ; done
Would also love to expand on this idea further and link the notification to the connection dialog as well. And LED alert. Any thoughts on how to do that would be great.
Thanks in advance !
MDX
Update Dec: 31 the following works, however the dialog does steal focus
Done with root
Code:
while true ; do iwlist scan | grep "key:off" && run-standalone.sh dbus-send --type=method_call --dest=org.freedesktop.Notifications /org/freedesktop/Notifications org.freedesktop.Notifications.SystemNoteDialog string:"Open networks are available" uint32:0 string:"OK" ; sleep 2000 ; done
See ps
I live in a area with free wifi provided by none other than google and ruckus. However some zones have very sparse coverage.
I've come up with some solutions.
Here's a script i've been working on to send a popup (toaster) notification to the user that there is a open access point available.
Right now currently it doesn't work. (Need some help changing that)
What does work
- Queen Beecon does tell me that the command has been interpreted.
- The base command is interpreted correctly and returns desired results.
What doesn't work
Everything else.
Here's two versions of the current script i've come up with so far.
The first version
The first version
Thanks in advance !
MDX
Update Dec: 31 the following works, however the dialog does steal focus
Done with root
Last edited by mmaadx; 2011-12-31 at 17:30.