This is information on customizing a GNOME-ish LiveCD. Much of the information here is generic, and would apply to any GNOME installation, but some of it will be specific to Ubuntu-based liveCDs.
It is possible that this page should be re-organized to be task-based, i.e., 'how to change the background.' Would be great to compare/contrast how the admin guide handles this and what should be there, so as to avoid duplication.
Basics
The basics for an Ubuntu-based liveCD are at the CustomizationHowTo in the Ubuntu Wiki. In general, we will try to refer to files/locations/etc. here in the same way they do; i.e., if this page refers to 'mnt', then that means 'the mnt directory created and mounted as per the ubuntu customizationhowto.' So familiarize yourself with that page first
Note: in the ../ToDo, I want someone to replace most of that page with a script- it seems like it should be easy enough to automate most of what they do on that page, making referring to it over and over again redundant.
Changing gconf settings
FIXME: this works, but is possibly suboptimal for maintenance purposes. Other options might include using sabayon, installing separate gconf default files and putting them in the gconf loading path, or just creating a dummy user, setting options for the user, and copying over their .gconf directory. The goal is that the gconf config for a liveCD should be maintainable in CVS; the current method requires running commands per-change, which is suboptimal; you want one 'install the file from CVS, do something to make the system use the settings in that file, move on with life' thing.
To change a default gconf setting, what I did:
- Find the relevant key, its type (string, boolean, etc.) and the value you want to set it to. gconf-editor's search functionality is ideal for this. Remember to check both boxes to search key names and contents, not just paths.
Filling in the three variables appropriately, run:
sudo chroot mnt gconftool-2 --direct --config-source xml:readwrite:/etc/gconf/gconf.xml.defaults --type $KEY_TYPE --set $FULL_NAME_OF_KEY_INCLUDING_PATH $DESIRED_KEY_VALUE
Gconf keys of interest
Not sure this should go here, but anyway... a list of gconf keys that may be of interest to people building GNOME LiveCDs:
/apps/gnome-session/options/splash_image: string: point to location of a new splash screen image, typically in /usr/share/pixmaps/splash/
/desktop/gnome/background/picture_filename: string: point to a background image, typically in /usr/share/backgrounds/
/desktop/gnome/url-handlers/ - see 'change default file handlers' for more info on this.
/apps/epiphany/general/homepage - probably want to set to http://google.com/
/apps/nautilus/preferences/no_ubuntu_spatial - turn off the ubuntu nautilus behavior change
Note that the keys changed in the current liveCD can generally be found in this script.
GDM configuration
GDM generally doesn't enter into the liveCD picture much, but it does define the background color for the gnome-session splash. If you don't want it to be Ubuntu Brown(tm), then you'll want to edit /etc/gdm/gdm.conf, looking for the line beginning with 'BackgroundColor', and setting it to something matching your splash screen. I have also changed 'GraphicalTheme' to be 'happygnome', but I'm not sure if that is really necessary or not.
Change default file handlers
For mimetypes this is handled in /usr/share/applications/defaults.list, whose format is pretty obvious. In the ubuntu case, this is a symlink to /etc/gnome/defaults.list. Make sure to edit this in a chroot, or by editing mnt/etc/gnome/defaults.list; if you edit mnt/usr/share/applications/defaults.list you'll end up editing your own /etc/gnome/defaults.list and wonder why the changes didn't show up on your liveCD
In the epiphany/URI-handler case, it is slightly more complicated.
- Make epiphany the default handler for .html and .xhtml files by replacing instances of 'firefox' with 'epiphany' as documented above.
change the gconf keys in /desktop/gnome/url-handlers/(https|http|about|unknown)/command to point to epiphany.
Remember that you'll also need to change the panel launcher to point to Ephy, most likely.
[Note that I'm currently experimenting with changing ~/.local/share/applications/defaults.list, not sure if that will work as expected on the first try or not, but probably is better for maintainability long-term.]
Change default panel layout
In Ubuntu, the default panel is configured at install-time (even in the liveCD) so that panel contents change if you are on a laptop or not. This makes sense, but complicates changing the default launcher a bit. They are copied in from /etc/gconf/schemas/panel-default-setup.entries and panel-default-setup-laptop.entries, so you have to edit those to contain what you want.
FIXME: instead of doing the Right Thing and creating a new launcher object, I just changed the contents of the 'firefox' object to point at epiphany. So, I'm not sure of the intricacies of adding a new launcher. I've put a note in the ../ToDo to this effect.
Installing or removing apps
Read the CustomizationHowTo like I told you
