LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-02-2008, 10:35 AM   #1
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 469

Rep: Reputation: 31
Question Setting Firefox, Gnome, and other application proxy globally


My service provider has just decreased the bandwidth allowance and for our troubles increased costs.

Until I get a better provider I'm trying to push all web traffic in the house through a single proxy server.

I know about /etc/profile.d for setting the http_proxy and ftp_proxy variables. Is there a way to globally set firefox, and gnome proxy? (Especially for new user accounts in the future)
 
Old 04-02-2008, 02:00 PM   #2
MikeyCarter
Member
 
Registered: Feb 2003
Location: Orangeville
Distribution: Fedora
Posts: 469

Original Poster
Rep: Reputation: 31
Talking

Well I managed to find gnome.
Code:
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=bool   --set /system/gnome-vfs/use-http-proxy "TRUE"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=string --set /system/gnome-vfs/http-proxy-host "firefly"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=int    --set /system/gnome-vfs/http-proxy-port "3128"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=string --set /system/proxy/mode "manual"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=bool   --set /system/http_proxy/use_same_proxy "TRUE"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=bool   --set /system/http_proxy/use_http_proxy "TRUE"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=string --set /system/http_proxy/host "firefly"
gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.mandatory --type=int    --set /system/http_proxy/port "3128"

for x in /home/*/.gconf; do
  if [ "$x" != "/home/*/.gconf" ] ; then
    gconftool-2 --direct --config-source xml:readwrite:$x --type=bool   --set /system/gnome-vfs/use-http-proxy "TRUE"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=string --set /system/gnome-vfs/http-proxy-host "firefly"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=int    --set /system/gnome-vfs/http-proxy-port "3128"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=string --set /system/proxy/mode "manual"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=bool   --set /system/http_proxy/use_same_proxy "TRUE"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=bool   --set /system/http_proxy/use_http_proxy "TRUE"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=string --set /system/http_proxy/host "firefly"
    gconftool-2 --direct --config-source xml:readwrite:$x --type=int    --set /system/http_proxy/port "3128"
  fi
done
pkill gconfd
Setting firefox, and other mozilla:
Code:
for x in `find /home/*/.[a-Z0-9]* -name prefs.js 2>/dev/null` \
         `find /usr/lib/firefox* -name prefs.js 2>/dev/null`  \
         `find /usr/lib/thunder* -name prefs.js 2>/dev/null`; do
  if [ "$x" != "" ] ; then
    echo "Found: $x"

    sed -ri "/user_pref\(\"network.proxy.share_proxy_settings\"(.*)$/d" $x
    sed -ri "/user_pref\(\"network.proxy.http\"(.*)$/d" $x
    sed -ri "/user_pref\(\"network.proxy.http_port\"(.*)$/d" $x
    sed -ri "/user_pref\(\"network.proxy.type\"(.*)$/d" $x

    echo "user_pref(\"network.proxy.share_proxy_settings\", \"true\");
user_pref(\"network.proxy.http\", \"firefly\");
user_pref(\"network.proxy.http_port\", 3128);
user_pref(\"network.proxy.type\", 1);" >> $x

  fi
done
Also found some rc files:
Code:
sed -ri "s/[#]?(ftp|http)_proxy(.*)$/\1_proxy=http:\/\/firefly:3128/g" /etc/*rc
Still searching for kde and other wm....
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
setting maximum password age globally??? mlu Linux - Security 1 05-08-2005 06:38 AM
Firefox with Proxy setting wardialer Linux - Newbie 2 11-14-2004 08:49 PM
How to install Firefox 9.1 Globally? rignes Linux - Software 8 07-25-2004 12:36 AM
Setting proxy exceptions in Gnome 2.4 Wapo Linux - Networking 0 03-31-2004 09:32 AM
setting env variables globally raven Linux - General 6 02-21-2003 08:04 AM


All times are GMT -5. The time now is 05:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration