Ubuntu – How to build and test Ubiquity

developmentpatchubiquity

I've written a patch for Ubiquity and I'd like to test it before I submit it, but I'm not sure how to go about this given the nature of Ubiquity (only used during installation). Is there a way I can build and run it on my own system, or would I have to pull the entire Ubuntu source code and integrate my patch into that, then run a test installation?

Best Answer

There are a couple ways to do this.

  1. You can install ubiquity and edit the code on your machine (in /usr/lib/ubiquity/*). Then just run it and play around. It will adjust some global machine settings, so be prepared for your language or keyboard to change as you select values. And remember you probably don't want to repartition your hard drive as you're using it (it actually won't let you). But you can partition a thumb drive easily enough.

  2. You can burn a Live CD/thumb drive easily enough and run it. During installation, you can do the same trick and edit ubiquity's files in /usr/lib/ubiquity (Alt+Ctrl+T to bring up a Terminal). You may need to kill any existing instances of ubiquity and restart it:

    sudo pkill ubiq
    
    ubiquity --automatic # automatic because that's what the Live CD uses
    

You could also use a virtual machine to test, but that has always been more work than it's worth for me. I usually just use method #1.

Those are the easiest ways. You could also grab the Ubuntu source, edit it, build a new package, install it, and then play with it. But you indicated you wanted to avoid that.