HOWTO find the mozilla libraries gxine depends on:

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

HOWTO find the mozilla libraries gxine depends on:

#1 Post by mcewanw »

Author: William McEwan (puppy linux forum member mcewanw). Revision 1, 07Sept2007.

Background: Some forum members [myself included] would like to remove the seamonkey browser from, for example, the Puppy 2.17.1 distribution in order to remaster a leaner puppy on which to install the browser of their choice. See for example forum thread: http://www.murga-linux.com/puppy/viewto ... 57&t=21387

However, the gxine multimedia player used in Puppy 2.17.1 stops working if you simply delete the main seamonkey directories (/usr/lib/seamonkey-1.0.8 and ) because it is dependent on some of the libraries there.

Fortunately, the following forum threads (at least) independently document which libraries you need to leave:

http://www.murga-linux.com/puppy/viewto ... 1&start=15
[in the above thread plinej also explains how to get firefox working correctly with gxine by using symlinks to the essential seamonkey libraries. There is also a reference to keeping the plugins, such as the flash-related ones for use in the firefox plugins directory]

http://www.murga-linux.com/puppy/viewto ... 80dbd1cf70
[in this MU also explains how to get firefox working with gxine, but adopts a slightly different technique involving a wrapper script for gxine]

Anyway, thanks to plinej's suggestions above I was successfully able to create my leaner Puppy 2.17 and I now use Firefox as my current browser of choice in Puppy 2.17.1.

You might wonder how such dependencies can be found in case you come across similar problems with other applications.
The following illustrates one method, using the commandline in an rxvt terminal of an unmodified Puppy 2.17.1.

1. First, find where gxine is on your system by entering:

# which gxine
/usr/local/bin/gxine

2. Now use ldd to find all dependencies, piping the result through grep to search for those concerning mozilla:

# ldd /usr/local/bin/gxine | grep mozilla
libmozjs.so => /usr/lib/mozilla/libmozjs.so (0xb7ad9000)
libplds4.so => /usr/lib/mozilla/libplds4.so (0xb7723000)
libplc4.so => /usr/lib/mozilla/libplc4.so (0xb771e000)
libnspr4.so => /usr/lib/mozilla/libnspr4.so (0xb76e8000)

[that is, gxine depends on the availability of the above four mozilla library files]

3. Using the command ls -al reveals that /usr/lib/mozilla is actually a symbolic link to the real location of the seamonkey files (i.e. /usr/lib/seamonkey-1.0.8 ):

# ls -al /usr/lib/mozilla
lrwxrwxrwx 1 root root 15 2007-07-19 15:01 /usr/lib/mozilla -> seamonkey-1.0.8

Hope that throws some extra light on the matter! :-)
User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#2 Post by trapster »

Thanks for the info.

How much space is actually saved by shaving the seamonkey files??
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

re: Saved space

#3 Post by mcewanw »

Good question!...

Sorry for the delay in responding, but I had to measure a few things. The main figures are:

Original pup_217.sfs (with Seamonkey) = 65,646,592 Bytes

New pup_217.sfs (with no browser) = 54,079,488 Bytes

So a remastered iso would be around 11.5 MBytes smaller than the original [I didn't need a new iso because I use a frugal install].

However, of more importance, I'd say, is the amount of space puppy takes up when loaded wholly into RAM (i.e. with the above sfs files uncompressed).

Here is what I've been able to measure in that respect:

The amount of RAM used when Puppy 2.17.1 booted wholly into RAM, according to unix utility free:

Original, with Seamonkey: 151,036,000 Bytes
New, with no browser: 131,236,000 Bytes

Of course, you probably would want to install a browser and that will use up a large chunk of that space, and possibly all of it. Unfortunately, I can't tell you how much Puppy 2.17.1 with Firefox-1.5.0.3 ends up using in RAM because I don't have a version of pup_217.sfs with Firefox in it. Rather, I've installed Firefox in the pup_save.2fs file along with mplayer and lots of other stuff! The main point for me, however, was not to save any space on the iso, or even necessarily in RAM, but simply to allow me to use a different browser without the overhead of Seamonkey also being installed. In practice, on my 256 MB laptop, I find with Firefox that puppy almost never uses the swap space I have available for it. When I used Seamonkey, after browsing for a while, swap space soon started to be eaten up too. Otherwise I was perfectly happy with Seamonkey, especially since it does come with an inbuilt email program and html editor. But the above results suggest to me that it might have some sort of memory leak (it seems greedy anyway), which effects the overall efficiency of the system. But that's just my feeling. I also tried Opera and found it more efficient than Seamonkey (though I no longer have an installation of that and thus no supporting measurement). Unfortunately, Opera didn't work too well with my TiddlyWiki (at http://www.tiddlyspot.com), which is something I use all the time as an offline/online notebook; it was a Javascript-related problem, which though not insurmountable was a nuisance. Hence my using Firefox, which is working great, and I don't care about the missing email client too much since I tend to prefer webmail anyway.
Last edited by mcewanw on Fri 07 Sep 2007, 02:19, edited 1 time in total.
Bruce B

#4 Post by Bruce B »

How much space SeaMonkey uses in a Normal Install?

About 45 MB
[/usr/lib/seamonkey-1.0.8] du -h
20K ./chrome/icons/default
24K ./chrome/icons
11M ./chrome
692K ./components/myspell
22M ./components
16K ./defaults/autoconfig
8.0K ./defaults/messenger/US
24K ./defaults/messenger
76K ./defaults/pref
12K ./defaults/profile/US/chrome
36K ./defaults/profile/US
12K ./defaults/profile/chrome
72K ./defaults/profile
72K ./defaults/wallet
264K ./defaults
76K ./greprefs
12K ./init.d
6.8M ./plugins
84K ./res/dtd
88K ./res/entityTables
128K ./res/fonts
44K ./res/html
660K ./res
28K ./searchplugins
45M .
[/usr/lib/seamonkey-1.0.8]
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

re: du -h

#5 Post by mcewanw »

Bruce B wrote:How much space SeaMonkey uses in a Normal Install?

About 45 MB
Yes, for du -h /usr/lib/seamonkey-1.0.8, puppy 2.17.1 reports 41 MB (booted from cdrom into RAM with pfix=ram).

Yet, my actual measurements of the RAM used immediately after booting don't suggest a 41M saving... strange...

To make the browserless pup_217.sfs, I deleted everything under /usr/lib/seamonkey-1.0.8 (apart from the four library files required by gxine, which only add up to 825 kbytes, so 40 MB should be saved). Then I used Menu > Setup > Dougal enhanced remaster CD, selecting to only make a new pup_217.sfs. It booted fine and now my du -h /usr/lib/seamonkey-1.0.8 reads 825 kbytes as expected. Yet the RAM used, according to "free" is just over 131 MB compared to just over 151 MB previously - a saving of only 20 MB... That I can't explain.
User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#6 Post by HairyWill »

files inside the .sfs are compressed so only saving half the space of the files size in a normal install makes perfect sense
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

my initial thought too

#7 Post by mcewanw »

HairyWill wrote:files inside the .sfs are compressed so only saving half the space of the files size in a normal install makes perfect sense
That was my initial thought too. It is the reason, I would say, why the browserless pup_217.sfs is only about 11.5 MB smaller than the seamonkey containing one (even though seamonkey takes up 41MB when uncompressed). However, it seems to me that, when puppy is booted up, the sfs would be "uncompressed" into the RAM memory disk; I should emphasise that I am talking about RAM here, and not the hard disk storage space. All other things being equal, it should thus be using around 40 MB less RAM rather than the 20 MB I measure with unix utility "free". Surely? Bear in mind that I'm talking here about the case where puppy is being run wholly from RAM memory, in my case via a frugal install.
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#8 Post by Pizzasgood »

Puppy doesn't decompress pup_xxx.sfs. It creates and mounts a ramdisk, then literally copies (with cp) pup_xxx.sfs to it. From there it just mounts pup_xxx.sfs. So it's still compressed. Actually, copying it to ram is probably one of the biggest reasons why Barry made the pup_xxx.sfs file compressed in the first place.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
User avatar
Cooleech
Posts: 24
Joined: Fri 07 Aug 2009, 13:59

#9 Post by Cooleech »

Ive just installed gxine onto NOP 4.13, and it lacks some lib file(s?) libmozjs.so. Where and how can i get those libraries mentioned by mcewanw in first post? Thanx!
User avatar
Pizzasgood
Posts: 6183
Joined: Wed 04 May 2005, 20:28
Location: Knoxville, TN, USA

#10 Post by Pizzasgood »

If you have Firefox installed, see mikeb's suggestion below for a more space-efficient method. Otherwise, try this:

Download (but don't install) this package:
ftp://ftp.ibiblio.org/pub/linux/distrib ... .15-v1.pet
Extract it with the following commands:

Code: Select all

pet2tgz seamonkey-1.1.15-v1.pet
tar xf seamonkey-1.1.15-v1.tar.gz
That will create a seamonkey-1.1.15-v1/ directory wherever you're working. The files themselves will be at seamonkey-1.1.15-v1/usr/lib/seamonkey-1.1.15/, while there will be symlinks to them in seamonkey-1.1.15-v1/usr/lib/. Copy the files you need to /usr/lib/seamonkey-1.1.15/ and the corresponding symlinks to /usr/lib/.
Last edited by Pizzasgood on Wed 12 Aug 2009, 00:14, edited 1 time in total.
[size=75]Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib[/size]
[img]http://www.browserloadofcoolness.com/sig.png[/img]
User avatar
mikeb
Posts: 11297
Joined: Thu 23 Nov 2006, 13:56

#11 Post by mikeb »

Symlinking into /usr/lib that library from the firefox folder does work as well :)

just for reference

mike
User avatar
Cooleech
Posts: 24
Joined: Fri 07 Aug 2009, 13:59

#12 Post by Cooleech »

Will try firefox's libs.. thanx guys! :)
magerlab
Posts: 739
Joined: Sun 08 Jul 2007, 20:08

#13 Post by magerlab »

i think you need just THIS package
http://distro.ibiblio.org/pub/linux/dis ... -1.1.2.pet

sure, gxine will work :D
Post Reply