Development/Creating a Shift CD (NEW)

From Shift Linux

Introduction

The instructions below explain how to make a Shift Gnome distro--your own version! Once you get comfortable making your own distro, you can begin to play about with ideas to make it better.


How To Make Your Own Shift Gnome

simon360: 'Get an awesome customizing program

For most of the time I was making Shift, I was inside a program called Reconstructor, even though most of the work was done via the command line. What's good about Reconstructor is that it takes a Ubuntu or Ubuntu-compatible ISO, and splits it into 3 parts: remaster (which is the actual bootable CD), root (the root of the filesystem, this is a full version of Ubuntu or Shift that will eventually end up on someone's system), and intrid (I didn't really touch this, but it is the initial ramdisk. Don't worry about it, we'll tell you when it's useful).

So, we loaded the ISO into Reconstructor, and we were greeted with a plethora of options. What did we do now?

Remove the stuff no one wants, add the stuff everyone wants

Our next step was to add and remove some packages. The best way to do that is by using the command line and apt-get. Another useful thing about reconstructor is that there is a little terminal icon at the bottom left of the window, which gives you command line access to a working Shift system. If you type in apt-get install packagename, packagename will be installed into the system, and added to the menus (if necessary).

It's the same for apt-get remove, except in reverse (things get taken out of menus, the apps get removed, etc.).

Another thing we did was an apt-get dist-upgrade. This will upgrade the entire system to the latest stable packages, but if there are instabilities with the system, this is probably the root of the problem. We looked at it from the perspective that this is not a stable distro yet, and we have time to fix the bugs, so we might as well be shipping everything up to date.

And finally, what are we supposed to do with all of those extra package files that were just downloaded? They've been installed, and we don't really have much use for them anymore, so we run an apt-get clean. If you have a 900MB ISO at one point, as I can tell you I did, it's because you forgot that single command tongue.gif .

Get everything branded

So, you've got a system that's working pretty well now, but it's not branded! How dare Ubuntu (or Shift) take your work and put their branding all over it? We'll just have to fight back.

But truth be told, branding can be a pain. Reconstructor helps, but you actually have to replace everything with a Ubuntu logo or name on it with the name of your distro, because of the trademark, and sometimes files hide in places they shouldn't. Shift is also a registered trademark, and thus if you are basing your distribution off of it, you need to have your own distribution name (unless you're working on Shift and not a derivative).

So, to get the easy stuff out of the way. There is a tab at the top of Reconstructor called Gnome, which is where you can add a theme, wallpaper, icon set, and set the default configuration for such things. There, easy part done. But there's still pesky little Ubuntu icons everywhere!

Go through /usr/icons/, and replace every single Ubutnu- or Shift-related icon with an icon for your distro. Yeah, it's a pain, I know. There's also some in /usr/pixmaps/ that you should replace, like the icon for Ubiquity (the Ubuntu/Shift installer). And when you're done, delete the icon cache and run a gtk-update-icon-cache on every icon set you've modified, (if you've added an icon set, run a gtk-update-icon-cache on that, too). This will change that little, stupid, irritating icon at the top left of your screen, next to the Applications menu. I spent 5 hours straight trying to change that from Ubuntu to Shift, at one point getting mad at the Ubuntu developers themselves in their IRC room (sorry guys! tongue.gif).

Useful tip: in your own terminal (not the terminal of the distro you're developing), run a sudo nautilus. The root, remaster, and intrid folders have big fancy permissions on them, but using that command, you can drag files in and out of the ISO using a nice file navigator. You need to be root (or elevated permissions a la sudo) to change things within those folders.

Config files

This is more of a pasteboard for me. When I find a config file, I honestly don't want to come in and explain it to everyone, but I want to remember where it is, and might as well share tongue.gif . So the following is useful links, commands, files, etc.

http://library.gnome.org/admin/system-admin-guide/2.20/

/usr/share/gconf/defaults -- Default gconf stuff.

gconftool-2 --dump <a directory in gconf> -- Useful for exporting things like a panel configuration

update-gconf-defaults -- writes files in /usr/share/gconf/defaults to a single, default gconf structure.

/etc/skel/ -- the default home folder for a user.

/etc/lsb-release is a text file that also needs to be changed. We recommend only changing the description, as the rest is probably still a pretty accurate description of your distro for programs that want to know.

Conclusion

You should also be clicking Apply on Reconstructor after you change anything within the interface (not from the Terminal, since that actually updates things as soon as you say "Do this"). You want to click Next after hitting Apply one last time, and name your distro, your ISO, etc. And now, you wait. And wait. And wait. And wait. And wait. And wait. And then you have an ISO sitting there for you to burn to a CD, or run ion a virtual machine. Congratulations, you just made a Linux distribution.

Thanks to the entire Shift Linux team, especially Barney, CrimsonRedMk, and Mephistopheles, and anyone who helped me out at some point in #neowin on irc.neowin.net or #ubuntu or its other channels on irc.ubuntu.com.'


Adding Repos to Your Distro

Personally I prefer to add other repositories whilst I'm at it. Ubuntu's repo is terrific for its wide selection of software, but it sometimes lags a little bit behind when it comes to keeping all of that software at the cutting edge. Generally speaking it does keep Firefox, for example, up to date, but important software like wine may lag behind.

Also, it may be convenient to have, for instance, the Medibuntu repo on your distro for automatic downloading and automatic updating of cool software like Skype, GoogleEarth, Acrobat and the like.

The fact is, many software projects out there have their own individual repos. And as long as you feel you can trust the source (wine and Medibuntu, for example), it makes sense to add those repos to your distro. Adding repos keeps your system more up to date and gives you access to more software programs.

Just make sure that you add the Ubuntu-compatible portion of the repo you are looking at!