HOWTO: Install Iceweasel 4.0 in LMDE

Questions about applications and software
Forum rules
Before you post please read how to get help

HOWTO: Install Iceweasel 4.0 in LMDE

Postby cwgtex on Wed Apr 20, 2011 2:28 pm

Instead of waiting for Firefox to be updated to 4.0, you can install Iceweasel 4.0. It is the same thing, just without the Firefox branding. Plus, its cool to be different. 8) I followed the instructions here: http://mozilla.debian.net/

However, it wouldn't install right away. I had to force libcairo2 to use the version from the backports repo instead of the mint repo. Then it worked.

A few weeks later, I was reinstalling LMDE on my laptop, I decided I wanted to automate this process with a script.

Code: Select all
#!/bin/sh
# This is a script to install Iceweasel 4.0 on LMDE (64bit).
# Written by cwgtex on 20 April 2011.

echo "*** Step 1: Adding the backports repo ***"
echo "# ICEWEASEL BACKPORT\ndeb http://mozilla.debian.net/ squeeze-backports iceweasel-4.0" > /etc/apt/sources.list.d/iceweasel4.list
echo "............COMPLETE"

echo "*** Step 3: Installing debian-keyring package ***"
apt-get install debian-keyring
echo "............COMPLETE"

echo "*** Step 3: Grabbing the signed key and updating ***"
wget -O- -q http://mozilla.debian.net/archive.asc | gpg --import
gpg --check-sigs --fingerprint --keyring /usr/share/keyrings/debian-keyring.gpg 06C4AE2A
gpg --export -a 06C4AE2A | sudo apt-key add -
apt-get update
echo "............COMPLETE"

echo "*** Step 4: Install iceweasel and dependencies ***"
apt-get install -t squeeze-backports libcairo2 xulrunner-2.0 libmozjs4d iceweasel
echo "............COMPLETE"

exit 0


Save the above to a text file with a ".sh" at the end. I named mine "icey.sh".
Give your script execute permission:
Code: Select all
chmod 755 ./icey.sh

Then run the script as root:
Code: Select all
sudo ./icey.sh

Enjoy! :)
Last edited by cwgtex on Sat Apr 30, 2011 8:12 pm, edited 4 times in total.
"If it ain't broke, fix it till it is." - Anonymous 33W
User avatar
cwgtex
Level 1
Level 1
 
Posts: 17
Joined: Sun Jan 09, 2011 9:19 pm
Location: San Antonio, TX

Linux Mint is funded by ads and donations.
 

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby kwevej on Thu Apr 21, 2011 5:11 am

add this at the first line
#!/bin/sh
and you'll be fine with sudo ~/icey.sh
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby cwgtex on Thu Apr 21, 2011 1:42 pm

kwevej wrote:add this at the first line
#!/bin/sh
and you'll be fine with sudo ~/icey.sh


It works either way for me, with or without the #!/bin/sh line. I am actually new to bash scripting, I am in the process of teaching myself right now. Is including that line required or is it just considered a good practice?
"If it ain't broke, fix it till it is." - Anonymous 33W
User avatar
cwgtex
Level 1
Level 1
 
Posts: 17
Joined: Sun Jan 09, 2011 9:19 pm
Location: San Antonio, TX

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby kwevej on Thu Apr 21, 2011 5:39 pm

cwgtex wrote:Is including that line required or is it just considered a good practice?


It's quite important ..for instance if it'd be a python script #!/usr/bin/python
also you can run a script by sh or bash which is slightly different.

It's even more important if you'd be using another interactive shell than bash. For instance fish. Then the 'header' is necessary.
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby cwgtex on Thu Apr 21, 2011 6:02 pm

Thanks kwevej for the quick lesson. That all makes sense. I edited the post to include that.

Speaking of, what is the difference between these commands?
Code: Select all
sudo ./icey.sh
sudo sh ./icey.sh
sudo bash ./icey.sh

This one reason why I love using Linux, I'm always learning new stuff.
"If it ain't broke, fix it till it is." - Anonymous 33W
User avatar
cwgtex
Level 1
Level 1
 
Posts: 17
Joined: Sun Jan 09, 2011 9:19 pm
Location: San Antonio, TX

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby kwevej on Thu Apr 21, 2011 7:03 pm

sudo ./icey.sh
- executes the file by the interpreter according to the header or (if there is none) in the default shell (bash).

sudo sh ./icey.sh
- executes the script by the sh/dash interpreter (dash is a minimal shell that is primarily meant to meet POSIX bourne shell standards (i.e. BSD's /bin/sh). It doesn't support autocompletion or command history)
Code: Select all
ls -la /bin/sh
lrwxrwxrwx 1 root root 4 Dec 20 14:36 /bin/sh -> dash*

sudo bash ./icey.sh
- executes the script by the bash interpreter

---
Finally a small example - an executable testme
Code: Select all
#!/usr/bin/python
print "Hello, World!"


Code: Select all
k@mint ~> ./testme
Hello, World!
interpreted by Python, as it should be

Code: Select all
k@mint ~> sh ./testme
Warning: unknown mime-type for "Hello, World!" -- using "application/octet-stream"
Error: no such file "Hello, World!"
..upsss ;)
User avatar
kwevej
Level 5
Level 5
 
Posts: 624
Joined: Mon Mar 22, 2010 3:35 pm
Location: Delft / Prague [@ LMDE]

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Postby cwgtex on Thu Apr 21, 2011 9:09 pm

Very interesting. Thanks kwevej for the lesson! :D
"If it ain't broke, fix it till it is." - Anonymous 33W
User avatar
cwgtex
Level 1
Level 1
 
Posts: 17
Joined: Sun Jan 09, 2011 9:19 pm
Location: San Antonio, TX

Linux Mint is funded by ads and donations.
 

Return to Software & Applications

Who is online

Users browsing this forum: Bing [Bot] and 4 guests