All posts by HJ

Richard Stallman holder foredrag i Oslo førstkommende fredag

Norwegian Unix User Group (NUUG) og Friprog-senteret har invitert Richard Stallman til å holde foredrag i Oslo fredag 1. Mars. For de som ikke vet det, er Stallman (også kjent som rms) en av initiativtakerene til friprog-bevegelsen, samt grunnlegger av Free Software Foundation og GNU-prosjektet. I tillegg har han vært involvert i utviklingen av GCC, Emacs og selvfølgelig programvarelisenser for fri programvare, deriblant GNU General Public License (GPL).

Foredraget vil handle om fri programvare og GNU-prosjektet. For mer detaljer, se NUUG sin informasjon om arrangementet.

My list of virtual machines

list_of_vmsThought I’d share the setup I have for virtual machines, how I use them to triage bugs and experiment with various software.

First a small digression, since the observant reader will notice I am using Virtualbox. When I first discovered and started playing around with virtual machines I had a computer incapable of hardware supported virtualization. I discovered this rather quickly since every virtualization solution I tried failed to work because they all required specific CPU features. After testing several solutions, I settled on Virtualbox because it also supported software-based virtualization. I’ve later replaced that machine, and while my current computer supports hardware assisted virtualization I’m still using Virtualbox as it is straight-forward and I am familiar with it. I did briefly try a couple of other solutions when I got my new computer, but didn’t find any obvious advantages they had over sticking with my existing setup.

Now, the machines. I have a set of the currently supported Ubuntu releases, organized by their code names. (Yes, I’m aware 11.04 reached end of life a while back.) They come in handy when confirming bugs or trying to track down which release something broke (or got fixed). My main use case is: load up the relevant release a bug was reported against, verify it is reproducible there, and then check whether it is also present in the latest development release.

All are kept more or less up to date, to make sure I have the latest version of libraries and other software when attempting to reproduce bugs. When I started triaging bug reports I used to simply install the software on my main system and check if the bug was reproducible there, though I quickly changed my approach for several reasons. Mainly because my main system wouldn’t easily allow me to test with multiple releases, but also in case my setup or set of installed packages would produce a different result than a system out of the box. The latter may not always be relevant, but there are some cases where it matters. For instance, say a program fails to run without a specific library which is not installed as a dependency, however since I already have installed the library for other reasons I wouldn’t be able to reproduce the issue. In cases like that it makes more sense to check what happens on a system out of the box.

In addition to the Ubuntu releases, I also run a couple of other systems. Arch Linux is nice and since it is rolling release distribution it usually includes the latest version of programs/libraries before most other distros. It’s ideal for testing whether projects still work as expected with the latest version of their dependencies, or to try out features in newer versions of programs. If newer versions of a library or compiler is released, it’s really convinient to be able to catch any issues early before it ends up the stable version of other distributions. In addition, Arch has a rather different philosophy and approach compared to Ubuntu, which is interesting to explore.

The Debian machine is running Sid (unstable). For most of the same reason as Arch, being able to test the latest version of projects, plus it will eventually turn into the next releases of Debian, Ubuntu (and related derivatives). As Ubuntu is based on Debian, it is of course also relevant for checking whether bugs are reproducible both places in case they should be forwarded upstream. As Debian is currently in freeze for the upcoming Wheezy release, there’s not many updates these days though.

Oh, and there’s a Windows 8 preview I was trying out when it became available. Used it some when it was announced. I’m pretty sure that will expire soon.

A Memory of Light released

“A Memory of Light” is the fourteenth and final book of the Wheel of Time, an epic fantasy series. It was released earlier today, and I’ve already picked up my copy which I had preordered through Outland.
Originally, the title was intended for the twelfth book. Then it grew too large, and was split into three: “The Gathering Storm” (2009), “Towers of Midnight” (2010) and this final volume. It is also the third book Brandon Sanderson has finished after Robert Jordan passed away in 2007. It was sad to see the original author pass away before he had the chance to finish the series. On the other hand, I think Sanderson has done a great job with the last books. He is also one of the best authors I have discovered over the last few years, and I am not convinced I would have done so had he not been chosen to finish the Wheel of Time. He has now taken a step back to focus on his own series and books again, and it looks like he already have plans to keep himself busy for a while.

Almost 23 years and thousands of pages since the first book, it is time to finally figure out how this story ends… At the end of the previous book most of the characters were joining forces and preparing for Tarmon Gai’don, The Last Battle. This is the event the books have been leading up to; the final confrontation between good and evil.

Steam for Linux beta tilgjengelig for alle

Som en tidlig julepresang har Valve gjort betaversjonen av Steam for Linux tilgjengelig for alle. Steam er først og fremst Valve sin klient for digitalt salg av spill, men håndterer også oppdateringer, flerspiller og mye mer. Etter at Valve annonserte at en Linux-versjon var underveis og en privat beta som startet i Oktober, er nå betaen utvidet slik at hvem som helst kan teste den ut. Inntil videre er Ubuntu 12.04 og senere versjoner støttet, men det virker ikke utenkelig at dette kan utvides til flere distribusjoner på sikt.

Sammen med Steam-klienten har de også portet flere av spillene over til Linux, på samme måte som de gjorde ved lanseringen for OS X. (I enkelte tilfeller kjører til og med Linux-versjonen bedre.) Samtidig har de samarbeidet med andre aktørerer, blant annet var de med på forrige Ubuntu Developer Summit og de har også hjulpet til med å forbedre grafikkdrivere. Det er spennende å se at Valve satser på Linux, hvilken oppslutning Steam får og hvilken effekt utvidelsen av spillbiblioteket gir.

Hvordan få virtuelle maskiner i Virtualbox til å koble seg til Internett på Ubuntu 12.10

Ubuntu 12.10 ble sluppet mot slutten av forrige måned, og jeg støtte på et par problemer ettter å ha oppgradert. Det rareste var at de virtuelle maskinene jeg har i Virtualbox ikke klarte å få tilgang til noen nettsider eller Internett generelt. Jeg bruker Virtualbox til en del virtuelle maskiner, både for ulike versjoner av Ubuntu men også for å teste ut andre operativsystemer. Siden ingen av de klarte å koble seg til Internett uavhengig av hva de kjørte, konkluderte jeg fort med at problemet lå i Virtualbox. Dette ble bekreftet etter en kort runde detektivarbeid der jeg fant en relevant feilrapport, både for Ubuntu og Virtualbox.

Som det kommer frem av Ubuntu sin feilrapport og Virtualbox sin er den underliggende årsaken hvordan Virtualbox sender DNS-spørringer. Det ser ut til å kun gjelde maskiner der nettverkstilkobling er satt til NAT, som er standard for Virtualbox.

Heldigvis er det mulig å få ting til å fungere igjen. Ved å åpne en terminal og kjøre kommandoen

VBoxManage modifyvm "maskin_navn" --natdnshostresolver1 on

vil den virtuelle maskinen heller bruke vertens DNS istedenfor. Dette fungerer uten problemer, men må endres for hver enkelt maskin.

Håper dette var til hjelp for andre som har støtt på samme problem.

Ubuntu Quantal Alpha 3 kan prøves ut

Forrige torsdag ble den tredje alfa-versjonen av neste Ubuntu-versjon (kodenavn Quantal Quetzal) tilgjengelig.  Ifølge den foreløpige planen vil den endelige versjonen være ferdig 18. Oktober. Ubuntu følger seks måneders utviklingssykluser, og siden forrige offisielle versjon kom i April, betyr det at vi nå har kommet halvveis. Dette er dermed et godt tidspunkt til å teste den kommende versjonen for å se hvordan ting fungerer og rapportere feil mens det enda er god tid til å fikse dem.

Selv har jeg hatt utviklingsversjonen kjørende i en virtuell maskin i lengre tid nå, og det meste ser ut til å fungere. Den største endringen hittil er i stor grad nyere versjoner av mesteparten av den inkluderte programvaren. Bortsett fra enkelte småfeil fungerer det meste problemfritt med tanke på at det er en utviklingsversjon med hyppige endringer.

Sign up for the Widelands tournament 2012

Since the first Widelands tournament back in 2010, we have been waiting for another one, and now it’s coming. Later this month the Widelands tournament 2012 starts, and everyone who signs up before January 21st can join in. For more information, and instructions for how to sign up see the announcement or the wikipage.

The first matches will coincide with the next offical Widelands Play Day (held the last weekend each month) taking place at January 28th. This means that even if you aren’t joining the tournament, you will still have the opportunity to play some multiplayer.

Ships in Widelands

A ship sailing from a port transporting stonesYesterday, ships were finally added to Widelands! Strictly speaking the ships have been in since build 16 was released, but now they even do something. Eager to test them out I took a look at the latest version, I edited the allowed buildings of Atlanteans and used the editor to set up a quick map with a small lake. I built a port on both sides of it, and then a ship which sailed between them, transporting wares and workers. Transportation was easy to set up by adjusting priority in the ports which worked just like a regular warehouse. The advantage of course is that with ships you can transport resources across the map as long as there is a port on both sides.

Personally, I’m really happy to finally get to play with ships. Those familiar with Widelands will know that it is similar to the older Settlers-games. And while Settlers II introduced ships, I have to admit I have only ever played demo versions of it. Ships, of course, were one of the promised features which was only included in the fullversion. They did include teaser screenshots and descriptions of how the ships worked though, and in some way I have been waiting more than 10 years to get the ships sailing back and forth on my screen.

And I think it looks awesome. At the present no scenarios or maps are built around ships since they have not been available and even now they are not enabled by default. However, I think that in time this can offer some significant changes to the gameplay. I look forward to how expeditions, colonies and dealing with territories split across the map works out.

For those who are impatient and want to try it out for themselves, grab the latest development build or compile the latest version yourself. (Beware that changes happen rapidly in the development versions and are not guaranteed to be free of bugs or issues.) For the rest, seafaring will be included in build 17 (unless something unexpected happens) which is due to be released some time next year. I look forward to it.

Hjelp, hva gjør jeg hvis en virtuell maskin bruker alt minnet mitt?

Jeg liker å kunne bruke virtuelle maskiner (fortrinnsvis Virtualbox), siden de gir meg mulighet til å teste ut forskjellige programmer eller andre ting uten at det forstyrrer oppsettet på maskinen jeg jobber på til vanlig. Dette gjør det enklere å eksperimentere mer fritt, og enklere å gå tilbake til slik det var før hvis noe går skeis.

Men, fra tid til annen, har jeg hatt problemer med at jeg har startet en virtuell maskin for mye. Enten fordi jeg hadde tenkt å se hvordan de virtuelle maskinene oppførte seg i nettverk eller rett og slett fordi jeg glemte jeg hadde andre kjørende. Særlig hvis det er lite minne (RAM), er det lett å ende opp i situasjoner hvor ting går såpass tregt at de tilsynelatende fryser vertssystemet. På dette tidspunktet er det selvfølgelig mulig å slå maskinen av og på igjen, men da mister jeg alt jeg har lagret, samt det tar ekstra tid. I tillegg er det ikke nødvendig, siden det er fullt mulig å bruke VirtualBox via kommandolinjen.

Si du kjører Ubuntu (eller en annen Linux-distro) og du nettopp har startet en ny virtuell maskin som sammen med de andre tar opp mesteparten av minnet og tilsynelatende fryser systemet dit. Trykk Ctrl+Alt+F1 for å komme til en annen virtuell terminal (hvordan du kommer tilbake igjen, tar vi for oss senere). Der vil du bli møtt av en svart skjerm med hvit skrift der du kan logge deg inn med brukernavn og passord. Etter en vellykket innlogging, vil du ha tilgang til en kommandolinje der du kan skrive inn kommandoer.

VirtualBox har en ypperlig klient for kommandolinjen som så vidt jeg vet kan gjøre alt det samme som det grafiske programmet. Kjør vboxmanage for å se alle mulighetene som er tilgjengelig. Det vi er interessert i nå er muligheten til å liste hvilke maskiner som kjører. vboxmanage list runningvms vil skrive ut en liste over de maskinene som kjører for øyeblikket. F. eks.
"maskin1" {masse-tall-og-bokstaver}
"maskin2" {masse-tall-og-bokstaver}

Vi har dermed navnene på de to maskinene som kjører. La oss si vi ønsker å pause den første, “maskin1”. Dette gjøres ved å kjøre følgende kommando: vboxmanage controlvm "maskin1" pause. Hvis du kjører vboxmanage controlvm ser du hvilke andre endringer du kan gjøre med maskinen, så lenge du oppgir navnet eller iden på maskinen der endringene skal gjøres. For å gå tilbake til det grafiske skrivebordet der vi kom fra, trykk Ctrl+Alt+F7. (Husk vi brukte Ctrl+Alt+F1 for å komme hit, og det er lignene terminaler fordelt på de forskjellige F-tastene).

Tilbake på skrivebordet bør ting fungere litt bedre siden den virtuelle maskinen som ble pauset opptar mindre av minnet i bruk. Du kan nå velge å stoppe maskinen helt, eller om du vil lukke andre programmer for å kunne kjøre ting samtidig. (Husk forøvrig at når du er ferdig bør du logge ut fra terminalen på Ctrl+Alt+F1 ved å bruke kommandoen exit.)

Collection of links #1

This is a collection of some various, interesting things I have stumbled across lately which doesn’t really justify a separate post each.

Someone made a Creative Commons licensed book about the architecture of open source applications. Since the code is open and freely available, this makes it possible to discuss how it is constructed and how the choices made in development affected the end result. Among the programs covered are Eclipse, Mercurial, CMake and Battle for Wesnoth. I read some parts of it, and it looks like they are already working on volume 2.

If you know what a Möbius strip looks like, you should check it out this short little story about a girl living in Möbius world. Actually, it is brilliant, so you should probably go see it anyway.

“Achieving your childhood dreams” is the name of a presentation I watched a long time ago (last fall or something), which is a really inspiring talk by Randy Pausch. He was a professor at Carnegie Mellon University. The talk is his chosen topic for what they referred to as a “last lecture”, which essentially means if you were given one last lecture to hold, what would you talk about? The twist here is that he had recently been diagnosed with cancer and informed he had maximum six months left. He also gave an interesting lecture on time managment. They have both been posted on YouTube by Carnegie Mellon.

Also on YouTube is the TV-series Pioneer One. It is an interesting approach because they are funded by donations and make the episodes freely available from their website. So far they have released four episodes, with two more coming soon. It is hard to say something about the plot without spoiling too much, but it is a sci-fi series.

And Ubuntu recently released alpha 2 of their upcoming Oneiric Ocelot release. Check here if you want to take it for a test spin, or here to see the expected release schedule. Since it is still under development, I recommend not using your day to day machine, but rather test it in a virtual machine or something in case something breaks.

Speaking of Ubuntu, you may have noticed the main colors used are orange and aubergine. If you have wondered exactly which colors are used, these two friendly owls (?) will let you know.

That’s it for now…