DaveDH
October 9th, 2007, 03:35 PM
When I move my laptop between work/home/work etc. I have to manually toggle the network proxy each time.
I wrote a script to do this and created an icon on the gnome panel to run it:
#!/bin/bash
# Toggle the status of the network proxy
if [ $(gconftool-2 -g /system/proxy/mode) = "none" ]; then
gconftool-2 -s -t string /system/proxy/mode auto
echo "Proxy is now AUTO"
else
gconftool-2 -s -t string /system/proxy/mode none
echo "Proxy is now OFF"
fi
exit 0
BUT, I would ideally like the icon to indicate the status of the proxy.
Is there any way from a script to change the icon that is shown on the panel?
I wrote a script to do this and created an icon on the gnome panel to run it:
#!/bin/bash
# Toggle the status of the network proxy
if [ $(gconftool-2 -g /system/proxy/mode) = "none" ]; then
gconftool-2 -s -t string /system/proxy/mode auto
echo "Proxy is now AUTO"
else
gconftool-2 -s -t string /system/proxy/mode none
echo "Proxy is now OFF"
fi
exit 0
BUT, I would ideally like the icon to indicate the status of the proxy.
Is there any way from a script to change the icon that is shown on the panel?