HOWTO: Install Iceweasel 4.0 in LMDE

Archived topics about LMDE 1 and LMDE 2
Locked
cwgtex

HOWTO: Install Iceweasel 4.0 in LMDE

Post by cwgtex »

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 LockBot on Wed Dec 28, 2022 7:16 am, edited 5 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
kwevej

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by kwevej »

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

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by cwgtex »

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?
kwevej

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by kwevej »

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.
cwgtex

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by cwgtex »

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.
kwevej

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by kwevej »

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 ;)
cwgtex

Re: HOWTO: Install Iceweasel 4.0 in LMDE

Post by cwgtex »

Very interesting. Thanks kwevej for the lesson! :D
Locked

Return to “LMDE Archive”