Extra configurations for Firefox

Help with using MiniMyth's build system

Moderator: Pablo

Post Reply
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Extra configurations for Firefox

Post by Spulit »

Hi,

In order to have Firefox correctly working on MM, I had to made some tweaks that I think should be part of the official GAR distribution.
Using the official Linux distribution, Firefox complaints about three things:
1 - /etc/gtk-2.0/gdk-pixbuf.loaders does not exist
2 - /etc/pango/pango.modules does not exist
3 - /var/lib/dbus/machine-id does not exist

Regarding item 1, I think it was already solved but only if you include gnash (which means running gdk-pixbuf-query-loaders on init). Since Firefox also uses it, I think it would be a good idea to have this always set if GTK is included.

Regarding item 2, I fix it by including pango-querymodules in the final image and running "pango-querymodules > /etc/pango/pango.modules" in minimyth.pm. I think this should be also included in the init scripts if pango is included in the final image.

Regarding item 3, I fix it by including dbus-uuidgen in the final image and running "dbus-uuidgen > /var/lib/dbus/machine-id" (after creating the /var/lib/dbus folder) in minimyth.pm. None of the dbus binaries are included in the final image by default and I honestly don't know if any of them (besides dbus-uuidgen) is really needed. This should be carefully analyzed...

Best regards and keep up the good work!
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Extra configurations for Firefox

Post by Pablo »

Spulit wrote:Hi,

In order to have Firefox correctly working on MM, I had to made some tweaks that I think should be part of the official GAR distribution.
Using the official Linux distribution, Firefox complaints about three things:
1 - /etc/gtk-2.0/gdk-pixbuf.loaders does not exist
2 - /etc/pango/pango.modules does not exist
3 - /var/lib/dbus/machine-id does not exist

Regarding item 1, I think it was already solved but only if you include gnash (which means running gdk-pixbuf-query-loaders on init). Since Firefox also uses it, I think it would be a good idea to have this always set if GTK is included.
This is done during init whenever /usr/bin/gdk-pixbuf-query-loaders exists.
Regarding item 2, I fix it by including pango-querymodules in the final image and running "pango-querymodules > /etc/pango/pango.modules" in minimyth.pm. I think this should be also included in the init scripts if pango is included in the final image.

Regarding item 3, I fix it by including dbus-uuidgen in the final image and running "dbus-uuidgen > /var/lib/dbus/machine-id" (after creating the /var/lib/dbus folder) in minimyth.pm.
I will add these two to init.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Extra configurations for Firefox

Post by Spulit »

Pablo wrote:
Spulit wrote:Hi,

In order to have Firefox correctly working on MM, I had to made some tweaks that I think should be part of the official GAR distribution.
Using the official Linux distribution, Firefox complaints about three things:
1 - /etc/gtk-2.0/gdk-pixbuf.loaders does not exist
2 - /etc/pango/pango.modules does not exist
3 - /var/lib/dbus/machine-id does not exist

Regarding item 1, I think it was already solved but only if you include gnash (which means running gdk-pixbuf-query-loaders on init). Since Firefox also uses it, I think it would be a good idea to have this always set if GTK is included.
This is done during init whenever /usr/bin/gdk-pixbuf-query-loaders exists.
Indeed, but it only exists if "flash" is enabled in minimyth.conf.mk. I'm not sure if this is a good idea...
Pablo wrote:
Spulit wrote:Regarding item 2, I fix it by including pango-querymodules in the final image and running "pango-querymodules > /etc/pango/pango.modules" in minimyth.pm. I think this should be also included in the init scripts if pango is included in the final image.

Regarding item 3, I fix it by including dbus-uuidgen in the final image and running "dbus-uuidgen > /var/lib/dbus/machine-id" (after creating the /var/lib/dbus folder) in minimyth.pm.
I will add these two to init.
Thanks a lot!

Anyway, I want to point out another problem with Firefox. It seems that libgtk is compiled without the stock icons inside. This means that FF will not startup or it will eventually startup but will output a lot of errors about icons and the interface will show up with bugs (missing icons). I fixed this by removing --build=$(GARBUILD) --host=$(GARHOST) from CONFIGURE_ARGS in gtk+ Makefile, in order to have it similar to the one in Garnome. I'm not sure if this ok in order to have a correct cross-compiling, but it did the job and now FF works good!

All the best
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Extra configurations for Firefox

Post by Pablo »

Spulit wrote:
Pablo wrote:
Spulit wrote:Hi,

In order to have Firefox correctly working on MM, I had to made some tweaks that I think should be part of the official GAR distribution.
Using the official Linux distribution, Firefox complaints about three things:
1 - /etc/gtk-2.0/gdk-pixbuf.loaders does not exist
2 - /etc/pango/pango.modules does not exist
3 - /var/lib/dbus/machine-id does not exist

Regarding item 1, I think it was already solved but only if you include gnash (which means running gdk-pixbuf-query-loaders on init). Since Firefox also uses it, I think it would be a good idea to have this always set if GTK is included.
This is done during init whenever /usr/bin/gdk-pixbuf-query-loaders exists.
Indeed, but it only exists if "flash" is enabled in minimyth.conf.mk. I'm not sure if this is a good idea...
True. Unfortunately, there a numerous libraries, binaries and associated configuration files that are generated as a result of compiling the GTK libraries and the libraries on which it depends. In addition, there are many files that result from compiling the libraries on which many Mozilla plugins depend. Therefore, there is no easy way to include a "generic" set of libraries, binaries and configuration files.
Anyway, I want to point out another problem with Firefox. It seems that libgtk is compiled without the stock icons inside. This means that FF will not startup or it will eventually startup but will output a lot of errors about icons and the interface will show up with bugs (missing icons). I fixed this by removing --build=$(GARBUILD) --host=$(GARHOST) from CONFIGURE_ARGS in gtk+ Makefile, in order to have it similar to the one in Garnome. I'm not sure if this ok in order to have a correct cross-compiling, but it did the job and now FF works good!
Removal of the build and host configuration parameters means that the package is no longer cross compiling. While this will work fine when compiling for a target that is the same architecture as the build system. However, when the build system is x86_64 and the target is i386, it will not work. Therefore, it would be good to determine why it fails when cross compiling.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Re: Extra configurations for Firefox

Post by Spulit »

Pablo wrote:
Spulit wrote:Anyway, I want to point out another problem with Firefox. It seems that libgtk is compiled without the stock icons inside. This means that FF will not startup or it will eventually startup but will output a lot of errors about icons and the interface will show up with bugs (missing icons). I fixed this by removing --build=$(GARBUILD) --host=$(GARHOST) from CONFIGURE_ARGS in gtk+ Makefile, in order to have it similar to the one in Garnome. I'm not sure if this ok in order to have a correct cross-compiling, but it did the job and now FF works good!
Removal of the build and host configuration parameters means that the package is no longer cross compiling. While this will work fine when compiling for a target that is the same architecture as the build system. However, when the build system is x86_64 and the target is i386, it will not work. Therefore, it would be good to determine why it fails when cross compiling.
But do you know why GTK+ is not including the stock icons in the libgtk-x11.so file? I checked the configure script and didn't find any parameter to set this... The difference in the file size is big (about 800KB).

Thanks
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Re: Extra configurations for Firefox

Post by Pablo »

Spulit wrote:
Pablo wrote:Therefore, it would be good to determine why it fails when cross compiling.
But do you know why GTK+ is not including the stock icons in the libgtk-x11.so file? I checked the configure script and didn't find any parameter to set this... The difference in the file size is big (about 800KB).

Thanks
I did not know why, which is why I mentioned that it would be good to find out.

Anyway, I looked into it. I believe that I have tracked down and fixed the problem. I have committed the fix and it is in the latest test build.

Basically, it appears the way to make it include the stock icons in the cross build is to generate etc/gtk-2.0/gdk-pixbuf.loaders for the native build. The cross build uses the native build's gtk-update-icon-cache utility, which needs gdk-pixbuf.loaders to determine which image formats are supported.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit »

Hi,

Thanks for all the updates! I will now try 66b6 and check if everything we discussed in this thread is ok!

All the best
Spulit
Contributor
Posts: 181
Joined: Tue Dec 30, 2008 5:54 pm

Post by Spulit »

Hi,

I tried 66b6 and everything worked ok, except the dbus-uuidgen thing. The problem is that you have included:

if (! -e -q(/var/lib/dbus))
mkdir /var/lib/dbus

However, you don't have yet /var/lib, so the mkdir will fail. You have to mkdir /var/lib first...

Another thing, at the beginning of the boot process, I get a message:

mknod : /dev/null already exists

Any idea?

Thanks
Pablo
Site Admin
Posts: 4182
Joined: Tue Dec 14, 2004 2:13 am
Location: La Jolla
Contact:

Post by Pablo »

Both problems should be fixed in the latest test build (66b8).

I fixed the first problem by creating /var/lib in the initial init script as well as by switching from mkdir to File::Path::mkpath (which creates parent directories as needed).

I fixed the second problem by removing the creation of /dev/null from the initial init script. Once /dev was no longer being mounted over with a tmpfs file system, the /dev/null created by pivot_root was no longer being masked. As a result, it did not need to be recreated.
MiniMyth running on an Acer ApireRevo 3610 and a Zotac ZBOX-ID80-U. Find out more at my MythTV page.
Post Reply