a simple script to detect proxy and export http_proxy, it can be used by root when the gnome desktop is running (I know the w|grep is not beauty but it's the only way I found at the moment)
---------------------- #!/bin/bash
U=`w|grep x-session-manag| awk '{print $1}'`
if `su $U -c 'gconftool -g /system/http_proxy/use_http_proxy'`; then HOST=`su $U -c 'gconftool -g /system/http_proxy/host'` PORT=`su $U -c 'gconftool -g /system/http_proxy/port'` USER="" PASS=""
if `su $U -c 'gconftool -g /system/http_proxy/use_authentication'`; then USER=`su $U -c 'gconftool -g /system/http_proxy/authentication_user'` PASS=`su $U -c 'gconftool -g /system/http_proxy/authentication_password'` fi
export http_proxy="http://$USER:$PASS@$HOST:$PORT" fi ----------------------
a simple script to detect proxy and export http_proxy, it can be used by root
when the gnome desktop is running (I know the w|grep is not beauty but it's the
only way I found at the moment)
------- ------- ------- -
#!/bin/bash
U=`w|grep x-session-manag| awk '{print $1}'`
if `su $U -c 'gconftool -g /system/ http_proxy/ use_http_ proxy'` ; then http_proxy/ host'` http_proxy/ port'`
HOST=`su $U -c 'gconftool -g /system/
PORT=`su $U -c 'gconftool -g /system/
USER=""
PASS=""
if `su $U -c 'gconftool -g /system/ http_proxy/ use_authenticat ion'`; then
USER= `su $U -c 'gconftool -g http_proxy/ authentication_ user'`
PASS= `su $U -c 'gconftool -g http_proxy/ authentication_ password' `
/system/
/system/
fi
export http_proxy="http:// $USER:$ PASS@$HOST:$PORT" ------- ------- -
fi
-------