install browser

Booting, installing, newbie
Post Reply
Message
Author
sfl7fl
Posts: 25
Joined: Fri 12 Jun 2009, 00:28
Location: tampa bay
Contact:

install browser

#1 Post by sfl7fl »

when i install firefox from online. it is created in it's own folder. how do i get the system to see it as a default browser and set it up in appropriate directories to better integrate it to puppy? :oops: i know with .deb files these do the work for me. but i want to know how. thanks, john

User avatar
DaveS
Posts: 3685
Joined: Thu 09 Oct 2008, 16:01
Location: UK

Re: install browser

#2 Post by DaveS »

sfl7fl wrote:when i install firefox from online. it is created in it's own folder. how do i get the system to see it as a default browser and set it up in appropriate directories to better integrate it to puppy? :oops: i know with .deb files these do the work for me. but i want to know how. thanks, john
It might be easiest to look here:
http://www.murga-linux.com/puppy/viewtopic.php?t=46390
Spup Frugal HD and USB
Root forever!

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: install browser

#3 Post by DMcCunney »

sfl7fl wrote:when i install firefox from online. it is created in it's own folder. how do i get the system to see it as a default browser and set it up in appropriate directories to better integrate it to puppy? :oops: i know with .deb files these do the work for me. but i want to know how. thanks, john
It doesn't really matter what directory Firefox installs to.

When you install the browser, it puts the main code in a directory (probably /usr/lib/firefox). That directory contains a script called firefox that actually runs the browser and loads firefox-bin which is the actual program. The install process creates a symlink of that script into /usr/bin. /usr/bin is in your $PATH, so you can type "firefox" in a terminal window to run it.

Other Puppy functions rely on a definition of the default applications for that function. These are all defined in shell scripts in /usr/local/bin with names like defaultbrowser or defaulttexteditor.

defaultbrowser is a two line script:

Code: Select all

#!/bin/sh
exec mozstart "$@"
That script executes mozstart, which is another script that runs SeaMonkey, the default browser shipped with FF.

To get Firefox seen as the default browser, edit the defaultbrowser script to make it

Code: Select all

#!/bin/sh
exec firefox "$@"
As long as a symlink to the firefox script is in a directory in your $PATH, Firefox ought to be run when you do something like click the browser icon on the desktop in JWM.

For that matter, you could edit the defaultbrowser script to provide a full path to the firefox script:

Code: Select all

#!/bin/sh
exec /usr/lib/firefox/firefox "$@"
and not care about the firefox script being in the $PATH unless you needed to run it from a terminal.

The same procedure holds true for any of the other default scripts in /usr/local/bin. You can modify them to substitute your preferred application for what FF uses by default.
______
Dennis

sfl7fl
Posts: 25
Joined: Fri 12 Jun 2009, 00:28
Location: tampa bay
Contact:

Re: install browser

#4 Post by sfl7fl »

When you install the browser, it puts the main code in a directory (probably /usr/lib/firefox). That directory contains a script called firefox that actually runs the browser and loads firefox-bin which is the actual program. The install process creates a symlink of that script into /usr/bin. /usr/bin is in your $PATH, so you can type "firefox" in a terminal window to run it.

thankyou, i use xarchiver to extract firefox and it goes to a temp folder, i move it to 'opt' for instance, is this correct? thanks john

User avatar
Béèm
Posts: 11763
Joined: Wed 22 Nov 2006, 00:47
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

#5 Post by Béèm »

Have the path in the defaultbrowser to firefox reflect the real path. So /opt/.......
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
[url=http://puppylinux.org/wikka/HomePage]Consult Wikka[/url]
Use peppyy's [url=http://wellminded.com/puppy/pupsearch.html]puppysearch[/url]

DMcCunney
Posts: 889
Joined: Tue 03 Feb 2009, 00:45

Re: install browser

#6 Post by DMcCunney »

sfl7fl wrote:
When you install the browser, it puts the main code in a directory (probably /usr/lib/firefox). That directory contains a script called firefox that actually runs the browser and loads firefox-bin which is the actual program. The install process creates a symlink of that script into /usr/bin. /usr/bin is in your $PATH, so you can type "firefox" in a terminal window to run it.
thankyou, i use xarchiver to extract firefox and it goes to a temp folder, i move it to 'opt' for instance, is this correct? thanks john
If you prefer. As mentioned, it doesn't matter where it lives. You can put it under /opt/firefox if desired. You just need a symlink in a directory in your $PATH, and to change the defaultbrowser script to point to it.

Caveat: this assumes a new install, when you didn't have Firefox installed before. If you did, and this is an upgrade, you are better served by extracting over your existing firefox directory. This will simply update the firefox code to the latest version.

Your bookmarks, Firefox config data, extensions, themes and the like are stored in a profile directory which is elsewhere and untouched by the upgrade.
______
Dennis

sfl7fl
Posts: 25
Joined: Fri 12 Jun 2009, 00:28
Location: tampa bay
Contact:

Re: install browser

#7 Post by sfl7fl »

If you prefer. As mentioned, it doesn't matter where it lives. You can put it under /opt/firefox if desired. You just need a symlink in a directory in your $PATH, and to change the defaultbrowser script to point to it.
okay I am learning,, i found this command online. (see below,) and ran it,

# echo $PATH
/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R7/bin:/root/my-applications/bin:/opt/samba/bin

so these are all directories in my $PATH and it doesn't matter if the actual program is there. a symbolic link in any one is enough?

ill stop for now to let this soak in.

Post Reply