rss
twitter
    Find out what I'm doing on Twitter

Firefox 3.5.x Branding Fix for Ubuntu Jaunty

If you install Firefox 3.5.x from repositories for Ubuntu Jaunty, it's branding is set to Shiretoko.With this blog post you can fix this (name, icon, command etc) easily.

First close (it is better to kill entire firefox process) all firefox windows :

$pkill firefox

Install firefox (just to be sure every required package is installed):

$sudo apt-get install firefox-3.5 firefox-3.5-branding firefox-3.5-gnome-support

Now enter these commands into terminal (alt + f2 > gnome-terminal) :

PS : I do use $ for normal user and # for root

$sudo cp -v /usr/lib/firefox-3.0*/icons/* /usr/lib/firefox-3.5*/icons/
$cd /usr/lib/firefox-3.5*/defaults/preferences/
$sudo cp -v firefox.js_bak firefox.js
$sudo cp -v firefox.js firefox.js_bak
$sudo sed -i "s/pref(\"general.useragent.extra.firefox\", \"Shiretoko\//pref(\"general.useragent.extra.firefox\", \"Firefox\//g" firefox.js
$cd /usr/lib/firefox-3.5*/chrome/
$sudo cp browser-branding-en-US.jar_bak browser-branding-en-US.jar
$sudo cp browser-branding-en-US.jar browser-branding-en-US.jar_bak
$sudo cp browser-branding.jar_bak browser-branding.jar
$sudo cp browser-branding.jar browser-branding.jar_bak
$cd /usr/lib/firefox-3.0*/chrome/
$sudo cp -p browser-branding.jar /usr/lib/firefox-3.5*/chrome/
$cd /usr/lib/firefox-3.0*/chrome/icons/default/
$sudo cp -p * /usr/lib/firefox-3.5*/chrome/icons/default/
$sudo mkdir -p /d2tmp/ffbrandnew/
$sudo chmod 755 -R /d2tmp
$cd /usr/lib/firefox-3.5*/chrome/
$sudo cp browser-branding-en-US.jar /d2tmp/ffbrandnew/
$sudo unzip /d2tmp/ffbrandnew/browser-branding-en-US.jar -d /d2tmp/ffbrandnew/
$sudo rm -f -r /d2tmp/ffbrandnew/browser-branding-en-US.jar
$sudo sed -i "s/<\!ENTITY brandShortName \"Shiretoko\">/<\!ENTITY brandShortName \"Firefox\">/g" /d2tmp/ffbrandnew/locale/branding/brand.dtd
$sudo sed -i "s/<\!ENTITY brandFullName \"Shiretoko\">/<\!ENTITY brandFullName \"Mozilla Firefox\">/g" /d2tmp/ffbrandnew/locale/branding/brand.dtd
$sudo sed -i "s/<\!ENTITY vendorShortName \"mozilla.org\">/<\!ENTITY vendorShortName \"Mozilla\">/g" /d2tmp/ffbrandnew/locale/branding/brand.dtd
$sudo sed -i "s/<\!ENTITY releaseBaseURL \"http:\/\/www.mozilla.org\/projects\/shiretoko\/releases\/\">/ /g" /d2tmp/ffbrandnew/locale/branding/brand.dtd
$sudo sed -i "s/brandShortName=Shiretoko/brandShortName=Firefox/g" /d2tmp/ffbrandnew/locale/branding/brand.properties
sudo sed -i "s/brandFullName=Shiretoko/brandFullName=Mozilla Firefox/g" /d2tmp/ffbrandnew/locale/branding/brand.properties
$sudo sed -i "s/vendorShortName=mozilla.org/vendorShortName=Mozilla/g" /d2tmp/ffbrandnew/locale/branding/brand.properties
$cd /d2tmp/ffbrandnew/
$sudo zip -r browser-branding-en-US.jar locale
$sudo cp /d2tmp/ffbrandnew/browser-branding-en-US.jar /usr/lib/firefox-3.5*/chrome/
$cd /usr/bin/
$sudo rm -f -r /d2tmp/
$sudo rm -f -r firefox
$sudo ln -s firefox-3.5 firefox
$sudo sed -i "s/Name=Shiretoko Web Browser/Name=Firefox 3.5 Web Browser/g" /usr/share/app-install/desktop/firefox-3.5.desktop
$sudo sed -i "s/Comment=Firefox 3.5 Beta/Comment=Browse the World Wide Web/g" /usr/share/app-install/desktop/firefox-3.5.desktop
$sudo sed -i "s/GenericName=Preview Browser/GenericName=Web Browser/g" /usr/share/app-install/desktop/firefox-3.5.desktop
$sudo sed -i "s/Name=Shiretoko Web Browser/Name=Firefox 3.5 Web Browser/g" /usr/share/applications/firefox-3.5.desktop
$sudo sed -i "s/Comment=Firefox 3.5/Comment=Browse the World Wide Web/g" /usr/share/applications/firefox-3.5.desktop
$sudo sed -i "s/GenericName=Preview Browser/GenericName=Web Browser/g" /usr/share/applications/firefox-3.5.desktop


To download text version of commands, click here (direct download).

This is tested on Ubuntu Jaunty.

5 comments:

Mentis said...

Oh man, you are superb! Thx =)

Sid said...

Oh great!. It was irritating to have Shiretoko or something else. Your help was badly needed. Thanks a lot.

Solanky said...

download link is not working

Anonymous said...

This is awesome! Worked as a charm. Thanks!

picklemonkey said...

thank you!

Post a Comment