I have escaped the perilous grasp of Perl, and I bring news:
If you make a localized Ubuntu ISO like the Italian CD, you can customize the installer slideshow, with translated screenshots and more!
How? Follow me!
First, you need to be running Ubuntu 12.10 with the latest version of the Ubuntu defaults builder — 0.35. I assume you already know about the defaults builder, since you are making a localized ISO. If you do not, start with this explanation about localized images. Don’t worry: the defaults builder is a great tool that makes this very easy!
I’m home from UDS-Q in lovely Oakland, California! Okay, I actually got home about four days ago, but I’m slow with these things. It was an interesting week with lots of interesting people. I’ll try to cram it into this post…
I seem to be accumulating all sorts of little scripts to solve odd little problems sensible people don’t encounter (and therefore don’t have scripts for). Normally I keep these to myself because they’re really ugly, but I’m going to start sharing the more useful ones on my blog. Maybe some day I’ll save someone a bit of time. That would be fun!
Using a Formstack form? Went over your form submission limit and now your email is flooded with thousands of useless error messages?
Spurred on by the rather dull situation of my web dev portfolio being a single long page with pictures and writing on it (which simply will not do!), I spent the last week moving my blog (and my portfolio) to my own webspace with WordPress and a custom theme. This entailed re-learning PHP (ugh), learning more about WordPress, and pulling a lot of hair. And the whole thing is still a work in progress, but it’s here, and it’s better than my old blog. Yay!
David P let me know that some loco teams are interested in using Ubuntu’s installer slideshow on their websites. It could serve as a quick tour of Ubuntu in their language. Lots of people do lots of work to localise this stuff, so using that work in other places sounds fun. I would like to quickly show how to do that with the slideshow. Mostly this is using jQuery and the jQuery.Cycle plugin, so if you just want to make a cool presentation from scratch, that is the place to look.
So, let’s make this simple by using the released package that is shipped in Ubuntu. If you want to make changes or update the localization, let me know and I can write about that (though I hope the Readme in lp:ubiquity-slideshow-ubuntu does the trick).
You can install the installer slideshow for your version of Ubuntu. It is ubiquity-slideshow-ubuntu in the repositories. (Or -kubuntu if you are using Kubuntu, etc). The binary and source packages are also available at the usual place on Launchpad. The actual content we are interested in installs to /usr/share/ubiquity-slideshow. It is all regular HTML, so pretty easy to play with. First, copy the slides folder to somewhere in your home folder; we will work with that now.
Obligatory copyright notice: the slideshow is licensed Creative Commons Attribution-ShareAlike 3. A file with more details installs to /usr/share/doc/ubiquity-slideshow-ubuntu/copyright.
Now, open the slides folder. This may look overwhelming at first, but we will fix that. There are a whole bunch of folders named like loc.zh_TW and each one contains a version of the slideshow’s text for a specific locale (where everything after loc. is the locale code). In addition, each slide in the slideshow is its own file like photos.html and the slideshow itself is glued together by index.html, which has a list of all the slides in order. The slideshow can be told to run with a specific locale, where it loads the slides from that locale’s folder instead of the usual place.
You probably only need one locale, so let’s just deal with that now: open the folder for your locale. (If you don’t know your locale code, this table might help). Now move the contents to the slides folder, replacing the existing English slides. Now delete all the locale folders. (It’s quick to do that in Nautilus: press ctrl+s, enter loc.* for the pattern and hit OK, then delete the selection as usual). We don’t need directory.js, either, so delete that.
Now let’s test this to make sure everything is working. If you try opening index.html in your web browser, it will open that but the slideshow won’t show up. This is because your browser is being sensible and it is blocking the Javascript I mentioned from loading anything on your hard drive. You have a few options instead. Upload the slideshow to a website, or run a local http server. Of course, Python makes this easy. Head to the slides folder in a terminal and runpython -m SimpleHTTPServer…now, if you go to http://localhost:8000 in your web browser, the slideshow should appear.
Okay, great! Now what?
Let’s fix this up to make it look good on your website. First, open index.html in a text editor.
Remove the line that loads directory.js, which looks like <script type=”text/javascript” src=”directory.js”></script>. We deleted that file earlier because it just describes the directory structure so the script knows what locales are available. Since we removed all the other locales, it serves no purpose (and actually slows down page loading since the browser will always request that file).
If your locale is a right-to-left language, add class=”rtl” to the <body> tag. This turns on the right-to-left rules in general.css.
About halfway down, you will see a list of items like<div><a href="welcome.html"></a></div>You may have noticed that the first and last slide are pretty specific to actually installing Ubuntu, so they aren’t really suited for what we are doing here. If you want, just remove the first and last ones from the list and they won’t be shown. You can also re-order these or add new slides in a similar way. If you’re wondering, the Javascript at the top of the file loads each of those listed slides using XHR.
Of course, linking someone to index.html as we have it now is a little boring. I encourage you to copy and paste the #slideshow element and stick it in another web page. It could make a nice decoration. As long as your page loads the slideshow’s css stylesheet, jquery, jquery.cycle and slideshow.js as in the <head> section, it will work out fine. (Though you may need to make some slight changes to general.css so it doesn’t interfere with the rest of your page. The likely offenders are at the top and there is a rule at line 202, affecting all IMG tags, that you may want to remove).
I should point out that this is (and always will be) intended to be used in one place: while installing Ubuntu. So, its design could change drastically. I would love to keep this going, but it’s mostly a lucky coincidence that it fits in websites today.
(It would be neat to see a loco-web-resources project on Launchpad, but I don’t think I’m the guy to spearhead that)
I hope this was helpful. If you have any questions, feel free to leave a comment and I will try to answer.
I’m back home from UDS-N in Orlando! It was an intense week; I don’t think an hour went by without something excellent happening. Of course, the most excellent thing for me was that Canonical sponsored me to attend. That was incredibly kind. To everyone who organized UDS, thank you for putting all of this together!
(And the Ubuntu notebooks are really nice, too)
The hotel seemed to be a place of extremes. It was very hot outside, so they turned the convention center into a freezer. That way we had a choice to freeze inside or melt outside. I chose the former, as it was more consistent with home. The beds were regularly MADE (in the most intense fashion I have yet witnessed) so that every night, when one finally succeeded in wedging between the sheets and the mattress, one felt truly accomplished. The hotel was massive but well organised, and the service was excellent. (Including the shuttles). A server remembered that I like tea (with milk in it) with breakfast, which is outstanding given the number of us there.
Mark’s big announcement about Unity Desktop was a catalyst for some really action packed discussions. There is a lot of change going on this cycle, but it feels attainable. I think everyone has done a great job positioning the new goodies in the platform so they can suddenly jump to life in one coordinated, shiny burst of energy next year.I think this year is the “OMG we can make videos!” year for Ubuntu. The first thing that happened in the introduction at 9AM on Monday was an amazing, well produced video about Ubuntu. With colours. And moving things. And sound. And there were no full-screen videos of the desktop where the viewer is expected to care about some tiny movement over a sixteenth of the screen. Oh, and the computer talked to the projector. That was pretty cool to see. More, please!
I went in doubtful about Unity on the desktop. To be honest, I hadn’t explored it much beyond a brief surface scan and a bit of groaning about the less-than-stellar state it shipped in with Maverick with regards to stability. Some sessions — Mark’s impromptu Unity Q&A, Neil’s presentation of the Unity Places API — and the very tangible interest in accessibility quickly changed my tune. Unity’s design is glorious. There is a ton of energy, and I think it’s going to amaze people with 11.04. I learned it is mostly written with Vala, too, which makes me as a potential contributor very happy.
It also helps that the Places API session began with Neil showing off libdee. Though it may have been a bad idea to have that at the start; I was already distracted, excitedly installing the thing and playing with it on my own machine because it is that amazing. It abstracts a bunch of DBus stuff so you can have a number of individual programs that share data between each other, where dee connects those programs for you. So, a bunch of DeePeers share a DeeSharedModel object and new DeePeers can pop in and manipulate that same object at the same time. (Technically, each has its own copy and no one peer is depended on by all the others). Pretty darn cool.
Places is even more amazing. Really. It is going to do great things.
Had a very productive session about Harvest where we talked about the new stuff all hosted at harvest.ubuntu.com, discussing what people need and want for it to serve them well. Being a simpleton, all I want is a new logo, and then I can make the header look pretty ;)
I volunteered to work on RSS feeds, a “link to these results” button and a few odd bug fixes.
I received lots of kind words about my GSoC project over the week. I was frequently surprised to get them and reacted with a terrifying amount of modesty, so if I forgot at the moment I will say it now: thanks for all the kind words. And thank you for letting me mess with Harvest, Daniel H and James W!
Speaking of thanks, somebody very kindly organised for a bunch of people to go to the Disneyworld Epcot park. I went on Wednesday with fearless leader Jussi, Rodrigo, Harald and Rohan and, yes, we met Mickey and Pluto.
All these Kubuntu people are obviously in the midst of a subversive plot to convert everyone, by the way. At this point I feel a nearly overwhelming urge to use Kubuntu, or at least to make stuff with Qt (and I have been thoroughly trained to always pronounce it “Cute”). The only thing holding me back is its default wallpaper. (Thanks, Rohan). The multiple lightning talks about QML were spectacular, too. It’s a declarative language for creating beautiful user interfaces with Qt. Wondrous animated magic in a few lines of very simple, friendly looking code. (And QtCreator is involved, too. Eeee!)Tragically, I haven’t figured out who organised this and paid for the tickets. So, thank you, mysterious benefactor! It was really nice to do, I wouldn’t have figured it all out normally and I would have regretted if I hadn’t. That really was a wonderful way to spend Wednesday night.
I’d better look productive again. Talked to a lot of people about the installer slideshow in Ubuntu, Kubuntu, etc. I didn’t get everyone, but we’re poised to get out of the way with this cycle and land things at sensible times. I’m hoping to freeze strings before the Documentation String Freeze and leave a lot of room for translations to come in and be tested naturally. If all goes well, nobody will need to think about it from here on out. (Unless you happen to be responsible for one of those slideshows or are interested in contributing to a highly visible part of Ubuntu’s first run experience. In that case, please do think about it and contact me!)
I was at the session about the Free Culture Showcase. Ivanka has a really cool vision for how this should be in the future and I’m looking forward to where it goes. One thing we all agree on is it needs more videos. Videos like the photos; as diverse, fun and attractive as the people who use and make Ubuntu :)
It was a very exciting, energising week. Thanks, everyone, for a fantastic UDS. The Natty Narwhal is going to be great.