I am Sooooo satisified to actually have the custom disk I need.

I remastered Morphix Firefox LiveCD, vff4.iso . My requirements are that it boots quietly, runs a browser in full screen from my web server only, and reboots on exit.

Getting the browser to take my custom prefs was a bit tricky. I chroot, apt-get remove mozilla-firefox. Then I downloaded Firefox 1.0 from www.getfirefox.com . The tricky part was that I had to install the firefox...gz to my dev workstation. I put it in the /usr/lib directory. I did a firefox -install-global-extension on autohide.xpi . I copied the complete /usr/lib/firefox directory to my morph_hd source /usr/lib .

In order to get my prefs to take effect I had to wait until just before Firefox started up. Then create the user profile without actually starting the browser. Once that is done it is straight forward to append to the prefs.js file without messing anything up.

Here is the firefox.sh script I ended up with.

#!/bin/bash

/usr/lib/firefox/firefox -createprofile morphuser

FDIR=`ls -d /home/morph/.mozilla/firefox/*.morphuser`

cat >> $FDIR/prefs.js << EOFP

user_pref("browser.download.lastDir", "/home/morph");
user_pref("browser.preferences.lastpanel", 0);
user_pref("browser.startup.homepage", "http://my.website.edu/");
user_pref("browser.startup.homepage_override.mston e", "rv:1.7.5");
user_pref("extensions.autohide.bars.PersonalToolba r", true);
user_pref("extensions.autohide.bars.PersonalToolba r.always", false);
user_pref("extensions.autohide.bars.nav-bar.always", false);
user_pref("extensions.autohide.bars.tabbar.always" , false);
user_pref("extensions.autohide.bars.toolbar-menubar", true);
user_pref("extensions.autohide.bars.toolbar-menubar.always", false);
user_pref("extensions.autohide.closedFull", true);
user_pref("extensions.autohide.context", false);
user_pref("extensions.autohide.openNewFullscreen", false);
user_pref("extensions.autohide.statfloat", false);
user_pref("extensions.autohide.status-bar", false);
user_pref("extensions.disabledObsolete", true);
user_pref("extensions.lastAppVersion", "1.0");
user_pref("intl.charsetmenu.browser.cache", "UTF-8, ISO-8859-1");
user_pref("network.cookie.prefsMigrated", true);
user_pref("network.proxy.ftp", "my.website.edu");
user_pref("network.proxy.ftp_port", 80);
user_pref("network.proxy.gopher", "my.website.edu");
user_pref("network.proxy.gopher_port", 80);
user_pref("network.proxy.http", "my.website.edu");
user_pref("network.proxy.http_port", 80);
user_pref("network.proxy.share_proxy_settings", true);
user_pref("network.proxy.ssl", "my.website.edu");
user_pref("network.proxy.ssl_port", 80);
user_pref("network.proxy.type", 1);
user_pref("xpinstall.whitelist.add", "");

EOFP

/usr/lib/firefox/firefox -fullscreen $1

sudo cp /sbin/halt /home/morph/reboot
sudo /bin/umount -l /cdrom
sudo /usr/bin/eject /dev/cdrom
sudo /home/morph/reboot -f

#end of firefox.sh


Because the Firefox LiveCD doesn't have a morph user profile for firefox until firefox is started the first time, it is impossible to append to the prefs.js file because it doesn't exist at any point before that. The way I did it lets me completly and reliably control the browser behavior. Note: I tried to use the "-p morphuser" command line option to firefox on the second execution so that the browser would be forced to use the profile I just created, but it seems that the -p option now causes the firefox script to attempt to run a ".pure" version of firefox. It looks like a developer feature for testing has been left in the distribution. I found that I didn't need to specify it as there is only one profile and firefox is happy to use it without complaint.

p.s. morphix.org dev guys, should I cross post this to the morphix forum? Feel free to describe it in any firefox on LiveCD docs, etc..