Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 02 Sep 2014, 13:39
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
How to change default browser from Mozilla to Firefox?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
Retina

Joined: 12 Aug 2005
Posts: 21

PostPosted: Sat 13 Aug 2005, 15:58    Post subject:  How to change default browser from Mozilla to Firefox?  

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
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11092
Location: The Peoples Republic of California

PostPosted: Sat 13 Aug 2005, 16:32    Post subject:  

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
Back to top
View user's profile Send private message 
zenkalia

Joined: 22 Jul 2005
Posts: 14

PostPosted: Mon 15 Aug 2005, 07:55    Post subject:  

can you explain this symlink thing better? the wiki is lacking, right now =[
_________________
omg i wish i were more of a nerd... =[
Back to top
View user's profile Send private message AIM Address 
Bruce B


Joined: 18 May 2005
Posts: 11092
Location: The Peoples Republic of California

PostPosted: Mon 15 Aug 2005, 15:20    Post subject:  

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, 16:03; edited 2 times in total
Back to top
View user's profile Send private message 
Bruce B


Joined: 18 May 2005
Posts: 11092
Location: The Peoples Republic of California

PostPosted: Mon 15 Aug 2005, 15:52    Post subject:  

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.
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0646s ][ Queries: 12 (0.0082s) ][ GZIP on ]