You are not logged in.

#26 2008-07-31 11:25:41

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

Aha, seems the icons moved. Open the script and go to the line where SOURCEBASE is defined. Replace "lxr" with "mxr", so that it reads http://mxr.mozilla.org/seamonkey/source instead of http://lxr.mozilla.org/seamonkey/source

Offline

#27 2008-07-31 12:48:59

coutinho
Member
Registered: 2008-07-20
Posts: 4

Re: firebrand - a script to brand firefox without recompiling

wget would follow the redirection. Why not use it instead of curl?
Just thinking...

Offline

#28 2008-07-31 13:50:28

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

Just add the -L option to curl and it would do the same.

Offline

#29 2008-07-31 14:02:19

coutinho
Member
Registered: 2008-07-20
Posts: 4

Re: firebrand - a script to brand firefox without recompiling

Thats nice!
Thanks

Offline

#30 2008-07-31 15:19:51

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: firebrand - a script to brand firefox without recompiling

Why use curl to begin with? wget is installed by default, curl is not.

Offline

#31 2008-07-31 15:46:30

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

Don't remember really - I believe I started using curl instead of wget since I liked the output from curl better (stdout, stderr, error messages and so on).

Offline

#32 2008-07-31 16:12:37

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: firebrand - a script to brand firefox without recompiling

Might be better for this script to use wget though. Same functionality for this use, but less deps.

Offline

#33 2008-07-31 17:57:49

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

Feel free to replace it.

Offline

#34 2008-07-31 21:33:47

Daenyth
Forum Fellow
From: Boston, MA
Registered: 2008-02-24
Posts: 1,244

Re: firebrand - a script to brand firefox without recompiling

Oh, I also wanted to note that your script it set for #!/bin/sh, but you use bash syntax. If a user has a non-bash shell for sh, it will break.

Offline

#35 2008-07-31 22:47:13

tofu
Member
Registered: 2008-02-26
Posts: 42

Re: firebrand - a script to brand firefox without recompiling

Thank you. Its nice to see the Firefox logo. The script works!

Offline

#36 2008-11-23 23:46:19

ozar
Member
From: USA
Registered: 2005-02-18
Posts: 1,686

Re: firebrand - a script to brand firefox without recompiling

Here's an updated version of the firebrand script for anyone that might be interested:

#!/bin/sh
#
# firebrand - a script to brand firefox without recompilation
#
#
# This script replaces and changes (a few) files in an existing firefox 
# installation. Run it after a firefox installation or upgrade, and restart 
# firefox. The program icon may not be (visibly) replaced until your desktop 
# environment is restarted.
#
# To revert to the original brand, simply reinstall firefox.
#
# Dependencies: curl, zip, unzip, imagemagick
#

#FIREFOXDIR: Where firefox's data files resides.

# Gran Paradiso:
FIREFOXDIR=/usr/lib/firefox-3.0
FIREFOXSTRING="Gran Paradiso"
FIREFOXSTRINGPREFS="GranParadiso"

NEWICONSDIR=""                              # If empty, the script uses a temporary directory for the replacement icons.
                                            # If you want to avoid downloading the icons every time you rebrand firefox,
                                            # point NEWICONSDIR to a suitable directory.

SOURCEBASE="http://mxr.mozilla.org/seamonkey/source" # The URL under which the "other-licenses" directory resides.


CHROMEDIR=$FIREFOXDIR/chrome                # Simply the firefox chrome directory.



die() {
    EXITCODE="${1:-9}"
    MESSAGE="$2"

    echo -e "\n$MESSAGE"

    exit $EXITCODE
}



get_icon() {
    local ICON="$1"
    local SOURCEFILE="$2"

    echo -n " - $ICON"

    if [ -e "$NEWICONSDIR/$ICON" ] ; then
        if [ -f "$NEWICONSDIR/$ICON" ] ; then
            echo " is present."
            return 0
        else
            echo " is present but is not a file. Quitting."
            exit 1
        fi
    fi

    echo -n ": Downloading... "
    if curl -sS "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
        echo "Done."
        return 0
    else
        exit 1
    fi
}



TEMPDIR=$(mktemp -d -t firebrand-work-XXXXXXXX)

if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary work directory."
fi

if [ "x$NEWICONSDIR" == "x" ] ; then
    NEWICONSDIR=$(mktemp -d -t firebrand-icon-XXXXXXXX)

    if [ $? -ne 0 ] ; then
        die 1 "Could not create temporary icon directory."
    fi
else
    [ -e "$NEWICONSDIR" ] || mkdir -p "$NEWICONSDIR" || die 1 "Could not create icon directory $NEWICONSDIR."
fi



echo -e "\033[1mChecking replacement icons\033[0m"
get_icon "mozicon50.xpm"    "/other-licenses/branding/firefox/mozicon50.xpm?raw=1"
get_icon "mozicon16.xpm"    "/other-licenses/branding/firefox/mozicon16.xpm?raw=1"
get_icon "mozicon128.png"   "/other-licenses/branding/firefox/mozicon128.png?raw=1"
get_icon "document.png"     "/other-licenses/branding/firefox/document.png?raw=1"
get_icon "icon48.png"       "/other-licenses/branding/firefox/content/icon48.png?raw=1"
get_icon "icon64.png"       "/other-licenses/branding/firefox/content/icon64.png?raw=1"
get_icon "about.png"        "/other-licenses/branding/firefox/content/about.png?raw=1"
get_icon "aboutCredits.png" "/other-licenses/branding/firefox/content/aboutCredits.png?raw=1"
get_icon "aboutFooter.png"  "/other-licenses/branding/firefox/content/aboutFooter.png?raw=1"
cp "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default.xpm"
convert -resize 48x48 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default48.png"
convert -resize 32x32 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default32.png"
convert -resize 16x16 "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default16.png"



echo -e "\033[1mBranding chrome/en-US.jar\033[0m"
echo -n " - Unzipping branding files in chrome/en-US.jar to temporary directory... "
unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Failed."

for FILE in $TEMPDIR/locale/branding/* ; do
    sed -i "s|$FIREFOXSTRING|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
done

echo -n " - Replacing old branding files in chrome/en-US.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/en-US.jar" locale/branding/* ) && echo "Done." || die 1 "Failed."



echo -e "\033[1mBranding chrome/browser.jar\033[0m"
echo -n " - Making new branding icon structure in temporary directory... "
mkdir -p "$TEMPDIR/content/branding" || die 1 "Could not create $TEMPDIR/content/branding."
cp "$NEWICONSDIR"/{about.png,aboutCredits.png,aboutFooter.png,icon48.png,icon64.png} "$TEMPDIR/content/branding/" || die 1 "Could not copy new icons to $TEMPDIR/content/branding/."
echo "Done."
echo -n " - Replacing old branding icon structure in chrome/browser.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/browser.jar" content/branding/* ) && echo "Done." || die 1 "Failed."



echo -e "\033[1mBranding defaults/preferences/firefox.js\033[0m"
sed -i "s|$FIREFOXSTRINGPREFS|Firefox|g" $FIREFOXDIR/defaults/preferences/firefox.js && echo " - Successfully edited $FIREFOXDIR/defaults/preferences/firefox.js." || die 1 "Could not edit $FIREFOXDIR/defaults/preferences/firefox.js."



echo -e "\033[1mBranding icons\033[0m"
echo -n " - Replacing icons in chrome/icons/default/... "
cp "$NEWICONSDIR"/{default48.png,default32.png,default16.png} $FIREFOXDIR/chrome/icons/default/ && echo "Done." || die 1 "Failed."

echo -n " - Replacing icons in icons/... "
cp "$NEWICONSDIR"/{document.png,mozicon128.png,mozicon16.xpm,mozicon50.xpm} $FIREFOXDIR/icons/ && echo "Done." || die 1 "Failed."

chmod 644 $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*
chown root:root $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*

echo -n " - Replacing /usr/share/pixmaps/firefox.png: "
convert "$NEWICONSDIR/default.xpm" /usr/share/pixmaps/firefox.png && echo "Done." || die 1 "Failed."
chmod 644 /usr/share/pixmaps/firefox.png 
chown root:root /usr/share/pixmaps/firefox.png

oz

Offline

#37 2008-12-02 13:55:56

Wintershade
Member
From: Croatia
Registered: 2008-02-18
Posts: 175
Website

Re: firebrand - a script to brand firefox without recompiling

Thank you! It works like a charm.


Only the best is good enough.

Offline

#38 2008-12-24 16:15:28

litemotiv
Forum Fellow
Registered: 2008-08-01
Posts: 5,026

Re: firebrand - a script to brand firefox without recompiling

here's a version that works without the 75mb of imagemagick dependencies (still uses curl though, might want to change that to wget )

#!/bin/sh
#
# firebrand - a script to brand firefox without recompilation
#
#
# This script replaces and changes (a few) files in an existing firefox 
# installation. Run it after a firefox installation or upgrade, and restart 
# firefox. The program icon may not be (visibly) replaced until your desktop 
# environment is restarted.
#
# To revert to the original brand, simply reinstall firefox.
#
# Dependencies: curl, zip, unzip
#

#FIREFOXDIR: Where firefox's data files resides.

# Gran Paradiso:
FIREFOXDIR=/usr/lib/firefox-3.0
FIREFOXSTRING="Gran Paradiso"
FIREFOXSTRINGPREFS="GranParadiso"

NEWICONSDIR=""                              # If empty, the script uses a temporary directory for the replacement icons.
                                            # If you want to avoid downloading the icons every time you rebrand firefox,
                                            # point NEWICONSDIR to a suitable directory.

SOURCEBASE="http://mxr.mozilla.org/seamonkey/source" # The URL under which the "other-licenses" directory resides.


CHROMEDIR=$FIREFOXDIR/chrome                # Simply the firefox chrome directory.



die() {
    EXITCODE="${1:-9}"
    MESSAGE="$2"

    echo -e "\n$MESSAGE"

    exit $EXITCODE
}



get_icon() {
    local ICON="$1"
    local SOURCEFILE="$2"

    echo -n " - $ICON"

    if [ -e "$NEWICONSDIR/$ICON" ] ; then
        if [ -f "$NEWICONSDIR/$ICON" ] ; then
            echo " is present."
            return 0
        else
            echo " is present but is not a file. Quitting."
            exit 1
        fi
    fi

    echo -n ": Downloading... "
    if curl -sS "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
        echo "Done."
        return 0
    else
        exit 1
    fi
}



TEMPDIR=$(mktemp -d -t firebrand-work-XXXXXXXX)

if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary work directory."
fi

if [ "x$NEWICONSDIR" == "x" ] ; then
    NEWICONSDIR=$(mktemp -d -t firebrand-icon-XXXXXXXX)

    if [ $? -ne 0 ] ; then
        die 1 "Could not create temporary icon directory."
    fi
else
    [ -e "$NEWICONSDIR" ] || mkdir -p "$NEWICONSDIR" || die 1 "Could not create icon directory $NEWICONSDIR."
fi



echo -e "\033[1mChecking replacement icons\033[0m"
get_icon "mozicon50.xpm"    "/other-licenses/branding/firefox/mozicon50.xpm?raw=1"
get_icon "mozicon16.xpm"    "/other-licenses/branding/firefox/mozicon16.xpm?raw=1"
get_icon "mozicon128.png"   "/other-licenses/branding/firefox/mozicon128.png?raw=1"
get_icon "document.png"     "/other-licenses/branding/firefox/document.png?raw=1"
get_icon "icon48.png"       "/other-licenses/branding/firefox/content/icon48.png?raw=1"
get_icon "icon64.png"       "/other-licenses/branding/firefox/content/icon64.png?raw=1"
get_icon "about.png"        "/other-licenses/branding/firefox/content/about.png?raw=1"
get_icon "aboutCredits.png" "/other-licenses/branding/firefox/content/aboutCredits.png?raw=1"
get_icon "aboutFooter.png"  "/other-licenses/branding/firefox/content/aboutFooter.png?raw=1"
get_icon "default16.png"    "/other-licenses/branding/firefox/default16.png?raw=1"
get_icon "default32.png"    "/other-licenses/branding/firefox/default32.png?raw=1"
get_icon "default48.png"    "/other-licenses/branding/firefox/default48.png?raw=1"

cp "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default.xpm"
cp "$NEWICONSDIR/default16.png" "$NEWICONSDIR/default16.png"
cp "$NEWICONSDIR/default32.png" "$NEWICONSDIR/default32.png"
cp "$NEWICONSDIR/default48.png" "$NEWICONSDIR/default48.png"
cp "$NEWICONSDIR/icon64.png"     "/usr/share/pixmaps/firefox.png"

echo -e "\033[1mBranding chrome/en-US.jar\033[0m"
echo -n " - Unzipping branding files in chrome/en-US.jar to temporary directory... "
unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Failed."

for FILE in $TEMPDIR/locale/branding/* ; do
    sed -i "s|$FIREFOXSTRING|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
done

echo -n " - Replacing old branding files in chrome/en-US.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/en-US.jar" locale/branding/* ) && echo "Done." || die 1 "Failed."


echo -e "\033[1mBranding chrome/browser.jar\033[0m"
echo -n " - Making new branding icon structure in temporary directory... "
mkdir -p "$TEMPDIR/content/branding" || die 1 "Could not create $TEMPDIR/content/branding."
cp "$NEWICONSDIR"/{about.png,aboutCredits.png,aboutFooter.png,icon48.png,icon64.png} "$TEMPDIR/content/branding/" || die 1 "Could not copy new icons to $TEMPDIR/content/branding/."
echo "Done."
echo -n " - Replacing old branding icon structure in chrome/browser.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/browser.jar" content/branding/* ) && echo "Done." || die 1 "Failed."

echo -e "\033[1mBranding defaults/preferences/firefox.js\033[0m"
sed -i "s|$FIREFOXSTRINGPREFS|Firefox|g" $FIREFOXDIR/defaults/preferences/firefox.js && echo " - Successfully edited $FIREFOXDIR/defaults/preferences/firefox.js." || die 1 "Could not edit $FIREFOXDIR/defaults/preferences/firefox.js."

echo -e "\033[1mBranding icons\033[0m"
echo -n " - Replacing icons in chrome/icons/default/... "
cp "$NEWICONSDIR"/{default48.png,default32.png,default16.png} $FIREFOXDIR/chrome/icons/default/ && echo "Done." || die 1 "Failed."

echo -n " - Replacing icons in icons/... "
cp "$NEWICONSDIR"/{document.png,mozicon128.png,mozicon16.xpm,mozicon50.xpm} $FIREFOXDIR/icons/ && echo "Done." || die 1 "Failed."

chmod 644 $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*
chown root:root $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*

chmod 644 /usr/share/pixmaps/firefox.png 
chown root:root /usr/share/pixmaps/firefox.png

ᶘ ᵒᴥᵒᶅ

Offline

#39 2008-12-24 16:27:32

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

Great! smile

Offline

#40 2009-02-26 07:23:30

tinhtruong
Member
From: Australia
Registered: 2008-12-18
Posts: 117

Re: firebrand - a script to brand firefox without recompiling

Really love the plain old Firefox icon. Just run it on my system. So far so good.

Offline

#41 2009-03-02 23:52:35

equilibrium
Member
From: EU
Registered: 2008-06-18
Posts: 80
Website

Re: firebrand - a script to brand firefox without recompiling

cool script smile thanks


Archlinux x86_64 | Github | acer chromebook c7 (arch)

Offline

#42 2009-03-22 20:24:55

hit
Member
From: Estonia
Registered: 2009-01-14
Posts: 79

Re: firebrand - a script to brand firefox without recompiling

It was the only way to get gtalk working in orkut, so thanks!

Offline

#43 2009-04-02 04:23:05

dustinw
Member
Registered: 2009-03-16
Posts: 34

Re: firebrand - a script to brand firefox without recompiling

I've gotten this script to work before, but I reinstalled firefox and now it won't run properly, I keep getting really stupid errors in python.

For instance:

File "firebrand.py", line 35
die() {
       ^
SyntaxError: invalid syntax

I moved the { down a line to see what it would do and it gave me an error on the next line of code, what could be causing this?

Offline

#44 2009-04-02 06:03:42

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

It's a bash script, not a python script smile

Offline

#45 2009-04-02 07:12:52

dustinw
Member
Registered: 2009-03-16
Posts: 34

Re: firebrand - a script to brand firefox without recompiling

wow I feel like an idiot, don't know why I had it labeled as a .py file

Offline

#46 2009-04-20 17:06:19

Joe90
Member
From: Winchester UK
Registered: 2009-04-12
Posts: 4
Website

Re: firebrand - a script to brand firefox without recompiling

litemotiv wrote:

here's a version that works without the 75mb of imagemagick dependencies (still uses curl though, might want to change that to wget )

#!/bin/sh
#
# firebrand - a script to brand firefox without recompilation
#
#
# This script replaces and changes (a few) files in an existing firefox 
# installation. Run it after a firefox installation or upgrade, and restart 
# firefox. The program icon may not be (visibly) replaced until your desktop 
# environment is restarted.
#
# To revert to the original brand, simply reinstall firefox.
#
# Dependencies: curl, zip, unzip
#

#FIREFOXDIR: Where firefox's data files resides.

# Gran Paradiso:
FIREFOXDIR=/usr/lib/firefox-3.0
FIREFOXSTRING="Gran Paradiso"
FIREFOXSTRINGPREFS="GranParadiso"

NEWICONSDIR=""                              # If empty, the script uses a temporary directory for the replacement icons.
                                            # If you want to avoid downloading the icons every time you rebrand firefox,
                                            # point NEWICONSDIR to a suitable directory.

SOURCEBASE="http://mxr.mozilla.org/seamonkey/source" # The URL under which the "other-licenses" directory resides.


CHROMEDIR=$FIREFOXDIR/chrome                # Simply the firefox chrome directory.



die() {
    EXITCODE="${1:-9}"
    MESSAGE="$2"

    echo -e "\n$MESSAGE"

    exit $EXITCODE
}



get_icon() {
    local ICON="$1"
    local SOURCEFILE="$2"

    echo -n " - $ICON"

    if [ -e "$NEWICONSDIR/$ICON" ] ; then
        if [ -f "$NEWICONSDIR/$ICON" ] ; then
            echo " is present."
            return 0
        else
            echo " is present but is not a file. Quitting."
            exit 1
        fi
    fi

    echo -n ": Downloading... "
    if curl -sS "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
        echo "Done."
        return 0
    else
        exit 1
    fi
}



TEMPDIR=$(mktemp -d -t firebrand-work-XXXXXXXX)

if [ $? -ne 0 ] ; then
    die 1 "Could not create temporary work directory."
fi

if [ "x$NEWICONSDIR" == "x" ] ; then
    NEWICONSDIR=$(mktemp -d -t firebrand-icon-XXXXXXXX)

    if [ $? -ne 0 ] ; then
        die 1 "Could not create temporary icon directory."
    fi
else
    [ -e "$NEWICONSDIR" ] || mkdir -p "$NEWICONSDIR" || die 1 "Could not create icon directory $NEWICONSDIR."
fi



echo -e "\033[1mChecking replacement icons\033[0m"
get_icon "mozicon50.xpm"    "/other-licenses/branding/firefox/mozicon50.xpm?raw=1"
get_icon "mozicon16.xpm"    "/other-licenses/branding/firefox/mozicon16.xpm?raw=1"
get_icon "mozicon128.png"   "/other-licenses/branding/firefox/mozicon128.png?raw=1"
get_icon "document.png"     "/other-licenses/branding/firefox/document.png?raw=1"
get_icon "icon48.png"       "/other-licenses/branding/firefox/content/icon48.png?raw=1"
get_icon "icon64.png"       "/other-licenses/branding/firefox/content/icon64.png?raw=1"
get_icon "about.png"        "/other-licenses/branding/firefox/content/about.png?raw=1"
get_icon "aboutCredits.png" "/other-licenses/branding/firefox/content/aboutCredits.png?raw=1"
get_icon "aboutFooter.png"  "/other-licenses/branding/firefox/content/aboutFooter.png?raw=1"
get_icon "default16.png"    "/other-licenses/branding/firefox/default16.png?raw=1"
get_icon "default32.png"    "/other-licenses/branding/firefox/default32.png?raw=1"
get_icon "default48.png"    "/other-licenses/branding/firefox/default48.png?raw=1"

cp "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default.xpm"
cp "$NEWICONSDIR/default16.png" "$NEWICONSDIR/default16.png"
cp "$NEWICONSDIR/default32.png" "$NEWICONSDIR/default32.png"
cp "$NEWICONSDIR/default48.png" "$NEWICONSDIR/default48.png"
cp "$NEWICONSDIR/icon64.png"     "/usr/share/pixmaps/firefox.png"

echo -e "\033[1mBranding chrome/en-US.jar\033[0m"
echo -n " - Unzipping branding files in chrome/en-US.jar to temporary directory... "
unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Failed."

for FILE in $TEMPDIR/locale/branding/* ; do
    sed -i "s|$FIREFOXSTRING|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
done

echo -n " - Replacing old branding files in chrome/en-US.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/en-US.jar" locale/branding/* ) && echo "Done." || die 1 "Failed."


echo -e "\033[1mBranding chrome/browser.jar\033[0m"
echo -n " - Making new branding icon structure in temporary directory... "
mkdir -p "$TEMPDIR/content/branding" || die 1 "Could not create $TEMPDIR/content/branding."
cp "$NEWICONSDIR"/{about.png,aboutCredits.png,aboutFooter.png,icon48.png,icon64.png} "$TEMPDIR/content/branding/" || die 1 "Could not copy new icons to $TEMPDIR/content/branding/."
echo "Done."
echo -n " - Replacing old branding icon structure in chrome/browser.jar... "
( cd $TEMPDIR && zip -q -r "$CHROMEDIR/browser.jar" content/branding/* ) && echo "Done." || die 1 "Failed."

echo -e "\033[1mBranding defaults/preferences/firefox.js\033[0m"
sed -i "s|$FIREFOXSTRINGPREFS|Firefox|g" $FIREFOXDIR/defaults/preferences/firefox.js && echo " - Successfully edited $FIREFOXDIR/defaults/preferences/firefox.js." || die 1 "Could not edit $FIREFOXDIR/defaults/preferences/firefox.js."

echo -e "\033[1mBranding icons\033[0m"
echo -n " - Replacing icons in chrome/icons/default/... "
cp "$NEWICONSDIR"/{default48.png,default32.png,default16.png} $FIREFOXDIR/chrome/icons/default/ && echo "Done." || die 1 "Failed."

echo -n " - Replacing icons in icons/... "
cp "$NEWICONSDIR"/{document.png,mozicon128.png,mozicon16.xpm,mozicon50.xpm} $FIREFOXDIR/icons/ && echo "Done." || die 1 "Failed."

chmod 644 $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*
chown root:root $FIREFOXDIR/chrome/icons/default/* $FIREFOXDIR/icons/*

chmod 644 /usr/share/pixmaps/firefox.png 
chown root:root /usr/share/pixmaps/firefox.png

Very nice, worked second time (after I installed zip smile )

Offline

#47 2009-04-28 06:06:07

chetan51
Member
Registered: 2009-04-23
Posts: 14

Re: firebrand - a script to brand firefox without recompiling

Beautiful. This script works like a charm smile

Offline

#48 2009-04-28 14:39:37

aaaantoine
Member
Registered: 2008-12-12
Posts: 44

Re: firebrand - a script to brand firefox without recompiling

Would it be possible to update the script to fix the user agent as well?

Mine still says GranParadiso/3.0.10 after running.

Thanks, and great job!

Offline

#49 2009-04-28 15:08:48

Bebo
Member
From: Göteborg, Sweden
Registered: 2006-06-07
Posts: 207

Re: firebrand - a script to brand firefox without recompiling

aaaantoine wrote:

Would it be possible to update the script to fix the user agent as well?

Mine still says GranParadiso/3.0.10 after running.

Thanks, and great job!

Hm, it should fix the useragent too. My guess is that you used my original script, which was for "Bon Echo". Use litemotiv's version a few posts above, that should do it.

Offline

#50 2009-05-03 00:46:45

qpieus
Member
Registered: 2008-03-08
Posts: 33

Re: firebrand - a script to brand firefox without recompiling

Thanks Bebo and litemotiv (who's script I just used). I like getting rid of the Gran Paradiso nonsense. I know the name didn't affect anything with how the browser operates, I just like having it say Firefox. I tried the spookyet version from AUR a while ago. It was OK but it took forever and a day to complile, plus it didn't get updated when a new version came out. This rebranding script is so much quicker - it took just a few seconds and it was done.

Offline

Board footer

Powered by FluxBB