How to change default browser from Mozilla to Firefox?

Booting, installing, newbie
Post Reply
Message
Author
Retina
Posts: 21
Joined: Fri 12 Aug 2005, 11:31

How to change default browser from Mozilla to Firefox?

#1 Post by Retina »

Is there any other way to change my default browser from Mozilla to Firefox?

It gets a bit annoying to have to go into Rox, then my-documents, then firefox installer, then actual firefox.

:S

Bruce B

#2 Post by Bruce B »

This works for me:
  • 1) I drag and drop (in rox) the firefox file to the desktop and then add an firefox icon to make it look nice

    2) I make a bash alias called fox which simply has the direct path to firefox
Another thing you can do is change the symlink /usr/bin/firefox and have it point to firefox instead of mozstart. This way your menu items should open firefox instead of mozilla

zenkalia
Posts: 14
Joined: Fri 22 Jul 2005, 20:24

#3 Post by zenkalia »

can you explain this symlink thing better? the wiki is lacking, right now =[
omg i wish i were more of a nerd... =[

Bruce B

#4 Post by Bruce B »

zenkalia wrote:can you explain this symlink thing better? the wiki is lacking, right now =[
Due to the fact that I didn't explain it at all, I'm confident I can explain it better. The question is: can I explain it well enough? I doubt it, but I'll give it a try.

----------

In Puppy the command line utility for making symlinks is a symlink called ln.
I think ROX can make 'em, but I've not tried it. Midnight Command can make em also.

In my own words I'd describe symlink as a file which is an alias that points
to another file or directory. It is treated by the operating system and
programs as if it were the file.

Symlinks can be created in command line mode by a utility called ls.

If you type ln at the command prompt you will get this output:
  • BusyBox v0.60.5 (2004.09.18-02:04+0000) multi-call binary

    Usage: ln [OPTION] TARGET... LINK_NAME|DIRECTORY

    Create a link named LINK_NAME or DIRECTORY to the specified TARGET

    You may use '--' to indicate that all following arguments are non-options.

    Options:

    -s make symbolic links instead of hard links
    -f remove existing destination files
    -n no dereference symlinks - treat like normal file
-----------------

Symlinks are very common in Linux and the concept should be understood as
well as a practical howto make em.

Symlinks are used extensively in /lib, lets take a look at a few, as ls
displays them:

22 Aug 13 13:36 libnss_compat.so.2 -> libnss_compat-2.3.2.so
13980 Jun 14 2004 libnss_dns-2.3.2.so
13 13:36 libnss_dns.so.2 -> libnss_dns-2.3.2.so
34516 Jun 14 2004 libnss_files-2.3.2.so

Notice the ->

That is saying that the file is a link and points another file. In the case of
libnss_dns.so.2, if an application or routine wants to use
libnss_dns.so.2 it will find it and attempt to use it. In actual practice,
it will be using libnss_dns-2.3.2.so

Why do it this way? In the case of libraries, you don't need duplicate files.
libnss_dns-2.3.2.so is only 13 bytes but the libary it points to is 13980 bytes.

There are many, many other reasons to use symlinks.

Linux for example, has some standards for directory locations. /etc is an
important and standard directory. Puppy is a Linux distro that does
have a /etc directory, yet needs one.

So Barry made a symlink called /ect which actually points to a hidden directory
called /root/.etc

Linux works fine, because it looks for /etc and finds it and it's expected
contents, even thougn in reality it doesn't exist where it seems to be.

In the case of firefox on my computer, the operating system, menu, and other
applications cannot find it because they don't know where I put it.

Firefox is in /mnt/hda7/shared/firefox/firefox on my computer.

Linux will only look for executable file in the path statement, Defined in
/root/.etc/profile on the top line. Firefox is not located in these locations
and Linux cannot find it, because it is not going to look beyond the path
statement to find it.

If you want to see where Linux will look for executable files type this
command:

echo $PATH

On most Puppys the output is this:

/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin:/root/my-applications/bin

Suppose I want Puppy to find firefox without having it in the path. I make a
smylink as follows:

ln -s /mnt/hda7/shared/firefox/firefox /root/my-applications/bin/

After doing this Puppy will find the symlink called firefox, which is located
in /root/my-applications/bin, which is in the path and Puppy will run it where it is
actually located in /root/my-applications/bin even though it is not.
Last edited by Bruce B on Mon 15 Aug 2005, 20:03, edited 2 times in total.

Bruce B

#5 Post by Bruce B »

In reading my post, I recognized that it needs an addendum.

This statement is true but not exactly:

After doing this Puppy will find the symlink called firefox, which is located
in /root/my-applications/bin, which is in the path and Puppy will run it where it is
actually located ion /root/my-applications/bin even though it is not.


What Puppy will actually do is search the path statement from left to right and if it finds any executable firefox it will run it and only it. In other words Linux searches the path statement in an order and acts on the first match it finds.

When Puppy is first installed there will be a symlink in the path called firefox, even though there is not a firefox installed.

In the example I gave with the symlink in /root/my-applications/bin, it will work only if Linux doesn't stumble on another firefox first and it will in this specific case.

Q: How do you know the sequence Puppy uses to look for executable files?

A: By viewing the path statement with the understanding that the search is left to right.

Q: How do you know if as in this example if there is another firefox in the path before /root/my-documents/bin ?

A: You can type which firefox
If there is a firefox executable in the path, which will display the full path name of the first one it finds. If that firefox is before the firefox in /root/my-applications/bin, Puppy will run it and not the symlink in /root/my-applications/bin

Q: What to do?
A: I delete Puppy's default firefox. I could overwrite it also. I could put my firefox link before the default firefox link.

FYI - Puppy's firefox symlink will probably run Mozilla. If you download the Links browser, according to my memory it will run Links.

Summary: It was probably good that I elaborated this somewhat, because not understanding how Linux finds executable files can drive you crazy, when you are trying to do something like make an executable symlink.

Post Reply