You are not logged in.

#76 2010-01-19 02:12:27

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

Re: firebrand - a script to brand firefox without recompiling

I ran it with root privileges, without root privileges, in the console, in KDE, etc.  I exited X and then started again, I rebooted, etc.  I've done everything I can think of.  Permissions for the icons are 644, which should be okay.  I don't know what to do at this point.  I've thought about installing the AUR package firefox-branded, but it installs additional packages that I don't need (e.g. gnome stuff).  This is driving me nuts so any adivce would be very appreciated.

Thanks in advance...

Edit:  How do I "refresh" desktop menus in KDE4?

Last edited by Twenynge (2010-01-19 02:13:21)

Offline

#77 2010-01-19 02:34:18

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

Re: firebrand - a script to brand firefox without recompiling

"Refresh" was just my term for like, killing X and logging in again smile Just so that the icons are (re)loaded on the desktop and the menus.

Sorry, I don't know what the problem could be (atm).

EDIT: BTW, do the icons in /usr/lib/firefox-3.5/chrome/icons/default/ look alright?

Last edited by Bebo (2010-01-19 02:36:44)

Offline

#78 2010-01-19 12:41:28

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

Re: firebrand - a script to brand firefox without recompiling

Twenynge wrote:

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?

What command did you actually run when using the script?  Did the entire script complete.


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

#79 2010-01-25 23:13:12

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

Re: firebrand - a script to brand firefox without recompiling

Needs update to 3.6 very soon, so be prepared tongue

Offline

#80 2010-02-02 18:34:23

cleanrock
Member
Registered: 2008-11-17
Posts: 108

Re: firebrand - a script to brand firefox without recompiling

is firebrand dead ? its no longer in aur

Offline

#81 2010-02-02 19:33:57

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

Re: firebrand - a script to brand firefox without recompiling

No, it was just never put on the AUR. The first post is a bit misleading, I guess. Skip down to the bold text in that post.

Offline

#82 2010-02-03 11:03:06

nawitus
Member
Registered: 2009-05-11
Posts: 112

Re: firebrand - a script to brand firefox without recompiling

I've updated this to FF 3.6:
I just changed these strings: FIREFOXDIR, FIREFOXSTRING and FIREFOXSTRINGPREFS

#!/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.6
FIREFOXSTRING="Namoroka"
FIREFOXSTRINGPREFS="Namoroka"

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

#83 2010-02-03 13:00:11

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

Re: firebrand - a script to brand firefox without recompiling

cleanrock wrote:

is firebrand dead ? its no longer in aur

Add to /etc/pacman.conf:

[archlinuxfr]
# Optional comment here
Server = http://repo.archlinux.fr/i686

sudo pacman -Sy firebrand

Note: repo has (yet) the old firebrand for 3.5

Offline

#84 2010-02-03 13:22:42

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

Re: firebrand - a script to brand firefox without recompiling

@nawitus: Thanks for the update! But did you test if mekwalls version works? It should be able to cope without the string changes.

@hit: Great, I didn't know that smile

Offline

#85 2010-02-03 16:10:08

cleanrock
Member
Registered: 2008-11-17
Posts: 108

Re: firebrand - a script to brand firefox without recompiling

hit wrote:
cleanrock wrote:

is firebrand dead ? its no longer in aur

Add to /etc/pacman.conf:

[archlinuxfr]
# Optional comment here
Server = http://repo.archlinux.fr/i686

sudo pacman -Sy firebrand

Note: repo has (yet) the old firebrand for 3.5

i was confused, i have the firebrand from archlinuxfr .. hopefully it will be updated soon

Offline

#86 2010-02-04 19:05:23

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

Re: firebrand - a script to brand firefox without recompiling

Jean-Marc isn't maintaining firebrand in archlinuxfr anymore. I'll ask if someone will take over.

Offline

#87 2010-02-05 08:17:05

Sheepeh
Member
From: England
Registered: 2009-12-06
Posts: 16
Website

Re: firebrand - a script to brand firefox without recompiling

Thanks for this!  I used Mekwall's version on a brand new, clean, 3.6 x86_64 install within KDE4and it worked without a hitch (once I'd installed zip as the script helpfully pointed out it needed).

Offline

#88 2010-02-13 03:04:26

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: firebrand - a script to brand firefox without recompiling

added to AUR: http://aur.archlinux.org/packages.php?ID=34559
ceated Git repo for coding: http://github.com/Lky/firebrand
-
TODO: rewrite the script and maybe merge it with thunderbrand

Offline

#89 2010-02-13 08:10:19

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

Re: firebrand - a script to brand firefox without recompiling

Lucky, that is a good idea. I didnt have the time to check yet, one quick question: is mekwall's version or the one from Bebo in the first post?


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

Offline

#90 2010-02-13 08:33:18

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: firebrand - a script to brand firefox without recompiling

SanskritFritz, at moment its nawitus version on post #84. It works with 3.6 in my test, so i use this version. I will rewrite them, if i have the time. maybe with code (icons? are they diffrend?) from mekwalls version.

Offline

#91 2010-02-13 11:35:16

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

Re: firebrand - a script to brand firefox without recompiling

Use mekwalls version (as I link to in the first post), it works with 3.6.

EDIT: ...and is more general than other versions.

Last edited by Bebo (2010-02-13 11:37:19)

Offline

#92 2010-02-13 15:07:09

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

Re: firebrand - a script to brand firefox without recompiling

Yes it is generally considered the best version so far.


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

Offline

#93 2010-02-15 20:25:16

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: firebrand - a script to brand firefox without recompiling

firebrand replaced with mekwalls (post #67) version. (AUR and Git up to date)

Offline

#94 2010-02-15 21:15:32

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

Re: firebrand - a script to brand firefox without recompiling

Fabulous smile I've edited the initial post with this info.

Offline

#95 2010-02-22 04:06:41

Lucky
Member
From: /dev/random
Registered: 2009-08-07
Posts: 28

Re: firebrand - a script to brand firefox without recompiling

changes: change coding style, add rootcheck, preparation for all in one version

http://github.com/Lky/firebrand/blob/te … rebrand.sh

it would be nice, if your changes now are based on testing branch.

Offline

#96 2010-03-22 00:53:56

faemir
Member
From: UK
Registered: 2007-11-09
Posts: 18

Re: firebrand - a script to brand firefox without recompiling

For some reason my firefox icon in the netbook more of KDE 4.4 still shows the generic icon, as does the bouncing icon when firefox is loading. Everywhere else looks fine, and this happens even after a reboot.

Any ideas?

Offline

#97 2010-03-27 05:58:22

trc
Member
From: Beaver Dam, WI
Registered: 2010-01-14
Posts: 85
Website

Re: firebrand - a script to brand firefox without recompiling

hey if I use this will firefox still get updates when I update my system?


~trc

Offline

#98 2010-03-27 20:15:10

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

Re: firebrand - a script to brand firefox without recompiling

trc wrote:

hey if I use this will firefox still get updates when I update my system?

Yes.


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

Offline

#99 2010-03-28 23:54:55

trc
Member
From: Beaver Dam, WI
Registered: 2010-01-14
Posts: 85
Website

Re: firebrand - a script to brand firefox without recompiling

thanks for the information


~trc

Offline

#100 2010-04-09 11:45:21

fukawi2
Administrator
From: .vic.au
Registered: 2007-09-28
Posts: 6,140
Website

Re: firebrand - a script to brand firefox without recompiling

Appears to be broken for 3.6.3-1

Firefox data directory is /usr/lib/firefox-3.6.
Checking replacement icons
 - mozicon50.xpm: Downloading... Done.
 - mozicon16.xpm: Downloading... Done.
 - mozicon128.png: Downloading... Done.
 - document.png: Downloading... Done.
 - icon48.png: Downloading... Done.
 - icon64.png: Downloading... Done.
 - about.png: Downloading... Done.
 - aboutCredits.png: Downloading... Done.
 - aboutFooter.png: Downloading... Done.
 - default16.png: Downloading... Done.
 - default22.png: Downloading... Done.
 - default24.png: Downloading... Done.
 - default32.png: Downloading... Done.
 - default48.png: Downloading... Done.
 - default256.png: Downloading... Done.
Branding chrome/en-US.jar
 - Unzipping branding files in chrome/en-US.jar to temporary directory... Done.
sed: can't read /tmp/firebrand-work-ihHoEvaf/locale/branding/brand.dtd: No such file or directory
Could not edit brand.dtd.

Offline

Board footer

Powered by FluxBB