LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices



Reply
 
Search this Thread
Old 01-19-2008, 01:41 AM   #1
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Rep: Reputation: 70
Swiftfox slackbuild script


I created a slackbuild script for swiftfox so that it is very convenient to install your own optimized build of Firefox in a Slackware package. You can download the tarball and checksum here.

It is not going to be hosted at Slackbuilds.org because the source you need to download to use with this is different depending on your architecture. Thus, it doesn't really fit the setup that slackbuilds.org has. Robby Workman from slackbuilds.org did take a look at this script, however (and improved on it).

A note on Plugins... - Updated!
I recently changed this SlackBuild so that it simply adds /usr/lib/mozilla/plugins to the plugin path. This is actually what the Official Firefox SlackBuild script does. This is accomplished by adding a small section to the swiftfox calling script (/opt/swiftfox/swiftfox) via a patch. The original is backed up as swiftfox.orig.

If you would like the SlackBuild to copy plugins from the firefox (or mozilla) plugins directory during installation you can uncomment a line in the script.


Incompatible Add-ons in Firefox 3
This is not an issue specific to Swiftfox, but is instead due to the fact that many add-on developers have not updated their add-ons for Firefox 3.

If the extension has a maxversion anywhere in 3.0 then it will most likely work in the newest beta releases. Even older extensions may work, so it is often worth the little time needed to test this. For help in making "incompatible" add-ons compatible please see this thread at the swiftfox forums.

If you like to dabble more in add-on hacking/developing then please see mozilla's page on Updating extensions for Firefox 3.


Currently, the swiftfox downloads are focusing on Firefox 3, but you can still download 2.0 if you look a little harder on their site. Note, that you can test Firefox 3 using swiftfox while still using your official Slackware Firefox 2 package! If you like swiftfox so much and you don't feel like changing your firefox shortcuts to point to it, you can just change /usr/bin/firefox to open swiftfox.

Be sure to check out the new features in 3.0.


Getting the Older Versions
You can download Swiftfox 2.0.0.11 at http://forums.getswiftfox.com/viewtopic.php?t=285. The slackbuild should work with any version (assuming you use it correctly).
The newest 2.0 trunk release can be found at http://getswiftfox.com/br18.htm.

Take careful note of the filenames of any downloads from the 2.0.0.*pre-* series as they tend to have filenames (such as swiftfox.en-US.linux-amd.tar.bz2) that break away from the normal convention. My suggestion is to manually rename these files as they should be (eg. swiftfox-2.0.0.13pre-1-amd.tar.bz2) before using this SlackBuild.


Other Notes
Make sure Firefox is closed before trying to run swiftfox or you will just open another Firefox window.

Please check the slackbuilds.org how-to if you are unsure how to use a slackbuild.

I'd like to thank Robby Workman for his contributions to this slackbuild.

Enjoy!

Last edited by shadowsnipes; 03-08-2008 at 10:48 AM. Reason: changed download location slightly
 
Old 01-19-2008, 02:17 AM   #2
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
In the SlackBuild script it says

VERSION=3.0b3pre_4

The package I downloaded was called

swiftfox-3.0b3pre-4-athlon-xp.tar.bz2

Notice the pre_4 compared to pre-4. The script did run without errors. I'm not sure why so maybe it doesn't matter.
 
Old 01-19-2008, 02:23 AM   #3
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
VERSION is used primarily in the package name.

This is the line in the script that unpacks the source.
Code:
tar xvf $CWD/$PRGNAM-$(echo $VERSION | tr _ -)-$ARCH.tar.bz2 -C $PKG/opt
Notice the
Code:
$VERSION | tr _ -
tr (text replace) replaced the '_' with -. This is much more efficient than keeping track of two variables.

Edit: I just want to clarify why the underscore is used in the first place. As I mentioned previously, VERSION is directly used in the package name. Dashes in a slackware package name denote different parts of the package name. So for instance,

swiftfox-3.0b3pre_4-pentium4-1_SBo.tgz

would be

PRGMNAME-VERSION-ARCH-BUILDTAG.tgz

If you had a dash at 'pre-4' this would not follow correct convention and might confuse the package manager or at least confuse someone looking at the package name.

Last edited by shadowsnipes; 01-19-2008 at 02:30 AM. Reason: clarify why _ instead of -
 
Old 01-19-2008, 02:31 AM   #4
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Yes, I noticed that. I wasn't familiar with tr. Now I am.
 
Old 01-19-2008, 05:05 AM   #5
Alien_Hominid
Senior Member
 
Registered: Oct 2005
Location: Lithuania
Distribution: Hybrid
Posts: 2,247

Rep: Reputation: 53
Could you tell me, why there are different builds for different CPUs? Isn't optimization done at compile time? Wouldn't Pentium IV work on Prescott (which is Pentium IV)?
 
Old 01-19-2008, 09:24 AM   #6
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
I would think that the amount of optimization you can achieve by changing the code is much more than what you can achieve by the gcc params.
 
Old 01-19-2008, 09:27 AM   #7
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
I want something like this for linux ... http://firefox-ultimate-optimizer.en.softonic.com/

reduce firefox memory usage to a couple of hundred KB.
 
Old 01-19-2008, 09:35 AM   #8
duryodhan
Senior Member
 
Registered: Oct 2006
Distribution: Slackware 12 Kernel 2.6.24 - probably upgraded by now
Posts: 1,054

Rep: Reputation: 46
1. I had to make the package as root , as normal user it said "Changing Perms : Operation Not Permitted"

2. I installed it , when I type swiftfox , it opens, About Mozilla Firefox says it is Firefox 2.0.0.4 (the one I have ) although I installed the 3 version.

I don't use slackbuilds much, so forgive my ingnorance, but whats wrong in what i did ?
 
Old 01-19-2008, 12:45 PM   #9
Inuit-Uprising
LQ Newbie
 
Registered: Aug 2007
Distribution: Slackware 12.0
Posts: 22

Rep: Reputation: 15
Is Swiftfox noticeably faster than firefox and worthy of replacement?
 
Old 01-19-2008, 02:26 PM   #10
simcox1
Member
 
Registered: Mar 2005
Location: UK
Distribution: Slackware
Posts: 794
Blog Entries: 2

Rep: Reputation: 30
Most themes/addons don't work with firefox 3.x. I'm sticking with firefox 2. Otherwise I didn't notice much difference.
 
Old 01-19-2008, 02:34 PM   #11
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by Alien_Hominid View Post
Could you tell me, why there are different builds for different CPUs? Isn't optimization done at compile time? Wouldn't Pentium IV work on Prescott (which is Pentium IV)?
The files you download from swiftfox's website are binaries that have been compiled with the highest level of optimization possible including some optimization for specific microprocessor architectures. The slackbuild script is more like the slackbuild script for OpenOffice in that it doesn't actually compile the program, but just packages it in a nice way for us. Otherwise, it would be just as useful to download the vanilla firefox source from Mozilla.

The wikipedia article on swiftfox has some good information. The swiftfox website used to have more information, but it seems they slimmed it down quite a bit in the past month.

Quote:
Originally Posted by duryodhan View Post
1. I had to make the package as root , as normal user it said "Changing Perms : Operation Not Permitted"

2. I installed it , when I type swiftfox , it opens, About Mozilla Firefox says it is Firefox 2.0.0.4 (the one I have ) although I installed the 3 version.

I don't use slackbuilds much, so forgive my ingnorance, but whats wrong in what i did ?
This is an exert from the SlackBuild HowTo
Step 3 - Execute the SlackBuild Script (as root)

The reason for this is as you saw. Non root users don't have permission to install files in places like /opt and /usr/bin

As far as why swiftfox opened firefox instead: You probably still had firefox open when you executed swiftfox. You can't have them both open at the same time like you can with SeaMonkey and Firefox. Close firefox and then execute swiftfox.

If that doesn't do it then it might take a little investigating. Please show the output of
Code:
ls -l $(which swiftfox)
and
Code:
cat /var/log/scripts/swiftfox*
Quote:
Originally Posted by Inuit-Uprising View Post
Is Swiftfox noticeably faster than firefox and worthy of replacement?
In my experience swiftfox is indeed faster than firefox. This is especially true for me when I load multiple pages. Sometimes some of this speed isn't completely true as pages load very fast but they still aren't completely ready for you to interact with them. They wouldn't be ready in firefox either, though, so this quicker view of pages allows more time for reading and less waiting. My suggestion, if you want to compare Firefox speed to Swiftfox speed is to use the same versions for both and use one of them for a couple of days and then switch. You will very likely notice a difference in favor of swiftfox. You can find swiftfox 2.0.0.11 at http://forums.getswiftfox.com/viewtopic.php?t=285

Now the good thing is that you don't have to replace firefox to use swiftfox. When I first started using it back when Slackware 12 was released I switched between the two often. Official Slackware packages for Firefox always came a bit later than the official releases and during those times I happily switched to swiftfox. I soon realized I liked it better and I like the fact that the swiftfox builds also let me preview the upcoming firefox releases. Right now you can download 2.0.0.12 and 3.0bpre-4 from the swiftfox site. 2.0.0.12 is just the next security update, of course, but 3.0bpre-4 is a really good beta. Check out some of the new features in 3.0.

Please note, there are some (temporary) disadvantages to using a beta and it pretty much boils down to extensions and themes. Not all the extension and theme developers have released versions compatible with 3.0, so you might find some of them being disabled for you. If you switch back to 2.0 you can use them again.

If this process bothers you you can always create a new profile to test 3.0 with. Try running swiftfox -P or swiftfox -ProfileManager. If you don't have the profile manager ask you every time you will have to manually choose the profile with the -P switch or it will simply load the last one you used regardless of what version/build of firefox you load!

On my system I have Firefox 1.5, the official Slackware Firefox 2.0 package, and the Swiftfox 3.0 package installed on my system. I have separate profiles for each of them and have defined shortcuts so that the appropriate one automatically loads. I even share a profile between Windows and Linux. If people are interested I can submit a thread on how I do this.

In short, if people want to simply try out Swiftfox and compare it to Firefox, then they should download 2.0.0.11 version (or whatever version is equal to the Official Slackware Firefox package that you are using...). Otherwise you can use Swiftfox to try out the upcoming Firefox 3.0. If you want to have all your Firefox shortcuts point to Swiftfox simply change /usr/bin/firefox to point to /opt/swiftfox/swiftfox. I actually don't use a symbolic link, but I changed my /usr/bin/firefox to be a short script that selects swiftfox or firefox (depending on which one isn't commented out) and it chooses my profile.

I'll add a link to the 2.0.0.11 version in my first post and also mention that Firefox must be closed in order to use Swiftfox.
 
Old 01-19-2008, 03:03 PM   #12
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by simcox1 View Post
Most themes/addons don't work with firefox 3.x. I'm sticking with firefox 2. Otherwise I didn't notice much difference.
It is true that many extensions and themes are not currently compatible with 3.0, but this will change as the addon devs catch up. Some addons only need a maxversion change and this is easy to change yourself. If you see that the max version has 3.0a or something similar in it then you can most likely safely change it so that the 3.0b will work with it. Some that have a maxversion at 2.0 might even work depending on what interfaces it uses (This is only likely, however, if the addon is no longer being updated). This page on Updating Firefox extensions for 3.0 may be of interest for those looking to manually update their extensions to work with 3.0.

If you didn't see any differences from 2.0 to 3.0 then I suggest you check out the new features in 3.0 and try them out. Just writing it off without giving it a good go just sounds like a way to create a lot of frustrated developers.

My favorite new 3.0 features are:
Overhauled bookmark and history system - really look into this. It's great. They can be tagged and organized much easier now, not to mention the new "Smart Bookmarks".

New Download Manager - try right clicking on a download and see all the new options like being able to go back to the original download page

Full page zoom - actually scales images properly now!

Text selection improvements - try selecting multiple ranges of text in 2.0!

Plugin management - you can easily disable/enable plugins from the addons menu

While some of these, including other new features like session resuming and download resuming can be accomplished using extensions, some cannot. 3.0 fixes a lot of memory leaks from 2.0 as well, so it should run more efficiently.

Last edited by shadowsnipes; 01-19-2008 at 03:05 PM. Reason: added commas
 
Old 01-19-2008, 04:16 PM   #13
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by duryodhan View Post
I want something like this for linux ... http://firefox-ultimate-optimizer.en.softonic.com/

reduce firefox memory usage to a couple of hundred KB.
That would be easy to implement in Linux though I don't think Linux (nor Windows) users would really want it if they knew what it actually does.

That program, as far as I can tell, basically just clears the working set of memory and forces it to virtual memory instead. While this may free up some RAM temporarily on your machine, Firefox will have a performance hit and there will be CPU overhead.

Most people tend to upgrade their older machine's RAM before the CPU so it is unlikely that people with older machines would really want this. Besides, CPU time is precious- especially on older machines.

You should read some of the comments at this gHacks.net article.

Here is a page about reducing memory usage in Firefox.

Also, the RAMback extension for Firefox 3.0 appears to do something similar to what this .NET based "ultimate optimizer" does.

Firefox/Swiftfox is one of my most used programs, and I'd much rather use other programs with lower memory footprints than make Firefox potentially use swap.

As a side note, those of you looking to speed up the time it takes Firefox to start should look into pre-loading it into memory. Konqueror in KDE does this, which is part of the reason it starts so fast. This has already been done for Firefox, but I don't remember the link to information about it.
 
Old 01-19-2008, 06:32 PM   #14
adriv
Member
 
Registered: Nov 2005
Location: Diessen, The Netherlands
Distribution: Slackware 14.1
Posts: 661

Rep: Reputation: 38
You can tweak and speed-up Firefox a lot too: http://forums.mozillazine.org/viewtopic.php?t=53650

I've tried Swiftfox a little while ago and wasn't very impressed, to be honest. The only difference I noticed was the slightly better handling of embedded media. Disadvantage was that not all FF plug-ins work in Swiftfox.

Quote:
Originally Posted by duryodhan
reduce firefox memory usage to a couple of hundred KB.
FF3.* uses less memory.
 
Old 01-19-2008, 07:12 PM   #15
shadowsnipes
Senior Member
 
Registered: Sep 2005
Distribution: Slackware
Posts: 1,442

Original Poster
Rep: Reputation: 70
Quote:
Originally Posted by adriv View Post
[...]Disadvantage was that not all FF plug-ins work in Swiftfox.
Which ones didn't work for you? I have not had this problem so far so I am curious.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Java plugin and swiftfox B407 Linux - Software 4 12-14-2006 05:29 AM
Swiftfox rocks masonm Linux - Software 6 08-29-2006 07:34 PM
Extensions Don't Work In Swiftfox Red Knuckles Suse/Novell 3 07-19-2006 09:53 PM
No Plugins In Swiftfox. Red Knuckles Suse/Novell 2 06-28-2006 04:11 PM
Trouble with my first SlackBuild script Yalla-One Slackware 6 06-10-2006 03:03 PM


All times are GMT -5. The time now is 07:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration