You are not logged in.

#51 2009-05-03 01:39:03

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: firebrand - a script to brand firefox without recompiling

Mmm yeah! I used litemotiv's script. Works perfectly.

Offline

#52 2009-05-03 04:38:13

ruscook
Member
From: Sydney Australia
Registered: 2007-08-27
Posts: 105
Website

Re: firebrand - a script to brand firefox without recompiling

Thanks guys, works great!
Russ

Offline

#53 2009-05-03 21:17:28

pierce.jason
Member
Registered: 2009-03-02
Posts: 19

Re: firebrand - a script to brand firefox without recompiling

qpieus wrote:

I know the name didn't affect anything with how the browser operates, I just like having it say Firefox.

Actually the name does affect how it operates(some)! A few silly sites use the "user agent" string, to decide what javascript or css or whatever weird features to enable. Yahoo pages do this some, but I don't think it disables much.

Offline

#54 2009-05-04 02:17:04

Peasantoid
Member
Registered: 2009-04-26
Posts: 928
Website

Re: firebrand - a script to brand firefox without recompiling

Bebo/litemotiv: Can has permission to redistribute your script? I'd like it to be part of a repository for a soon-to-be-unveiled project (NOT µpkg).

# (a month later) ...never mind.

Last edited by Peasantoid (2009-05-23 19:07:27)

Offline

#55 2009-05-23 18:51:00

Chokkan
Member
Registered: 2009-04-06
Posts: 129

Re: firebrand - a script to brand firefox without recompiling

Thank you! Worked without problems.


< Daenyth> tomkx: my girlfriend is linux
< Daenyth> srsly
< Daenyth> she loves the way I «make install»
< Daenyth> all her /dev entries are mode 7 for me

Offline

#56 2009-05-24 00:08:56

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

Re: firebrand - a script to brand firefox without recompiling

Peasantoid wrote:

Bebo/litemotiv: Can has permission to redistribute your script? I'd like it to be part of a repository for a soon-to-be-unveiled project (NOT µpkg).

# (a month later) ...never mind.

I'm very sorry, I've somehow missed this. I have no problems whatsoever with you redistributing the script, I'm just happy it's used smile I can't answer for litemotiv though.

Offline

#57 2009-06-23 10:23:00

warnec
Member
From: Poland
Registered: 2009-06-22
Posts: 166

Re: firebrand - a script to brand firefox without recompiling

litemotiv's script worked like a charm for me! (Firefox 3.0.10)

Thanks wink

Offline

#58 2009-07-02 04:47:08

Polygon
Member
Registered: 2009-02-08
Posts: 28

Re: firebrand - a script to brand firefox without recompiling

can someone update this for firefox 3.5? editing the firefox path from firefox-3.0 to firefox-3.5 does a half way job at it, the about page says firefox, and the icon changes, but the title bar is still shiretoko...can someone finish the job please? thanks!

Offline

#59 2009-07-02 12:52:10

kaaposc
Member
From: Latvia
Registered: 2008-07-16
Posts: 30

Re: firebrand - a script to brand firefox without recompiling

Polygon wrote:

can someone update this for firefox 3.5? editing the firefox path from firefox-3.0 to firefox-3.5 does a half way job at it, the about page says firefox, and the icon changes, but the title bar is still shiretoko...can someone finish the job please? thanks!

Find both places in script where it says "Gran Paradiso" and replace them to "Shiretoko" (code name (?) for 3.5). Then re-run script. Or apply this patch on /usr/bin/firebrand:

--- /usr/bin/firebrand    2008-11-23 22:29:20.000000000 +0200
+++ /usr/bin/firebrand.new    2009-07-02 15:43:56.000000000 +0300
@@ -17,7 +17,7 @@
 exit 1
 fi
 
-FIREFOXDIR=/usr/lib/firefox-3.0
+FIREFOXDIR=/usr/lib/firefox-3.5
 CHROMEDIR=$FIREFOXDIR/chrome
 
 
@@ -47,7 +47,7 @@
 unzip -q -d "$TEMPDIR" "$CHROMEDIR/en-US.jar" locale/branding/brand.dtd locale/branding/brand.properties && echo "Done." || die 1 "Could not unzip branding files."
 
 for FILE in $TEMPDIR/locale/branding/* ; do
-    sed -i 's|Gran Paradiso|Mozilla Firefox|g' "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
+    sed -i 's|Shiretoko|Mozilla Firefox|g' "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
 done
 
 echo " - Replacing branding files in en-US.jar"
@@ -64,7 +64,7 @@
 
 
 echo -e "\033[1mRE-BRANDING defaults/preferences/firefox.js\033[0m"
-sed -i 's|Gran Paradiso|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."
+sed -i 's|Shiretoko|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."

Offline

#60 2009-07-02 13:29:35

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

Re: firebrand - a script to brand firefox without recompiling

I've edited my initial post so that noone is tricked into using my first script. Use litemotiv's script instead. To get it to work for 3.5 it ought to be as simple as changing the first three variables in the script (well, I haven't tested it on 3.5 myself yet, but judging from your reports it may very well be as simple as that).

Offline

#61 2009-07-04 19:06:27

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

Re: firebrand - a script to brand firefox without recompiling

Here's a new version where you won't have to edit anything yourself. The changes are:
- The firefox directory in /usr/lib is "autodetected" (ls...)
- Better sed:ing, where the codename isn't hardcoded any more.
- Uses wget instead of curl, on popular demand wink

(FYI: I've tinkered a little with bsdtar, but couldn't make the zipping work, so zip and unzip are still there as dependencies.)

#!/bin/bash
#
# 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: wget, unzip, zip
#

FIREFOXDIR=""                               # Where firefox's data files resides. Usually something like /usr/lib/firefox-3.5.
                                            # If empty, autodetection is attempted.
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.



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

    [ "x$MESSAGE" == "x" ] || echo -e "$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
            die 1 " is present but is not a file. Quitting."
        fi
    fi

    echo -n ": Downloading... "
    #if curl -sSL "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
    if wget -q -O - "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
        echo "Done."
        return 0
    else
        die 1 "Failed."
    fi
}



for EXEC in wget unzip zip ; do
    if ! which $EXEC > /dev/null 2>&1 ; then
        die 1 "This script requires $EXEC to work."
    fi
done 



if [ "x$FIREFOXDIR" == "x" ] ; then
    FIREFOXDIR=$(ls -1d /usr/lib/firefox-* | sort | tail -1)

    if [ "x$FIREFOXDIR" == "x" ] ; then
        die 1 "Could not find the Firefox data directory."
    fi

    echo "Firefox data directory is ${FIREFOXDIR}."
fi

if [ ! -d "$FIREFOXDIR" ] ; then
    die 1 "$FIREFOXDIR is not a directory."
fi

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



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"



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|${OFFICIAL_NAME}|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
#done
sed -r -i 's_((brandShortName|brandFullName)[ \t]+)"[^"]+"_\1"Firefox"_g' $TEMPDIR/locale/branding/brand.dtd && echo " - Edited brand.dtd" || die 1 "Could not edit brand.dtd."
sed -r -i 's_^(brandShortName|brandFullName)=.*$_\1=Firefox_g' $TEMPDIR/locale/branding/brand.properties && echo " - Edited brand.properties" || die 1 "Could not edit brand.properties."

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|${USERAGENT_NAME}|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."
sed -r -i 's_^(pref\("general.useragent.extra.firefox", ")[^/]+(/.*"\);[ \t]*)$_\1Firefox\2_' $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: "
cp "$NEWICONSDIR/icon64.png" "/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

Edited 2009-07-13 to fix the problem in post #63.

Last edited by Bebo (2009-07-13 15:49:37)

Offline

#62 2009-07-13 14:19:17

Snub
Member
Registered: 2007-09-09
Posts: 13

Re: firebrand - a script to brand firefox without recompiling

Has anyone got this to work for 3.5? The one in the OP doesn't work with the edited variables, and the one in Bebo's post fails with,

[robert@arch64 ~]$ sudo ./fb.sh 
Firefox data directory is /usr/lib/firefox-3.0
/usr/lib/firefox-3.5.
/usr/lib/firefox-3.0
/usr/lib/firefox-3.5 is not a directory.

Which is odd, because /usr/lib/firefox-3.5 is a directory.

Offline

#63 2009-07-13 15:50:39

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

Re: firebrand - a script to brand firefox without recompiling

Snub wrote:

Has anyone got this to work for 3.5? The one in the OP doesn't work with the edited variables, and the one in Bebo's post fails with,

[robert@arch64 ~]$ sudo ./fb.sh 
Firefox data directory is /usr/lib/firefox-3.0
/usr/lib/firefox-3.5.
/usr/lib/firefox-3.0
/usr/lib/firefox-3.5 is not a directory.

Which is odd, because /usr/lib/firefox-3.5 is a directory.

Argh, sorry, I didn't think about that... You have several directories matching "/usr/lib/firefox-*" (why?). I've edited the script above (post #62), please try again.

Offline

#64 2009-07-13 16:14:03

Snub
Member
Registered: 2007-09-09
Posts: 13

Re: firebrand - a script to brand firefox without recompiling

Bebo wrote:

Argh, sorry, I didn't think about that... You have several directories matching "/usr/lib/firefox-*" (why?). I've edited the script above (post #62), please try again.

I don't know, it's a 2 week old install of arch-64, I haven't done anything funny to it. But thanks a lot, it works now.

Offline

#65 2009-07-13 17:24:01

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

Re: firebrand - a script to brand firefox without recompiling

Bebo wrote:

Argh, sorry, I didn't think about that... You have several directories matching "/usr/lib/firefox-*" (why?). I've edited the script above (post #62), please try again.

It worked perfectly for me as well... THANKS!


oz

Offline

#66 2009-08-08 08:46:23

mekwall
Member
From: Gothenburg, Sweden
Registered: 2009-01-11
Posts: 4

Re: firebrand - a script to brand firefox without recompiling

I took the liberty to update Bebo's script so it provides the new refurbished Firefox 3.5 icon by using the 3.5 sourcebase and adding additional icons (256x256, 24x24, 22x22) for download and replacement.

#!/bin/bash
#
# 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: wget, unzip, zip
#

FIREFOXDIR=""                               # Where firefox's data files resides. Usually something like /usr/lib/firefox-3.5.
                                            # If empty, autodetection is attempted.
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/mozilla1.9.1/source" # The URL under which the "other-licenses" directory resides.



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

    [ "x$MESSAGE" == "x" ] || echo -e "$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
            die 1 " is present but is not a file. Quitting."
        fi
    fi

    echo -n ": Downloading... "
    #if curl -sSL "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
    if wget -q -O - "${SOURCEBASE}${SOURCEFILE}" > "$NEWICONSDIR/$ICON" ; then
        echo "Done."
        return 0
    else
        die 1 "Failed."
    fi
}



for EXEC in wget unzip zip ; do
    if ! which $EXEC > /dev/null 2>&1 ; then
        die 1 "This script requires $EXEC to work."
    fi
done



if [ "x$FIREFOXDIR" == "x" ] ; then
    FIREFOXDIR=$(ls -1d /usr/lib/firefox-* | sort | tail -1)

    if [ "x$FIREFOXDIR" == "x" ] ; then
        die 1 "Could not find the Firefox data directory."
    fi

    echo "Firefox data directory is ${FIREFOXDIR}."
fi

if [ ! -d "$FIREFOXDIR" ] ; then
    die 1 "$FIREFOXDIR is not a directory."
fi

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



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 "default22.png"    "/other-licenses/branding/firefox/default22.png?raw=1"
get_icon "default24.png"    "/other-licenses/branding/firefox/default24.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"
get_icon "default256.png"    "/other-licenses/branding/firefox/default256.png?raw=1"
cp "$NEWICONSDIR/mozicon50.xpm" "$NEWICONSDIR/default.xpm"

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|${OFFICIAL_NAME}|Firefox|g" "$FILE" && echo " - Successfully edited ${FILE}" || die 1 "Could not edit ${FILE}."
#done
sed -r -i 's_((brandShortName|brandFullName)[ \t]+)"[^"]+"_\1"Firefox"_g' $TEMPDIR/locale/branding/brand.dtd && echo " - Edited brand.dtd" || die 1 "Could not edit brand.dtd."
sed -r -i 's_^(brandShortName|brandFullName)=.*$_\1=Firefox_g' $TEMPDIR/locale/branding/brand.properties && echo " - Edited brand.properties" || die 1 "Could not edit brand.properties."

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|${USERAGENT_NAME}|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."
sed -r -i 's_^(pref\("general.useragent.extra.firefox", ")[^/]+(/.*"\);[ \t]*)$_\1Firefox\2_' $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"/{default256.png,default48.png,default32.png,default24.png,default22.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: "
cp "$NEWICONSDIR/icon64.png" "/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

Old:
default16.png?raw=1 default32.png?raw=1 default48.png?raw=1

New:
default16.png?raw=1 default22.png?raw=1 default24.png?raw=1 default32.png?raw=1 default48.png?raw=1

And here's the huge 256x256:
default256.png?raw=1

For more info about the new icon: http://blog.mozilla.com/faaborg/2009/06 … efox-icon/

As mentioned there, they will release the icon in vector format!

Last edited by mekwall (2009-08-08 09:14:39)

Offline

#67 2009-08-08 12:59:53

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

Re: firebrand - a script to brand firefox without recompiling

@mekwall: Ah, cool, thanks smile

Offline

#68 2009-08-13 21:44:22

SanskritFritz
Member
From: Budapest, Hungary
Registered: 2009-01-08
Posts: 1,923
Website

Re: firebrand - a script to brand firefox without recompiling

mekwall thank you, works flawless.


zʇıɹɟʇıɹʞsuɐs AUR || Cycling in Budapest with a helmet camera || Revised log levels proposal: "FYI" "WTF" and "OMG" (John Barnette)

Offline

#69 2009-08-27 16:22:24

markg85
Member
Registered: 2009-06-27
Posts: 149

Re: firebrand - a script to brand firefox without recompiling

@mekwall
Thanx for releasing that update. Just tested it here and works perfectly.

Offline

#70 2009-09-12 09:27:16

schimpfj
Member
From: Frankfurt, Germany
Registered: 2007-08-15
Posts: 53

Re: firebrand - a script to brand firefox without recompiling

@developers/contributers: Thx vm. Really nice!

Offline

#71 2009-11-07 08:27:01

yule
Member
Registered: 2009-10-20
Posts: 7

Re: firebrand - a script to brand firefox without recompiling

THank you mekwall, your script worked flawlessly with FF 3.5.5. I have a question though: wouldn't it be more useful to put this script on github or some place else where it would be a) easier to download and b) easier to fork / maintain?

Offline

#72 2009-11-20 20:38:53

WladyX
Member
Registered: 2008-10-26
Posts: 43

Re: firebrand - a script to brand firefox without recompiling

Thanks!

Offline

#73 2010-01-02 10:45:32

JuseBox
Member
Registered: 2009-11-27
Posts: 260

Re: firebrand - a script to brand firefox without recompiling

Thanks alot this works great! on 3.5


Linux ArchLinux 3.2.8-1-ARCH
#1 SMP PREEMPT Mon Feb 27 21:51:46 CET 2012 x86_64 AMD FX(tm)-8120 Eight-Core Processor AuthenticAMD GNU/Linux
8192MB DDR3 1300MHz | Asus m5a97 | GeForce GTX 550 Ti | 120 GB SSD

Offline

#74 2010-01-19 01:41:05

Twenynge
Member
Registered: 2010-01-19
Posts: 9

Re: firebrand - a script to brand firefox without recompiling

Hi all.  New Arch user here.  Just ran this script and it worked, but only for the root user.  My everyday user is still using generic icons.  Any suggestions?

Offline

#75 2010-01-19 01:57:55

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

Re: firebrand - a script to brand firefox without recompiling

Hm, it needs to be run with root privileges to access the files it changes, but it should work for any user after that. Did you try logging out and in again? I haven't checked how it behaves the last few times I've run it, but I believe the desktop and menus need to be "refreshed" afterwards to load the new icons. If you're saying that it doesn't work in FF, then I don't know what is happening.

Offline

Board footer

Powered by FluxBB