Package managers

Photo: Lachlan Fearnley (cc:sa)

Photo: Lachlan Fearnley (cc:sa)

Okay, so I was going to check out polymer, another component framework for web development. Naturally, I went right away, and clicked “get polymer”. It took me to a page giving me several options for retreiving the source code.

The recommended way was to download and install it using the bower package manager. So i carried on to the bower site. Bower is appearantly «A package manager for the web».

So, how do I get bower? – tells me “Bower is a command line utility. Install it with npm.”. npm is, as you may know, the package manager for node.js

So, how do I get npm? – By using the package manager for my Linux distro of course. apt-get install npm.

That is no less than three layers of package managers!

Making eclipse Kepler and Luna work on Ubuntu

This is a «note to self and to anyone that could need it» post.

I’ve had troubles with Eclipse with some Ubuntu installations for some time. I even have had switched to other IDEs, but now I «needed» some plugins that exists for eclipse, so I decided to try to make it work.

The problem has been that it either just hangs (OpenJDK 7) or crashes (Oracle JDK 7) after 4 seconds. Before this problem I’ve also experienced mediocre to bad performance out of Eclipse on Linux.

Some Googling lead me to this post on Stack Overflow. And the accepted answer worked for me to get around the freeze/crash problem. It seems that it fails to detect which html/js rendering toolkit to use, and crashes when it tries to load HTML widgets.

So, the solution was to append


to eclipse.ini

Also, according to some discussion on Google+, removing the Memory limits and bumping MaxPermSize to atleast 512m should improve the performance.
Screenshot - 01. juli 2014 - kl. 12.39 +0200

And it seemed to do so on my system.

Scale the 1024×768 laptop display to something more reasonable

My laptop has a 1024×768 px display, but most software and webpages these days assumes that you have larger screens, with base font sizes of 16px and up. That’s great, but it makes my laptop display very cramped.

Luckily xrandr in Linux lets you scale your display by some factor. By experimenting a bit, i found that a factor of 1.2 gives me lots of more space on the screen, while everyting is still looks fine.





Cisco releases free and libre H.264 code for browsers


«Cisco, actively involved in the development of WebRTC, has stepped forward with a possible solution. The company is releasing an open source, BSD-licensed implementation of the H.264 specification. It’s also releasing a compiled, freely downloadable binary version of that same source code. Cisco will pay the license fees for that binary module, and won’t pass that fee on to end users.» Ars Technica.

Sounds great yeah? – Then why aren’t I celebrating?

Because it makes harder for truly free and open codecs to get traction, and even survive.

This just makes the problems with H.264 even bigger. We have yet one less reason not to use it, which means that it’s use will be even more widespread, over the truly free and libre¹ video codec VP8, but the license fee problems actually remains the same.

«Cisco will pay the license fees for that binary module». And they offer the source code under a BSD license. But – if you compile this source code, and distributes it yourself, you’re still breaking the codec license, and Cisco won’t pay your fees. So the only thing you can use this source code for is to check that it’s not malicious, and hopefully, when you build it, the binary gets a signature that matches the signature for Ciscos provided binaries, so you can verify that it’s been built from the same source code. But that’s actually pretty unlikely, too.

This is one of the many hollow victories for FLOSS, that actually down the road will hurt free software pretty badly. Rather than going for a truly free and libre alternative, the pill gets just sugared enough for a lot of us to swallow, so we’ll throw our principals over board, and go for the less free alternative, because it’s easy.

We already have open and free implementations of H.264, and have had so for long. It’s called x264, and is the best H.264 encoder/decoder, and have been so for quite some time. The problems with H.264 lies not in the license on the implementation, but the license on the patents and the technology.

Then, why is Mozilla going for the Cisco codec?

Well, that’s the point. Firefox has been unable to use x264, because that makes them a distributor of the H.264 implementation, which means that they’d have to pay licensing fees to MPEG LA, for every download. With this codec from Cisco, they can, if they treat it as a plugin, let Cisco distribute it, and then Cisco will pay the fees.
For the user this is a great solution, and Mozillas focus is on user experience. But it still means that Mozilla can’t tweak the implementation, or make it available to users on platforms that Cisco hasn’t made binaries for. The article only mentiones Windows XP as the platform this would help (Vista and later has H.264 support from the OS). I assume that Cisco also makes binaries for Linux, but I haven’t verified that yet

¹) I know the Ars Technica refers to VP8 as «Google’s proprietary—but zero cost—VP8 codec». But that’s just plain wrong.


  • Gratulerer, Høyre, med valgseieren og en formidabel framgang
  • Gratulerer, FrP, med regjeringsutsikter
  • Gratulerer, Venstre, med mange nye mandater
  • Gratulerer, KrF, dere unngikk ytterligere nedgang
  • Gratulerer, MDG, med gjennombrudd og en representant på tinget
  • Gratulerer, SP, med status quo
  • Gratulerer, AP, med å være Norges største parti
  • Gratulerer, SV, med å komme over sperregrensen


Installing Java in 20 easy steps

So, I want to get Java, for some reason. Here’s the process:


  1. Go to, and look for the java downloads
  2. give up, and in a desperate attempt go to There you’ll find the download
  3. choose the version you want
  4. choose the version you want again
  5. choose the package version you want
  6. accept the dialog that tells you that in order to download, you need to accept the license first
  7. accept the license
  8. choose the package version you want again
  9. register for Oracle Technology Network
  10. discover that Oracle doesn’t read RFC’s, and rejects your email address
  11. enter another email address, and re-type your password
  12. verify your email by clicking the link they sent you
  13. (step 2 of verifying your email) log in to OTN
  14. Find the tab you had the download waiting in, and try to log in there
  15. Discover that Oracle forgot that you just accepted the license.
  16. Try the back button to go back and accept the license again, only to discover that they have broken the back button.
  17. do over steps 2, 3, 4, 7 and 8.
  18. unpack the bin file containing the rpm
  19. accept the license again
  20. install the rpm.

I can relate…

The Raspberry Pi as a print server for HP Color LaserJet 1600

Short story: fail.

I recently acquired a Raspberry Pi from Farnell/Element14. One of the uses I could see for this little device was to serve as a print server for my HP Color LaserJet 1600.

HP has good support on Linux, and Open Source drivers, through the hplip project. This printer is also supported through the hplip project. However, it requires some propietary firmware (plugin) to work.

The Raspberry Pi is an ARM device. Most consumer PCs are x86 or a deviation thereof. So the drivers and the firmware is made for an x86 architecture. This is not a problem with the driver, as it is Open Source. But the firmware is closed, and not available for ARM.

The end of the story is that the HP Color LaserJet 1600 does not work on the Raspberry Pi, though some other HP printers does.

Open Source for the win! Close Source FAIL!

Development SMTP server in Python

Sometimes, when you’re developing services that send email, you need a SMTP server that doesn’t actually send the email, but just lets your service connect, and send it’s message to the SMTP server.

This SMTP server implemented using the smtpd library in the Python Standard Library, logs every message sent to it to standard out, AND shows you a notification using dbus and Freedesktop notifications (GNOME, Unity, KDE, XFCE, etc…)

CodeWTF: Exception handling

Let us catch that exception for you, and give you a generic exception back. With no information about the original cause.

CodeWTF: If value is null, return null, else return value

Skilting for myke trafikanter ved anleggsarbeid

Denne uken har jeg vært uten sykkel fordi felgen sprakk på fredag, og sykkelverkstedene har mye å gjøre på for tiden. Derfor tok jeg buss til jobb etter å ha levert min datter i barnehagen på mandag.

Mens jeg satt og ventet, hørte jeg på NRK P2s Nyhetsmorgen, de sendte et innslag om ulykker med myke trafikanter forårsaket av manglende sikkerhetstiltak overfor denne gruppen ved vegarbeid.

Du kan høre innslaget her: har også dekket saken med en artikkel og video.

I går gikk jeg hjem fra jobb, og gikk forbi Nygårdstangen der et skilt har vært kjørt ned av anleggstrafikk i et halvt års tid.

Jeg rapporterte dette til Statens Vegvesen 6. mars 2012 via fiksgatami, da hadde skiltet ligget der en stund allerede.

Statens Vegvesen fulgte raskt opp, ved å kontakte BKK, som har ansvar for lysmasten som skiltet henger på, de inkluderte meg i korrespondansen.
Men, BKK svarte følgende 9. Mars:

Vi har kontroll på masten vår.
Problemet er at de holder på med transport av noen lange elementer slik at de ikke kommer forbi masten.
Transportøren skal varsle oss når de er ferdig.Dette har vi gjort avtale på.

Jeg fulgte opp med å spørre om dette var en type avtale BKK hadde anledning til å gjøre, men har ikke fått noe svar på det. Imidlertid kan jeg svare på det spørsmålet selv, ved å sitere §5 i Vegtrafikkloven

Det er forbudt å endre, fjerne eller skade offentlig trafikkskilt, signal, utstyr til kontroll av trafikk, oppmerking eller innretning for vegsperring.

I Bergen er det Politiet som er skiltmyndighet, det kan jo alltids hende at BKK har fått godkjennelse fra dem, men jeg tviler.

Da jeg gikk forbi dette skiltet i går lå skiltet fremdeles nede. Dette er et kryss som stort sett trafikkeres av store, tunge kjøretøy med store blindsoner, og det var da også begrunnelsen fra BKK på hvorfor masten ikke var satt opp igjen. I tillegg varsler skiltet noe så skjeldent som at trafikken i veien har vikeplikt for den kryssende sykkelveien, noe syklistene på strekningen er oppmerksom på, men som er såpass skjeldent at bilister sannsynligvis ikke er oppmerksom på det. Faren for en kollisjon mellom bil og sykkel er med andre ord stor.

Det føyer seg da inn i rekken av eksempler på hvordan sikkerheten til myke trafikanter neglisjeres ved anleggsarbeid.