Planet Openbox!

March 12, 2010

Passport Canada: Passport Cost

We're going to Hungary next month, and we have to jump through hoops to get Nikki's passport. They didn't accept her birth certificate, it was "void", so we have to wait until one arrives that cost us $65 because we added an extra $30 to the price to make sure it gets here in 5 business days. Anyway, back to the passport thing... Here's a beautiful document justifying why a Canadian passport costs $87CAD: http://www.ppt.gc.ca/support/faq.aspx?lang=eng&id=540
The fee for an adult passport is CAN$87. Of this amount, CAN$25 is used to recover the costs incurred by the Department of Foreign Affairs in providing consular services to Canadians abroad.

As for the remaining CAN$62, the breakdown is as follows:

- 47% towards security fees (e.g.: examination, guarantor checks)
- 43% towards production fees (e.g.: material, printing)
- 6% towards administration fees (e.g.: business sustaining)
Couple of questions arise:

1) Isn't the abbreviation for Canadian Dollars "CAD"

2) "For the remaining $62, the breakdown is as follows" ... 47%+43%+6% = 96% ... What? Where's the extra 4% going?

3) Let's forget the mistakes on the site, do our taxes not already pay for government employees to sit on their ass and do their job? Or is their job strictly to sit on their ass and collect good money? Any "actual" work gets added on and broken down into 47%=THEIR already paid manual labour, 43% WE pay for their ink and paper and 6% administration fee a.k.a. just to round it off to 100% .. or wait...

What a bunch of bull.

K.Mandla

It’s hard to believe, but even in the short time since my friend picked up a new computer, there’s already been a password problem. Apparently it was a new password, misspelled slightly for added “security,” and then promptly forgotten. After several failed login attempts as the primary user, I got a text message pleading for help.

In Ubuntu, if you can believe this, it’s quite easy to change or “reset” the password for an account, so long as you have physical access to the machine. In total this should take you about 10 seconds to finish, give or take for the actual speed of the machine.

First restart, and then watch closely as the computer starts up again. After the BIOS screen disappears (the screen that usually shows the manufacturer’s logo, or information about the hardware), hold down the Shift key (if you’re using a version earlier than Karmic, you will probably have to press Esc repeatedly).

If all goes well, you should be at a Grub boot menu. From the list you see, pick any option that ends with the “recovery mode” option, and press return.

In Karmic and perhaps in some earlier versions, you may get a gray, blue and red menu that describes several different options; the final option — “Drop to the root shell prompt” — is good enough. Some of the earlier versions of Ubuntu went straight to the prompt.

Then you should see the command-line cursor, with root as your user name. Next type

passwd enter_username_here

and press return. You’ll need to enter the new password twice for confirmation, and then you can restart the machine.

reboot

You can logout of the root account if you like, and go back to the gray-blue-red menu, but it’s just as easy and useful to reboot from that point.

And the new password should work fine. From within Gnome there are ways for a person to adjust their password by themselves, so I gave my friend “password” as the reset one, and at some point it can be changed to something else. Crisis averted. :D


IMG_0005

A quick apology first, for a lapse over the past few days. I ran into a particularly busy spell at work, and added to some other extra-curricular responsibilities, it made it impossible to update this site. On the other hand it also made it impossible to make any progress in these “Linux adventures,” so nothing was particularly lost.

I did accompany a friend to a computer retailer on a computer shopping trip. The winning prize was a rather nice machine by my standards — possibly one I would have bought myself a few months ago, if I had seen it first. It’s an NEC VersaPro model VY22X/RX-M, housing a 2.2Ghz Celeron, 256Mb of memory, a 20Gb hard drive, USB2.0, an ATI Radeon 330-series graphics card on a 1024×768 LCD, a CDROM, Windows XP (in Japanese) and a floppy drive.

Considering that the focus of this machine will be common desktop tasks, like surfing and watching Flash videos, it’s fine. It was a little sluggish at start — actually very sluggish — but I added a leftover 256Mb stick of DDR333 and it hums along quite well. It’s a sizable machine — easily bigger than any of the computers I keep on hand — but I think that was actually a selling point for the buyer.

The price was good too — under US$200 with a 30-day lemon guarantee, and the seller threw in an off-the-shelf DVD reader-writer identical to the one I bought two weeks ago. Considering that my friend was expecting to pay twice that amount, it was an easy choice.

Overall the computer is in solid condition, no physical defects, flexible enough to handle everyday chores, and should have a few more years of action left in it. We’ll see how it goes from here. …


World Cup pick’em: Team group standing possibilities

The past three years I’ve been running a rather successful, private NFL pick the winners site.  The first two years it was a custom cobbled together PHP application, using raw database commands and everything.  Considering I wrote it two days before the season started, and still managed to sign up 20+ people, I was happy with its success.

This past year, I rewrote the site using Rails and fell in love, mostly with ActiveRecord.  It made working with databases fun again instead of feeling like such a chore.  I also really got into Ruby; it reminds me a lot of my Perl days back in college.  All little utility scripts I write these days are in it.

Anyway, I have a little less than 91 days until the 2010 World Cup starts, and I’ll be running a similar site, hopefully getting a good amount of people involved.  I’ve been writing the models for a while now, and today I implemented a feature I wanted to have for it.

For those unfamiliar, the World Cup is divided into two stages; the group stage and the knockout stage.  There are 8 groups, each with 4 teams, and each team in a group plays every other team in the group once.  3 points for a win, 1 point for a draw.  The top two teams in the group progress to the knockout stage.

Tonight, I wrote a helper method on the Team model which, after playing 2 of its 3 group games, can show you the probabilities of the team ending up in which place in the group. It looks like this:

>> cpcts = teams.map { |t| { t.abbr => t.get_possible_pcts } }
=> [{"USA"=>[0.916666666666667, 0.0833333333333333, 0.0, 0.0]},
   {"ENG"=>[0.0833333333333333, 0.5, 0.416666666666667, 0.0]},
   {"SVN"=>[0.0, 0.416666666666667, 0.166666666666667, 0.416666666666667]},
   {"ALG"=>[0.0, 0.0, 0.416666666666667, 0.583333333333333]}]

These numbers of course entirely based on simulated results for each team’s first games.  I like what I see here though, the US with a 91% chance of being group winners…

My database setup is slightly complicated, and entering a result for a game involves creating 3 records: one to record the score and two to indicate the winner/loser/tie-er of each game.  This meant for each possibility of the final games, I had to create these records and roll them back again.  I used a transaction and simply threw an exception, 36 times per team!

Also, if teams are level on points, there is a list of tiebreakers, much of them having to do with goal differences and goals scored, so in order to get a somewhat meaningful simulation, I had to simulate the final two games with each team involves scoring anywhere between 0 and 5 goals - thus the 36 transactions.  It’s a bit heavy, but if I can’t find a faster way I can always cache these results, as they would only change after a game has been played.

Plenty more to come about the WC pickem site as it develops.

March 11, 2010

Grub2 Tutorial, Part 3

Part 3 and final of my series on configuring Ubuntu's new grub2 boot menu. I translate a couple of commonly-seen error messages, but most of the article is devoted to multi-boot machines. If you have several different operating systems or Linux distros installed on separate disk partitions, grub2 has some unpleasant surprises, so see my article for some (unfortunately very hacky) workarounds for its limitations.

Why use Grub2? Good question!
(Let me note that I didn't write the title, though I don't disagree with it.)

Fluxus playing

Fluxus is a really neat program for “live coding“, which means something about creating visuals for performance art, but not having anything prebuilt for those performances.  It’s neat in that you write the code for your scenes directly inside of the renderer itself, which has a certain aesthetic to it.  You can get things to react to sound by attaching it to jack and using outputs of fft’d signal.

I am not so great with fluxus due to a lack of scheme experience and just general unfamiliarity, but I enjoy playing around with it - my fiance playfully refers to it as “cube manager” as there was a time I was only playing with fluxus or Football Manager.  Here’s some visuals I put together tonight:

March 10, 2010

GNOME Developer Kit, follow up

Just wanted to update everyone who showed interest in the new release of GNOME Developer Kit I announced yesterday. Based on some preliminary statistics I collected in the (less than) last 24 hours, it seems that the VMware image type got the most download, followed closely by the installable ISO format. I guess that was due to VirtualBox being able to use *.vmdk files and some people opting for the free virtualization tool.

Here are the preliminary results so far:

  1. VMware image: 42 downloads
  2. Installable ISO: 26 downloads
  3. RAW filesystem image: 17 downloads
About GNOME 2.29.92

About GNOME 2.29.92

Due to the number of downloads and and comments I received, I felt that I should provide with some background on how to install/remove packages and update your system using the conary package management system. So here you go:

The package management system behind the GNOME Developer Kit is called conary and is considered by many as the next generation package management system when compared to some of the popular options out there. One of the reasons behind this claim is the fact that your entire system is actually completely maintained in a versioned state, and conary is always “aware” of what is installed on your system and what files and dependencies make up the entire “set”. This allows for some pretty nifty operations such as rolling back to a specific state of your system.

In order to check for new updates for your system, open a terminal and run the command sudo conary updateall. conary will then check for updates and prompt you to accept the update or not. Please keep in mind that the first time you run conary for the first time, you will experience a delay as your entire system gets analyzed in preparation for the changes that are to take place. All subsequent actions performed will be much faster, I promise. If after a while you don’t feel like waiting for the prompt, add –no-interactive to the update command to have your system updated automatically.

Now, let’s just say that you decided to install something new, such as Banshee. Easy, just run sudo conary update banshee (remember to add –no-interactive for no-hands updates) and voilá!

Want to know what was actually installed on your system? conary q banshee will tell you what version of banshee was installed. How about what files were installed? conary q –ls banshee will give you a list of all the files that were installed and conary q –lsl banshee will give you the long list with file permissions and modes.

Changed your mind and want to remove banshee from your system? sudo conary erase banshee will take care of that. Want to actually roll your system back to the state it was before you installed banshee instead? sudo conary rollback 1 will rollback your system exactly one transaction. Want to go further back? Just increase that number to represent how many transactions to roll back. Want to rollback but don’t remember what point in time you want to go? sudo conary rblist will display a list of all transactions and what was changed. Note that each transaction is preceded by the letter “r“, so if you want to rollback to the point r.15, then use sudo conary rollback r.15 (and don’t forget that “r” or you’ll rollback exactly 15 transactions instead).

How about searching for a package? If it is something that it is already installed on your system, then conary q [package name] will give you the information you want. If the package is not installed on your system yet, then conary rq [package name] is what you need, though since conary does not yet make use of metadata, you’ll need to know the exact name of what you’re looking for. Now, let’s say you want to find out what package provides the command /sbin/service? Use conary q –path /sbin/service to find out that initscripts:runtime=8.81.2-0.11-1 is responsible for providing it (use rq if you want to search the remote repository).

Well, I think this is enough to get you going. You’ll probably want to install Flash and media codecs to enjoy browsing some sites and listening to your media, so let’s apply what we’ve learned so far and run: sudo conary update flashplayer group-codecs

If you’ve stayed with me until now, you may want to read up on what else conary can do or even consider packaging for GNOME Developer Kit. Your help will be greatly appreciated!

Stage for Sinatra

I’ve been getting into hacking together quick web ideas via Sinatra, which is a great little Ruby web framework for getting things going QUICKLY.  I love how easy it is to get started (not many lines) and it supports HAML pretty much automatically.  It also lets you run a quick webserver just by running “ruby <yourfile.rb>”.

This is a great mechanism for development, because it allows really speedy iterations (or bugfixing).  However, some of these ideas are things I want to share or run more than just in a development mode, although not quite turn them into a full bore application.

Enter Phusion Passenger, the “mod_rails” plugin for Apache.  Passenger works for all Rack based applications, including Sinatra, making it pretty easy to setup a Sinatra app at a slightly more permanent location.

On l3ib.org, we have run lighttpd since the server was born, purely chosen out of its ease of syntax.  Over the years, things have been grafted on and some things are straight up hard to do on lighttpd, such as deploy Rails applications.  Luckily, our server provides a second public IP address, which Apache runs on.

Tonight, I created a staging area, called stage.minuslab.net, where I can dump these testing Sinatra apps as suburls.  I won’t link to the one app I put in there just yet as it is resource intensive and I don’t know yet how to throttle it to the outside world, but that will be coming a later haxpact entry.

I also wrote a quick script to manage adding each application as it is ready to be “deployed” - it adds the sub-uri to the stage.minuslab.net Apache configuration file, sets up the proper symlinks, writes the config.ru that is required, and restarts Apache all in one shot.  The script is buggy and internal only so I won’t share that either tonight, but it’s making developing small ideas with Sinatra even easier.

Making those Fn- laptop keys do something useful

A friend was trying to get some of her laptop's function keys working under Ubuntu, and that reminded me that I'd been meaning to do the same on my Vaio TX 650P.

My brightness keys worked automagically -- I suspected via the scripts in /etc/acpi -- and that was helpful in tracking down the rest of the information I needed. But it still took a bit of fiddling since (surprise!) how this stuff works isn't documented.

Update: That "isn't documented" remark applies to the ACPI system. Matt Zimmerman points out that there is some good documentation on the rest of the key-handling system, and pointed me to two really excellent pages: Hotkeys architecture and Hotkeys Troubleshooting. Recommended reading!

Here's the procedure I found.

First, use acpi_listen to find out what events are generated by the key you care about. Not all keys generate ACPI events. I haven't get figured out what controls this -- possibly the kernel. When you type the key, you're looking for something like this:

sony/hotkey SPIC 00000001 00000012
You may get separate events for key down and key up. It's your choice as to which one matters.

Once you know the code for your key, it's time to make it do something. Create a new file in /etc/acpi/events -- I called mine sony-lcd-btn. It doesn't matter what you call it -- acpid will read all of them. (Yes, that means every time you start up it's reading all those toshiba and asus files even if you have a Lenovo or Sony. Looks like a nice place to shave off a little boot time.)

The file is very simple and should look something like this:

# /etc/acpi/events/sony-lcd-btn

event=sony/hotkey SPIC 00000001 00000012
action=/etc/acpi/sonylcd.sh

Now create a script for the action you specified in the event file. I created a script /etc/acpi/sonylcd.sh that looks like this:

#! /bin/bash
# temporary, for testing:
echo "LCD button!" >/dev/console

Now restart acpid: service acpid restart if you're on karmic, or /etc/init.d/acpid restart on earlier releases. Press the button. If you're running from the console (or using a tool like xconsole), and you got all the codes right, you should be able to see the echo from your script.

Now you can do anything you want. For instance, when I press the LCD button I generally want to run this:

xrandr --output VGA --mode 1024x768

Or to make it toggle, I could write a slightly smarter script using xrandr --query to find out the current mode and behave accordingly. I'll probably do that at some point when I have a projector handy.

March 09, 2010

GNOME Developer Kit, now with less fat!

UPDATE: Thanks Alberto Ruiz for pointing out that VirtualBox can use .vmdk files, so the VMware image can be used for that purpose.

Thanks to the incredible work of Zhang “Jesse” Sen and Vladimir Melo, a brand new release of the GNOME Developer Kit has been published! “What’s new”, you may ask? Everything, since all packages are built directly from git.gnome.org! :) But that alone is not what makes this release so cool, but the fact that the final image went through a dramatic “diet”, shedding a lot of its “weight” and going from a 1.4GB monster to less than 700MB of pure GNOME goodness!!!

From Screenshots

Firefox was replaced by Epiphany and codecs and fancy-Nancy stuff was scrapped to make room for a lightweight release for developers and translators!

So go ahead and try the new images today:

K.Mandla

It’s nice to see, on occasion, proof that my ramblings and rantings are having some effect on the collective Linux psyche, however minimal. I don’t expect to see everyone dropping Xorg, the sluggard, just because I point out its rotundity, but if you find yourself leaning more and more toward a console-only system, if the dark side of the Force is beckoning you, well. …

Well, you’re not alone. Don’t be embarrassed or shy or feel somehow diminished if you prefer a text-based system against a graphical one. There is at least one more of you out there, beyond the screen.

But at the same time, the rule of thumb is to use what suits you best. I can ramble and rant for hours on end, for days and weeks on end, but that doesn’t mean my way is the best way. It only means my way is the best for me.

So there is no implication of superiority, no surreptitious allegations of inferiority, or any other -ation of -ority. Use what you like, how you like, on the machine you like. That, in its core, is what is best about Linux: We can all do whatever we want, however we want, with whichever works best. Your way is the right way.

But of course, if you’re another console-only weenie, and you want to give a shout out, feel free. We have a kind of club, you know, and anyone can join. Dress is casual, there will be punch and pie, and your only obligation is a screenshot. For example …

That’s this machine, of course, with a Grub-to-console boot time of 23 seconds (including the time it takes to snap the framebuffer into place), a full-workload memory footprint of less than 18Mb and taking up around 1Gb of hard drive space. Jump in any time. … :mrgreen:


l3ib.org haxpact – Some Themes

Despite being a somewhat dysfunctional l3ib member I’m tossing my hat into haxpact.

I don’t have much going on except a mess of scripts and some themes but let’s begin.

The new artwork has surfaced for ubuntu, this is pretty old news. I thought I’d try and make an openbox version so, y’know, the kids don’t have to miss out? Before we get to pretty pictures, let’s start with misery:

1. It’s obviously not a pixel for pixel port, it’s an openbox theme that will go with the gtk/icon/background etc.
2. There will be no rounding (see point one)
3. The buttons really are not the same, no.
4. This is really just a first attempt.

Look at openbox radiance here

I’ll get together a tarball when I have finished the bits off, as well as the ambiance theme.

I have a few tidying up things I’d like to do with some other artwork and themes this week too, we shall see if that happens…

Rainbow 2.0

As my first haxpact entry, I decided to finish up the remaining pieces of rainbow, a toy program I developed that I find useful when doing anything with color (HTML stuff usually).  It’s a Ruby/GTK program that displays hex color codes found in plain text.  Here’s a current screenshot:

It has just been released as Rainbow 2.0.  Go check it out!

Rainbow never had an official 1.0 release, as it was waiting on a bug to be fixed in the Ruby/GTK bindings in order to let drag and drop work.  That bug is long since fixed, but I wanted to improve the visual nature of the program to show colors more proportional to the number of times they occured in the file.  Let’s start back at program inception and show the progression.

rainbow early concept

The rounded corners were adapted from a Python GTK theme color previewer that someone posted on Planet GNOME once (I forget who or where!), and the grid layout is using some seriously sketchy math on my part to lay it out.  This is however a working concept, parsing colors from text input and putting them into the grid.

rainbow 1.0

That grid concept grew more and I eventually surrounded it with some options such as sorting by hue or count, and showing text labels of the hex colors. This was supposed to be released as 1.0, but never quite made it due to waiting for that Ruby/GTK bug to be fixed (as well as general apathy).

I then tried to modernize it by throwing out the grid concept and making the swatches proportional to the number of occurances read in the input, but I really didn’t know how to do that. I stumbled across the “bin packing problem” and tried to adapt it to rainbow, with disastrous results:

binfit

The problem with the bin packing solution is that you need to know the dimensions of the items you are trying to pack, in this case, the colors, and that’s not what I care about here.  I just care about the area the colors take up.

Then I remembered a Windows application that displayed file usage as some sort of divided squares. After some googling, I found it: TreeMap. I adapted some code from the open source Java implementation linked there and used it to form what is rainbow 2.0.  Give it a try!

March 08, 2010

l3ib.org haxpact begins tonight!

A number of l3ib.org members have agreed to spend every day of the next month haxing on something interesting and blagging about it: HAXPACT.  Today is the first day of haxpact, and those of you subscribed to Planet l3ib should see some activity by midnight tonight.  The goal of haxpact is to generate interest and momentum on projects that most of us are too lazy to keep up with.

First off, credit where credit is due, haxpact is copying the idea of Gabor Papp and friends from the livecoding world.

Second, rules for participants:

  • Every day, from 8 Mar to 7 Apr, you must create something and blag about it
  • You may use previously unpublished hax from before this month, as long as you blag about it
  • Anything considered creation counts: code, web pages, graphics, visualization, music
  • Stuck?  Learn something new like processing, fluxus, CFDG: all visual things with quick learning curves

I plan on making a progress report similar to django advent or RPI’s RCOS Dashboard (my alma mater!).

Participating l3ibs include myself, andrewy, Fitzsimmons, and jvd. If anyone unaffiliated with l3ib.org wishes to participate, send me an email and I’ll add you to the accumulator. You should drop by #l3ib on freenode too.

Happy haxing!

K.Mandla

It has happened again, so I have to wonder again: What’s the reason for a sudden, vitriolic knee-jerk reaction to the idea of someone forking a distro?

After all, you have a slightly different idea of where a distribution should go. You have a plan, a goal, a mission statement and your own favorite wallpaper. What more do you need than that, plus a little ambition, to set yourself up as supreme dictator for life?

I understand brand loyalty, if that’s the reason for the reaction. After all, some people would have every Ubuntu variant ever concocted permanently erased, or at least merged into one megadistro available on a series of six DVDs. But just about every brand out there comes with a clause that says if you want, you can adjust and redistribute it, free of hassle, free of charge and free of obligation. So it’s not like it’s some big surprise that someone actually follows through on that.

Or maybe it’s an inability to see a distro’s shortcomings. I can understand that, if you think your preferred version is all that and a bag of chips. It’s an unfortunate situation, but not a difficult one to understand: Brand X does everything you ever wanted, so it must be perfect for everyone else too, right?

If I had the guts, I would threaten to rerelease just about every distro out there, and effectively double the number of available options, just to annoy the people who are already annoyed by the software buffet before them. And all I would do is tweak the default wallpaper. Oh, if only I had the guts. And the time.

But I won’t dwell on this any longer. I’ve discussed it in the past; splitting off someone’s work and dedicating your time to it does no more harm than take your time away from you. It’s educational, it’s free (short of bandwidth and hosting, I guess) and you’re allowed to, for goodness sake.

So don’t be shocked or rude when it happens. Everybody has to start somewhere, and nobody benefits from that kind of negativity. Be kind to one another. …


March 07, 2010

Recipe: Crockpot Rouladen

I never blog recipes. But while I was making rouladen today, I remembered when I first tried to make it, and discovered that the recipes on the web were all for something entirely different than the delicious rouladen my mom used to make. Mom got the recipe from a German babysitter named Betty who used to take care of me when I was little. It was fantastic and I haven't had anything else like it anywhere, so I asked Mom for the recipe, adapted it a little for my crockpot, and have been enjoying it ever since.

Apologies for the lack of precise quantities. This is how we do recipes in my family, and I'm not great at following precise instructions anyway, and in any case, the recipe originally came from Mom watching Betty make it once.

Crockpot Rouladen

Flank steak - lay it out flat.

Mustard - whatever kind you have lying around. Paint a thin layer onto steak. I personally hate mustard, but it doesn't taste like mustard in the final dish so it's okay.

Bacon - maybe 5 pieces. Cook to not-quite-crisp, to get rid of some of the fat. I cut off some of the fat too, but I'm weird that way. Lay strips on top of mustard.

Bread crumbs - Sprinkle on top of bacon. A little or a lot, as you wish. Enough to leak out when it's rolled, as it thickens the sauce nicely.

Roll steak up and secure with skewers or string. Watch the grain and roll it so that when you slice it, you'll be slicing across the grain. This will seem weird and wrong and you'll want to roll it up the other way because this way you'll end up with a long skinny thing that doesn't fit in the pot. It'll taste just as good either way, but it'll be a lot easier to eat if you roll it up the right way.

Brown steak a bit in small amount of oil, any kind ... maybe use a little of the bacon grease.

Onions, sliced - I don't like onions, so I leave them out.

Tomato sauce - one regular-sized can. Pour over steak. Add a little water too, up to about 1/3 can, if you want more sauce.

Salt, pepper, spices as desired. I add a little cinnamon, to make it taste more like Grecian Chicken (another tomato-sauce recipe where googling gets entirely the wrong result, and if I ever find it I'll be sure to blog it) or like the chicken tikka masala at Bollywood Cafe (which has no resemblance to tikka masala anywhere else, but is wonderful). I usually toss in a couple of bay leaves too, and whatever else I feel like adding that day.

Cook in the crockpot maybe 6.5 hours on high, longer on low. Also works fine simmering in a pan on the stove -- check it about 2.5 hours but expect it to take 3 or so. It doesn't hurt to baste occasionally, or add water if it starts to look dry (in the crockpot that usually isn't needed).

In the last hour or two, toss in:

Raisins - maybe a double handful (a couple small boxes).

When it's done, it should be falling-apart tender.

Serving: Cut small rounds, ladle sauce over them, and serve with noodles or bread.

Enjoy!

K.Mandla

While the Ubuntu rebranding is still at the forefront of everyone’s mind, I think I’ll throw in my meager opinion: It’s great. I love it. It’s clean, it’s fresh, it’s a new direction. It’s classy, it’s simple, it’s sharp and it’s light —

Waitaminute. Are we talking about the logo, or are we talking about the software? I understand that the theme is light; after all, the new typeface and the simplified icon are “lighter” than the past ones, in a visual-effect sense. I have worked in print media, and I can more or less see through the marketing jargon.

And the desktop is interesting, even if we seem to be transitioning between orange and brown and purple (my primary school art teacher is having a heart attack right now). We all know the default desktop is a completely pointless exercise anyway.

No, it’s lines like this that throw me into a painful 10-minute giggle fit.

Good software is “light” in the sense that it uses your resources efficiently, runs quickly, and can easily be reshaped as needed. Ubuntu represents a break with the bloatware of proprietary operating systems and an opportunity to delight to those who use computers for work and play.

The first sentence I have no qualms with; I can agree in principle. But the second is a slight derailment, in that it doesn’t really follow the idea of the first. Is this one of those clever marketing psychology gimmicks? Am I reading one of those advertising school ploys to keep me buying at a frenzy? or downloading at a frenzy, I should say? Is this a trick question?

I’ll cut to the chase. If the intent is to somehow assert that Ubuntu is light … well, I am bemused, to say the least. A default Ubuntu desktop — even with a K or an X at the front — wouldn’t know “light” if the idea jumped up and bit it on the ankle. You say “light” and the last thing I even consider beginning to get the urge to want to start debating thinking about … is Ubuntu.

And suggesting the idea is valid because Ubuntu is somehow lighter than Windows or Mac OSwhatever won’t work either. That’s like saying, “I’m not as fat as that girl,” and expecting people to applaud your waifishness. Please.

I have no problem with a facelift, especially since a new captain is in the chair, and there is always a trickle-down suggesting a change in command should be accompanied by a change in appearance. That much I almost expect.

But let’s not make suggestions, allusions or triple entendres. You want to tell me Ubuntu is solid, it’s dependable, it’s reliable or trustworthy, and I will accept that with the standard-issue “case-by-case” caveat. All of those things it may be, but light … no, no. Don’t make me laugh again, please. …


March 06, 2010

K.Mandla

One quick note today, and not necessarily aimed at Linux users: You may have noticed a small link on the right that says “Surprise me!” If you click on that you get taken to a random page on this blog, which is either interesting or not.

I had been looking for a way to do this but didn’t find any guidance on it in WordPress.com’s help pages (I will confess to not looking very hard though :roll: ). I spotted a random page link on another, “professional”-grade site (in other words, one that has ads and gets to seriously customize the layout) and it’s nothing incredibly fancy.

http://kmandla.wordpress.com/?random

Throw that into the link box, or in the href field in your <a> anchor tag. Make sure you change the first part of the URL though, or you’ll get sent back to my site. Which would be either interesting or not. ;)


K.Mandla

The other thing I wanted to mention about my brief interlude with Arch a day ago, was my surprise at using wicd. Ordinarily I wouldn’t bother messing with utilities or daemons that manage network connections. I rarely see the need when I can hand-edit the rc.conf file more quickly and easily than working my way through a GUI.

On the other hand, I have family members whose frustrations with Windows 7 and its precursors occasionally warrants teasing :twisted: , and something like this is just the ticket.

Knowing that at some point they might ask for a system built to look like Windows XP Classic means I have to prepare for the least common denominator, and that means the things I take for granted — like reconnecting to a different network interface, or automounting USB stuff, or point-and-click wallpaper management — need to be a little easier to handle.

Enter wicd. To put it simply, this program completely usurps the need for Arch’s default net daemon in your system. I have !net set in my rc.conf, wicd added, and the wicd-gtk interface set to run with the .xinitrc file. And without prompting and without coaxing, it quite easily finds the open interface, connects, and sits back and relaxes.

It’s clean, it’s fast, it’s magical. I was amazed, to be honest. I have come to imagine most of these utilities as requiring more work than they save, but wicd is almost too easy. It can jump between connections at the drop of a hat, will spit up a very simple transmission/receive meter, has a dead simple configuration panel, and after that, it doesn’t do anything but what it’s supposed to.

I’ve tried to confuse it by swapping hardware, and it doesn’t skip a beat. It doesn’t care if you’re using wireless or wired connections. About the only complaint I could make is, I would like to be able to customize the tray icon. I know: How shallow is that? :|

But really, when you start up a program for the first time, and it does exactly what it’s supposed to, and it’s frighteningly easy to manage, and you can’t seem to confuse it … well, what else is there to say? A gold smilie for the wicd people: Nice work. :D


March 05, 2010

Adding video to an OpenOffice Impress presentation

(and how to convert MPEG video to animated GIF)

I gave an Ignite talk this week at Ignite Silicon Valley. It was a great event! Lots of entertaining talks about all sorts of topics.

I'd always wanted to do an Ignite speech. I always suspected the kicker would be format: O'Reilly's guidelines specified PowerPoint format.

Of course, as a Linux user, my only option for creating PowerPoint slides is OpenOffice. Historically, OpenOffice and I haven't gotten along very well, and this slide show was no exception. Happily, Ignite needs only 20 slides ... how hard can that be, right? Most of my slides were very simple (a few words, or one picture), with one exception: I had one simulation I wanted to show as a video. (When I give this presentation on my own machine, I run the simulation live, but that's not an option on someone else's machine.

Impress woes

First I wrestled with Open Office to create the non-animated slides. It was harder than I'd expected. I just loved having to go back and un-capitalize words that OO kept helpfully re-capitalizing for me. And the way it wouldn't let me change text format on any word that triggered the spellchecker, because it needed to show me the spellcheck context menu instead. And the guessing game clicking around trying to find a place where OO would let me drag to move the text to somewhere where it was approximately centered.

And when I finally thought I had everything, I saved as .ppt, re-loaded and discovered that it had lost all my formatting, so instead of yellow 96 point centered text I had white 14-point left-aligned, and I had to go in and select the text on each slide and change three or four properties on each one.

And I couldn't use it for an actual presentation. In slideshow mode, it only showed the first slide about one time out of six. The other times, it showed a blank slide for the first 15 seconds before auto-advancing to the second one. The auto-advance timing was off anyway (see below). Fortunately, I didn't need use OpenOffice for this presentation; I only needed it to create the PPT file. I ended up making a separate version of the slides in HTML to practice with.

Inserting a movie

But I did eventually have all my static slides ready. It was time to insert my movie, which I had converted to MPEG1 on the theory that it works everywhere. With the mpeg added, I saved one copy to OpenOffice's native format of .odp, plus the .ppt copy I would need for the actual presentation.

Then I quit and opened the .ppt -- and the video slide was blank. A bit of searching revealed that this was a long-known issue, bug 90272, but there seems to be no interest in fixing it. So I was out of luck if I wanted to attach an MPEG, unless I could find someone with a real copy of PowerPoint.

Plan B: Animated GIF

Next idea: convert my 15-second video to an animated GIF. But how to do that? Google found me quite a few web pages that claimed to give the recipe, but they all led to the same error message: ERROR: gif only handles the rgb24 pixel format. Use -pix_fmt rgb24.

So what? Just add -pix_fmt rgb24 to the commandline, right? But the trick turns out to be where to add it, since ffmpeg turns out to be highly picky about its argument order. Here's the working formula to convert a movie to animated GIF:

$ ffmpeg -i foo.mpeg -pix_fmt rgb24 foo.gif

This produced a huge file, though, and it didn't really need to be 1024x768, so I scaled it down with ImageMagick:

convert -depth 8 -scale 800x600 flock-mpeg.gif flock-mpeg-800.gif
which brought the file size from 278M down to a much more reasonable 1.9M.

Happily, OpenOffice does seem to be able to import and save animated GIFs, even to .ppt format. It has trouble displaying them -- that's bug 90272 -- so you wouldn't want to use this format for a presentation you were actually going to give in OpenOffice. But as I mentioned, OpenOffice was already out for that.

If you do this, make sure all your static slides are finished first. Once I loaded the animated GIF, OpenOffice slowed to a crawl and it was hard to do anything at all. Moving text on a slide turned into an ordeal of "hover the mouse where you think a move cursor might show up, and wait 45 seconds ... cursor change? No? Okay, move a few pixels and wait again." Nothing happened in real time. A single mouse click wouldn't register for 30 seconds or more. And this was on my fast dual-core desktop with 4G RAM; I don't even want to think what it would be like on my laptop. I don't know if OOo is running the animations continuously, or what -- but be sure you have everything else finished before you load any animations.

The moment of truth

I never found out whether my presentation worked in real Microsoft Powerpoint. As it turned out, at the real event, the display machine was a Mac running Keynote. Keynote was able to import the .ppt from OpenOffice, and to display the animation. Whew!

One curiosity about the display: the 15 seconds per slide auto-advance failed on the animated slide. The slide showed for 30 seconds rather than 15. I had written this off as another OpenOffice bug, so I wasn't prepared when Keynote did the same thing in the live presentation, and I had to extemporize for 15 seconds.

My theory, thinking about it afterward, is that the presentation programs don't start the counter until the animation has finished playing. So for an Ignite presentation, you might need to set the animation to play for exactly 15 seconds, then set that slide to advance after 0 seconds. If that's even possible.

Or just use HTML. The great irony of this whole story is that some of the other presenters used their own laptops, so I probably could have used my HTML version (which had none of these problems) had I asked. I will definitely remember that for the next Ignite! Meanwhile, I suppose it's good for me to try OO Impress every few years and remind myself why I avoid it the rest of the time.

K.Mandla

I used the word “fitful” to describe installing Arch Linux on this machine the other day, and I should probably explain why.

The 2009.08 ISO has a couple of interrelated idiosyncrasies on this hardware, which I don’t think I have described in the past, but are worth mentioning. (It’s possible that I have mentioned them in the past, but perfect recall on a 4 1/2-year-old post-a-day blog is getting difficult. Please bear with me if this sounds familiar. :( )

That ISO, and some of the ones before it, have two boot options — one for SATA-style drive labeling, and one for old IDE-style naming. In other words, /dev/sdaX or /dev/hdaX. It’s not a huge difference, or at least it hadn’t been up until now.

I don’t usually pick the first option, but this time I did and got some of the strangest, most bizarre behavior from an Arch environment I ever saw. Network access was fruity to say the least, with the setup program downloading little more than the names of the files from the server, touching them in the temporary directory, and then complaining because it couldn’t install them. The one or two programs that did manage to survive the blast seemed somehow scrambled if I tried to tamper with them from another window.

It wasn’t just network access either — the drive (if you can believe this) seemed to sometimes be there, and sometimes not. I don’t know how else to say that, except that I could change into the temporary installation directory and find the wreckage of the installation, but seconds later the terminal would hang and tell me it was unable to find files or programs I asked for. Very strange.

I tried this twice, thinking the first was just a fluke, but a reboot using the same SATA-style selection yielded similar results. I know I should be concerned and I know I should be looking for some sort of bug to report … but where do I start? So many things were scrambled I don’t know what to say is wrong. And what does it have to do with that boot option? :???:

Anyway, the second boot option is usually the one I rely on, and at least this time I knew what I could expect. Behavior was normal, network access was normal, the system installed fine … except for one small thing: On the first boot, the system froze, complaining that the root drive was unavailable.

If you ever run into this problem, I can tell you that message is both true and false. It is available, and it isn’t. The issue is that the installer wrote out your /etc/fstab file with /dev/hdaX drive assignments — as you expect it might.

However, the kernel boots and recognizes everything with /dev/sdaX drive letters, and so asks for your help. The solution is somewhat straightforward: Remount the drive so you can write to it (the instructions are right there at the login prompt), then edit the /etc/fstab file to change the drive lettering to sda-style. Reboot, and it should work fine.

I’ll look around for a bug report on that particular issue, since it’s a rather easy one to pin down. I don’t know how much I can do about that first situation though, and it’s always possible this was something unique to this machine. I have one more thing to note in this short Arch experience, but I’ll save that for the next post. … :)


Book Preview: Python Testing: Beginner’s Guide

Python Testing: Beginner's Guide

Python Testing: Beginner's Guide

I was looking for some material on proper python testing in order to improve my QA skills and after some “Googling” came across “Python Testing: Beginner’s Guide“. My first impulse was to hit Amazon and see if they had it and if I could buy an ebook version. Sadly, they only had the “dead tree” version, so I decided to check if the publisher, PackT Publishing, had an alternative.

Boy, was I glad I hit their web site! Not only there was an ebook version of that book, but they do not password protect them, giving you complete control over your purchase!!! You can also copy text from it, which makes your life really easy when you’re following along and want to copy some of the code being described!

Needless to say I purchased the ebook version and have already allocated my weekend to read it, so you can expect a review next week. In the meantime, here’s a free chapter (PDF) for you to get a taste for the book: Chapter 5: When Doctest isn’t Enough: Unittest to the Rescue

March 04, 2010

K.Mandla

Actually I know exactly what I was thinking. I was thinking, “Gee, it’s been a year since I had a graphical desktop on this computer. I should check and see if things are working again.”

And you know what? They’re not. It was issues with the siliconmotion driver that initially drove me away from X, and in all that time, things are still gunked up. Maybe I was expecting too much. Or maybe the hardware is just too darned old, and everyone else with a Silicon Motion card has a machine a good deal newer than this one.

Regardless, after a rather fitful installation of Arch Linux, I discovered that the 1.7.3 version of the driver and the 1.7.5 version of xorg-server still spatter garbage across my desktop. A year later, and moving windows creates wakes of multicolored pixels. A year has passed, and typing causes splattered rainbows inside text boxes. Twelve long months, and the cursor leaves white smears everywhere.

Oh well. It was worth a shot.

I am not without options of course, since there is always the vesa driver to consider, as well as the fbdev driver. In my case only fbdev actually gave me a working desktop, since vesa only sent me to a dead black screen. fbdev isn’t much of an option either, since there’s a heavy flickering effect when I move windows, and screen redraws are painfully obvious. Better than nothing, I suppose.

But perhaps even more frustrating was the fact that I could only have one driver installed at a time, since any xorg.conf file I built was promptly ignored by X. If I didn’t want it to pluck the siliconmotion driver from the throng, I had to yank it out completely.

That I blame on hal, since I also couldn’t get the Japanese keyboard configured in a standard (the old standard, maybe?) xorg.conf file. I tried to manhandle hal’s fdi files, buried deep in the inconvenient /etc/hal/fdi/* directory. But adding almost anything to hal’s little world (XML … yuck) either had no effect, or caused a complete loss of keyboard input. Somebody throw me a bone here. It can’t be so frustrating to get an international keyboard set up under hal with Arch.

I am sure 100 percent of these complaints are attributable to my inexperience using Xorg with hal in the driver’s seat. Perhaps if I had spent a little time with it, I would be able find exactly the file that needs editing, or the tweak that needs setting, that would allow me to type properly in X, or set one driver over another as my preferred form of output.

But I must confess I don’t have the patience. It’s not that spectacular to me, to be able to use a Windows XP-ish IceWM on a 550Mhz Celeron. Because even in the best case scenario, with that same setup running with fbdev as the video driver, the system requires more than twice as much memory, plus as much swap, just to stream music over a network connection. And add to that the CPU is usually hovering around 40 percent workload, according to htop.

Video playback is workable, but was better when I had the entire machine at my disposal. And it goes against my grain somehow to think that I now have X as an interpreter between me and mplayer, and it’s (sort of) using the same method of output as my home-grown framebuffer-only custom-built mplayer.

I know most folks count me amongst the stranger eggs in the basket for running a console-only system against the framebuffer 24-7, but really, what do I gain from a graphical setup? A groggy system, sloppy window redraws and not even the scant 3D acceleration that I should have with this graphics card?

No thanks. I’ll stick with what I know. I cloned the drive before installing Arch, and it’ll only take me an hour and a half to put the old system back in place over USB1.1. Always have a Plan B. (Or was it C … ?) ;)


March 03, 2010

K.Mandla

My calculations tell me that it’s been almost exactly a year since the siliconmotion driver went so far gone as to be unusable, and as a result I ditched X altogether. By extension I could argue that it’s been almost exactly a year since I used a graphical arrangement on this machine, and that wouldn’t be far from the mark.

I sometimes used a live CD of Slitaz or another ultra-lightweight distro if something required a graphical approach. Occasionally there is a tool which is simply easier and quicker to run (EasyTAG springs to mind) than its command-line analog.

But I’ve realized that those instances are rare, and outside of specific tasks and applications that some people find irreplaceable, I — and maybe you too — can comfortably live without X and all its trappings, for nine-tenths of the things I do from day-to-day.

It’s something I have discussed many times before, so I won’t waste too much more space going into details. I try to rehash it on occasion, because the ramifications of moving away from a heavy desktop environment to a lightweight console arrangement go beyond the aesthetic. I type to you from a museum-quality 120Mhz Pentium that I bought for a measly US$10 a few months ago in a secondhand shop, and it has wireless capability, completely silent operation, low power use and low heat output, stereo audio, international keyboard, etc., etc.

I’ll be direct this time, so as not to miss the point: You can save a lot of money if you stop buying new computers to keep up with graphical “advances,” and stick with lighter applications that don’t require exotic, overpowered components.

Maybe that’s not appealing to you, and maybe you have gobs of money to throw around. But it doesn’t make it any less true. :)


K.Mandla

I’ll make this quick and dirty: I have two family members now who have nothing good to report about Windows 7.

One of them has recently started working with Ubuntu, and so in that sense, the dissatisfaction might stem from the obvious contrast between Ubuntu and Windows. However, the other family member is an incorrigible Windows user, but has already made plans to reinstall Vista.

That’s saying something.

I myself have never seen it in action, so I don’t have an opinion on the issue. And I won’t extrapolate beyond the information I can report. I have editorialized over Windows 7 in the past, but I have nothing to add to that. End of post. :twisted:


Transifex “Magneto” Appliance 0.8 is out!

Following the tradition of releasing simultaneously with the Transifex project, I’m pleased to present you the Transifex “Magneto” Appliance 0.8! There are just too many cool features to mention here… so I won’t! Just go ahead and read the release notes instead.

From Transifex v8.0 featutes

As far as the appliance goes, the most important thing to know is that I dropped MySQL and replaced it with Postgresql, so if you’re thinking of updating an existing deployment, you’ll have to backup your data and handle the restoration process. If you’re installing for the first time, choose from the following image types:

  • Installable ISO (x86)
  • Installable ISO (x86_64)
  • VMware (x86)
  • VMware (x86_64)
  • Amazon EC2 Small (ami-af8669c6)
  • Amazon EC2 Large (ami-b7a54ade)

The appliance is pre-configured with 2 unique users: editor and guest (with passwords editor and guest respectively) and several projects for you to play!  To keep it up to date, log in to the web based administrative interface by connecting to your appliances url using https and adding port 8003 at the end. Then, login as admin (the initial password is password but you’ll be prompted to change it during the initial wizard). I can proudly say that the Transifex Appliance has been downloaded several hundred times in the last 2 months and is currently being used by several companies and projects that are either test driving Transifex or decided to host their own instance like the Xfce project for their translations!

As always the development branch of the appliance will follow the development code line of Transifex and provide a playground for anyone who wants to help out the project, such as the tasks created ahead of the upcoming Google Summer of Code. :) Download the appliance today and see why projects such as Meego, LXDE, Xfce, Fedora, and many more chose Transifex to manage their translations!

March 02, 2010

K.Mandla

A short note, only to mention that I’ve added the X60s to my hardware page, which is pretty much a papal blessing as to whether or not a machine gets to stay here for longer than a week or two at a time.

I am quite impressed, if I must tell the truth. The machine is within a hair’s breadth of exactly what I was looking for in terms of power, portability, Linux compatibility, price and aesthetics, with the need for an external optical drive being the only “soft” point. I am willing to forego that to recoup some of the other issues though.

It might be a little early for me to recommend this machine over others, and since this only the third or fourth Thinkpad I have owned (not including the very, very early one which has been more a disappointment than anything), it might be out of line for me to do so. But I can tell you I went looking for a Thinkpad and picked out one based on its power and price, and got darn-near exactly the machine I had imagined.

Beyond that, I don’t know what other praise I can give it. It’s just right for me. You never know, it might be for you too.


GNOME 2.30 Translations for the Faint of Heart

With the GNOME 2.30 release just around the corner, translators are feverishly working hard to get the desktop completely translated into a multitude of different languages! But unless you’re comfortable building the application you’re trying to translate on your own (or perhaps the entire desktop), you’re pretty much doing what I call “blind translations.”

From Screenshots

The good news is that you don’t have to do any compiling to play with the very latest GNOME applications! Just download the GNOME Developer Kit and start translating knowing that you can actually see what you’re translating!

Borrowing from a previous post I wrote, just what is the GNOME Developer Kit? It is a continuous build of GNOME packages all bundled up into a distribution (in this case, Foresight Linux) and distributed in a few different formats that you can either install or run in a virtual environmen.

So if you’re a translator or writing docs, imagine being able to see the application you’re trying to translate running right in front of you! As the GNOME Developer’s Kit already comes with a lot of tools such as gettext, intltool and poEdit, you got your work cut out for you!

So don’t just sit there! Go download your GNOME Developer Kit today!

February 28, 2010

K.Mandla

Once again I’ve collected a few links that I thought might make interesting posts, but to be honest, all of these are of a larger scale that what I usually focus on. And since some of them work on national and international levels, what I have to say about them is hardly important.

So in the format established by this post, I’m going to jot a quick note about each, and remove them from my to-write list.

  1. Starting with the most immediate, some folks have taken to calling YouTube “UselessTube” around the office. This stems from their dissatisfaction and being unable to see Olympic replays on the site. Personally I am not a big Olympics watcher, and I am not a big YouTube fan either, so the two things together don’t really enter my figurative consciousness. I will, however, agree that any time corporations get involved with things that began at a community level — like YouTube was, years ago — they quickly become less and less fun.
  2. Moving back toward Linux, apparently some people still think, even at this late date, that Ubuntu is not a contender. Three years ago you might have been able to make that argument, but we’re too far down the road with a product that only gets more and more popular to suggest it will fail. If a corporation could come up with a project or product that had even half the success that Ubuntu has had over the past five years, they would be rolling in money. So let’s get past the idea that Ubuntu and Linux “can’t compete” — by including them in the argument, you invalidate your position.
  3. Having said that, Matt Asay’s blueprint for Canonical’s future is a bit hollow to me. I hold Mr. Asay in about as much regard as I do Rory Clellan-Jones, in that marketing and corporate types aren’t much different from journalists any more. And I expect lofty overblown predictions from people like Mr. Asay, who are company front men. And personally I stand behind my comment from years ago, that Linux is essentially a follower, but no worse for being one.
  4. “More corporate funny business” is how I mentally categorize the recent shutdown of a botnet by Microsoft. Personally I’d like a lot more information on what exactly gets done when a botnet is “shut down,” because if it’s that easy, then you’d think they would be able to do a lot more to stop the other ones that are out there. Then again, if Microsoft hadn’t created such weak-sauce products, then maybe it wouldn’t a problem in the first place. …
  5. Microsoft is just another company trying to milk you of every dollar you have though, so I wouldn’t doubt for a second that it’s in league with the clowns trying to politicize open source as an axis of evil. The sad part is, judging by my experiences living in America, it’s altogether possible that such efforts will see fruit. I suppose, by extension, as someone who uses open-source applications and software, I am now an enemy of the American public. …
  6. (Bonus!) The sad part is, there are actually places on the planet where freedom and access to information are in danger, and not just from political shenanigans, as they often are in America. This note about the importance of TOR access in places like China or Iran will tug on your heartstrings, and had me halfway convinced that a building a TOR access point out of an old laptop is a worthy project. If I get the time and the know-how, I’ll give it a try, but of course, time and know-how are two things I just don’t have much of these days. … :|

That’s probably enough rambling. Now where’s my to-write list, so I can scratch those off. … :)


Blog entries aggregated on this page are owned by, and represent the opinion of the author.
Hosted by Tim Riley
Administered (to a degree) by David Barr