Custom Ubuntu install images with SquashFS
Q I'm creating my own distribution based on Ubuntu Intrepid (8.10) and am getting along nicely except for one little problem. I've removed Evolution using apt-get, but there is still a launcher for it in the top panel. That launcher doesn't do anything, but it is still present and I'd like to get rid of it. Also, I would like to add a launcher for a Bash terminal to the top panel. (Maybe I can just change the configuration of the Evolution launcher to make it launch a terminal instead.) Finally, I would like to get rid of the 'Install' launcher on the desktop. I've managed to do everything else I want with this distro except manipulate the launchers. How would I do that?
A Have you created your distro by installing Intrepid to a hard drive, modifying it and then recreating the compressed filesystem for installation? If so, it's only a matter of making the changes to the installed system before recreating the installer package. You have already done some of this when you used apt-get to remove files. To edit the top menu, right-click on the Ubuntu icon at the left end of it and select Edit Menus. Add and remove what you want, then proceed as before. Remove the desktop icons by deleting the corresponding .desktop file from the Desktop directory.
If you are manipulating the ISO image at a lower level, by extracting the squash filesystem, unpacking it and working with a chroot, you can still manipulate the menus. When you have unpacked the filesystem with the following code, remove the desktop files relating to the menu entries you no longer need:
sudo unsquashfs tempdir casper/filesystem.squashfs
For Evolution, the file is /usr/share/applications/evolution-mail.desktop. You can remove other files here, and add more of your own. The format of a desktop file is documented at www.freedesktop.org/wiki/Howto_desktop_files, or you could add a menu entry for your installed system, then copy the desktop file that this creates to the unpacked squashfs files. The Install icon is created by /usr/share/applications/ubiquity -gtkui.desktop, so remove that file too. Finally, re-create the squash filesystem with
sudo mksquashfs tempdir filesystem.squashfs
Now rebuild the ISO image as before, but using the new filesystem.squashfs file.
Follow us on Identi.ca or Twitter