Folks,

  My schools use LTSP, with a wwwoffle offline web cache.

  I need to set up proxies and a default home page for all learners.

  This is a script I use for changing those settings on all
  mozilla-ish browsers.

Cheers,   Andy!

#! /bin/bash
# sed script for fixing disk cache, proxies, homepage
# Andy Rabagliati - http://wizzy.org.za/

PROXYHOST=_WIZZY_HOSTNAME_.wizzy.org.za
HOMEPAGE=http://_WIZZY_HOSTNAME_.wizzy.org.za/

for f in /usr/lib/*/defaults/pref/all.js /usr/lib/*/program/defaults/pref/all.js
do
        sed -e 
's%^.*"browser.cache.enable".*%pref("browser.cache.enable",false);//WIZZY%' \
            -e 's%^.*"network.proxy.type".*%pref("network.proxy.type",1);//WIZZY%' \
            -e 
's%^.*"network.proxy.ftp".*%pref("network.proxy.ftp","'$PROXYHOST'");//WIZZY%' \
            -e 
's%^.*"network.proxy.ftp_port".*%pref("network.proxy.ftp_port",8080);//WIZZY%' \
            -e 
's%^.*"network.proxy.http".*%pref("network.proxy.http","'$PROXYHOST'")//WIZZY;%' \
            -e 
's%^.*"network.proxy.http_port".*%pref("network.proxy.http_port",8080);//WIZZY%' \
            -e 
's%^.*"network.proxy.ssl".*%pref("network.proxy.ssl","'$PROXYHOST'");//WIZZY%' \
            -e 
's%^.*"network.proxy.ssl_port".*%pref("network.proxy.ssl_port",8080);//WIZZY%' \
            -e 's%^.*"general.config.filename".*%%' \
            -e '$apref("general.config.filename","mozilla.cfg");//WIZZY' < $f 
>/tmp/all.js
        mv /tmp/all.js $f
done

for f in /usr/lib/*/defaults/autoconfig/prefcalls.js
do
        sed -e 's%^.*"browser.startup.homepage".*%%' \
            -e '$alockPref("browser.startup.homepage","'$HOMEPAGE'");//WIZZY' \
                < $f > /tmp/prefcalls.js
        mv /tmp/prefcalls.js $f
        touch ${f%/defaults/autoconfig/prefcalls.js}/mozilla.cfg
done


-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the one
installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_____________________________________________________________________
Ltsp-discuss mailing list.   To un-subscribe, or change prefs, goto:
      https://lists.sourceforge.net/lists/listinfo/ltsp-discuss
For additional LTSP help,   try #ltsp channel on irc.freenode.net

Reply via email to