The Pirate Bay's Struggle for Democracy

The Pirate Bay aka TPB is a website that hosts a huge repository of .torrent files, which are text-files with the equivalent of the following quote: "Hello! I have a file to share!" with references to the originator and his/her file that s/he wants to share. According to the Digital Millenium Copyright Act (DMCA) it is ILLEGAL to reference files which the originator does not have the copyright to. There are several problems with this: 1) DMCA is not a law in a country, but an American lobbying group representing rights-holders (and not, as they claim, artists); 2) The link-depth is apparently 1, so if I link to TPB myself I am not doing something "illegal" but if I link to said .torrent file on TPB I AM doing something "illegal"; 3) DMCA somehow thinks their lobby group’s copyright initiative magically applies to other democracies where no democratic process has been conducted to this effect; and lastly 4) TPB obviosly was not responsible for sharing a file the file-sharer did not have copyright to, nor are they responsible for the uploading of said file to their servers. In the course of events, TPB even changed the link-depth, so they are now just hosting .magnet files that refers to .torrent files on other servers that refer to the file in question. Members of TPB are imprisoned or wanted by police. TPB is releasing a documentary on February 8th about their struggle for democratic freedom:

I have linked to .torrent files directly in the past. Am I a criminal?

Install textroom on Fedora 17 x86_64

I had some problems getting TextRoom up and running on Fedora 17, so I thought I might share my findings with you. TextRoom is a non-intrusive Word processor for authors (with built-in ogg player) that promises a distraction free writing experience. There are some screenshots on the bottom of that page. It is available for Windows, Mac, FreeBSD and GNU/Linux. This howto relates to Fedora 17 x86_64 GNU/Linux. Thanks to the Arch Linux guys for detailed troubleshooting (link).

Note: textroom-0.8.2 did NOT work on FC17 with these and other patches. I suspect it is a simple bug related to the 64-bit dir tree.

$ # install prerequisites (includes qt4)
$ su -c 'yum -y install wget SDL_mixer SDL_mixer-devel glibmm24 glibmm24-devel
libxml++ libxml++-devel hunspell hunspell-devel libcurl-devel qt qt-devel gcc-c++'
$ cd ~/Downloads
$ # download textroom from
$ wget -O textroom.tar.gz
$ tar xvf textroom.tar.gz
$ cd textroom-*
$ # build makefiles
$ qmake-qt4
$ # patch makefiles
$ sed 's+-lhunspell+-lhunspell-1.3+' -i application/
$ sed 's/linux-g++/unix/' -i application/
$ sed -i '19i#include <unistd.h>' library/sxfile/getusername.cpp
$ # run make and make install if no errors
$ make
$ su -c 'make install'
$ make clean
$ cd .. && rm -Rf textroom*

That’s it! Now you’ll find textroom in the menu and from cli. If I knew how to create an rpm I would do so. Thanks to Gordebak for writing textroom and sharing it under the GPLv3!

Linksys DIR-825 B1 EU firmware

If you are anything like me, you can’t help fiddling with stuff that works, in order to make it stop working. Last night, as the grand finale of a major network overhaul (we now have 2 networks at home, different IP ranges, but with cross-communication) I decided to check for firmware updates for my DIR-825 (Hardware rev B1, EU version).

According to the EU (and Canadian lol) version websites at Linksys, the latest firmware is 2.01EU. Which I KNEW was wrong, ’cause I was running 2.05EU. I though I found a new firmware that upon initialization turned out to be version 2.00EU. Yay. I downloaded the 2.01EU version and installed it. No Internet? I could resolve IP addresses but nothing replied to ping commands. I restored the router to factory defaults only to learn that my config backup was either corrupt or, more likely, incompatible with this older version. Yay.

Finally, thanks to ChickenMan on the Dlink forums, I got the "hidden" Linksys FTP server URL:

Linksys DIR-825 Firmware:

Loaded it up and restored from backup. Everything worked, running the original 2.05EU software. Yay. I have no idea why it is so hard to get that information.

Proprietary ATI driver on OpenSUSE 12.1 64-bit system

Here’s the quick and dirty way to get the proprietary ATI ‘fglrx’ driver up and running on OpenSUSE 12.1 64-bit and 32-bit systems. Why blog about this when there must be hundreds of great wikis out there to cover the issue? None of them worked 100%. Here’s a way that works:

  1. Download latest driver from AMD/ATI driver page 
  2. Open Yast2 and install: kernel-devel,kernel-desktop-devel,Gcc,Gcc c++,Make 
  3. Reboot, and add this to the GRUB startup options: radeon.modeset=0 blacklist=radeon 3 
  4. When you boot into console, become root and run: # mkinitrd 
  5. Afterwards, cd to download directory and run installer: # sh ati-driver-installer-*.run
  6. Select default options all the way, then: # aticonfig –initial 
  7. And last: # /sbin/shutdown -r now 

Please note the GRUB boot options that blacklist the open source radeon driver. Without these parameters the driver would install but I would have fuzzy graphics and no way to change screen resolutions and so on. I added these instructions to the unofficial AMD wiki: Also note that AMD’s display driver no longer require kernel sources if kernel headers are present (hence the kernel-devel packages).

Please note that in time there will be made an RPM one-click install available for the new ATI drivers on the OpenSUSE wiki, but since I want to play some graphical games I need the latest and greatest. Also note that OpenSUSE policy dictates that the ‘radeonhd’ driver is phased out in favour of plain ‘radeon’ open source driver and ‘vesa’. If I wasn’t supposed to be gaming, I’d stay with the defaults.

Split video files using ffmpeg

I’ve been working with large video files lately, files that are too large for regular storage media. I’ve come to learn how much better ffmpeg is at these jobs than the graphical tools. Mainly because the graphical ones draw more resources and require more fiddling about, in total taking more time than a short command. Here’s the only command you’ll need to create new files from one source video:

$ ffmpeg -i INPUT -vcodec copy -acodec copy -ss START OF VIDEO -t DURATION OUTPUT

So, let’s say I have bigvid.mpeg that’s 50 minutes and want to split it in files that are 30 minutes and then another with the next 15 minutes, discarding the last 5; respectively small1.mpeg and small2.mpeg.
Here are the two commands to deliver what we want:

$ ffmpeg -i bigvid.mpeg -vcodec copy -acodec copy -ss 00:00:00 -t 00:30:00 small1.mpeg

and then

$ ffmpeg -i bigvid.mpeg -vcodec copy -acodec copy -ss 00:30:00 -t 00:15:00 small2.mpeg

As you can see the start of video operand is relative to the input file (source video), while the duration or -t parameter is not. The -vcodec and -acodec options aren’t strictly necessary, ffmpeg’s default output codec should match the input.

ffmpeg and audio delays
However, I have experienced that videos created without codec specification will have audio delays or audio that is not synchronized to the video stream. Specifying both the audio and video codecs as exact copies using -vcodec copy and -acodec copy as in the examples will give you less headaches. That’s all!

Swap ReadyNAS NVX stock 92mm fan

The ReadyNas NVX and its similarly named siblings have a good reputation in terms of 4-disk NAS units, but are considered very noisy. I have read that changing the stock fan on these units make them quieter, as well as making sure you have the latest firmware updates. Here’s how to change the stock fan with your replacement in five easy steps:

  1. Remove power plug and press and hold ON button to remove remaining current 
  2. Remove 2 screws for each side on the back of the unit to slide off black chassis side panels 
  3. Remove 4 screws holding the upper hind panel featuring the fan, RJ-45 and USB controllers 
  4. Replace stock 92mm fan with fan of your choice (same size) 
  5. Retrace steps 1 and 2 to re-seal the unit 

Netgear ReadyNAS NVX

Netgear ReadyNAS NVX    Netgear ReadyNAS NVX

Noctua NF-B9

In my case I swapped it with Noctua’s NF-B9 which had a pretty long power cable compared to what I was taking out of the unit. If you put in one with longer cable make sure it does not obstruct the airflow once you’ve closed the unit again, which would sort of render the new fan obsolete. The fan also had an accompanying booklet showing off all the rocket science that went into making a slightly less audible computer fan! The nerd experience is a total 10/10.

Of course, in some time from now all storage in the home will be digital and not creating so much unnecessary heat. The NAS unit (Network Attached Storage for the uninitiated) has an important role to play in my current home network though. It is the sole on-site backup except for DVDs. Now I just have to decide whether I should keep an off-site backup as well..

What’s that I smell? Melted plastic? Do NOT use "silencing adapters" between NAS and fan that reduces speed to reduce noise. There are 2 such adapters to the NF-B9 but they prohibit the fan speeds necessary to drive heat away efficiently. Luckily, the ReadyNAS software RAIDar shuts down the machine before the temperature reaches a critical level.

USB tethering with Google Nexus S on Windows XP

I had great plans and a lot of work to do when I sat down by the laptop this evening when I experienced that the USB tether function of my Google Nexus S wasn’t all that plug-and-play it was jacked up to be. Here’s the gist of it, much thanks to Markus at the forums:

  1. Download the tetherxp.inf for Nexus S here 
  2. Plug in the phone to the machine 
  3. Turn on tethering on the phone 
  4. When the Found New Hardware wizard appears, select Advanced, click the Browse button and point it to the folder where the tetherxp.inf file resides 

I don’t know exactly why but my phone would not successfully download the official tetherxp.inf file from, but as you can see from Markus’s post the file I provide has only changed the lines referring to the Nexus One to refer to Nexus S. As a final tip, you should do this installation before leaving for the field where you may have to search and look through all this information on the phone with an Edge connection.. But finally I can get to work!

It's a bona fide crisis… Norway is down!

Norway’s largest telco and ISP Telenor has been down country-wide since 1 pm today, effectively shutting off Internet customers — as well as 2G and 3G networks — i.e. me. There are 2 tele-networks in Norway: Telenor and Netcom. The rest of the phone service providers just rent traffic volume from the two, meaning that with few exceptions, the entire country is affected.

Here I’m sitting in my office, and I found out this information when my new Nexus S phone refused to send an SMS to a friend of mine, asking whether he wants to come bowling Saturday. Luckily, we’ve got a dedicated line going to the building, so if our contract’s worth anything it will have priority. But that doesn’t help when the people you’re trying to reach are on the shut-off net. I can’t even get in touch with the bowling hall any longer..

I’m cut off from the world, alone in the office, listening to streaming audio for as long as the internet lasts. I fear this is the start of the zombie apocalypse, and unless you receive further news I wish you good luck in the post-apocalyptic world of survival horror.. Time to get drunk!

Here’s some scary background music Slanted Voices (mp3) by morgantj. I’m arming myself with old metal hard disk enclosures and office furniture..

The Rapture Continues, Politicians Agree to call it "A Crisis"
It’s now 10 p.m. and most phones in Norway are still displaying NO SERVICE while the rain makes things difficult. In the meanwhile the Norwegian government is having a crisis meeting to deal with the flooding in the south combined with the lack of communication. Not sure if you get how serious this is, but our frail civilization is dependent on wireless phoning and text messages.

Politicians agree: It's serious! (Picture by NRK)
See that? That’s a serious politician.

Politicians agree to call it a Crisis. And if the phone situation wasn’t enough, that’s a lot of water.

I was at the gym after work when this girl was struggling with the Quick Locker™. It wouldn’t open, she had her car keys inside and her dog in the car. She can’t leave the gym because she won’t get the car open, and she won’t get back in again. She can’t stay because of the dog. Since it’s Friday after 4 there’s no one at work. There’s an emergency number, but it’s to a Telenor cellphone, so even when I ask a guy on Netcom (the rival network) to phone it it’s dead. The only thing I could do was to send a couple of angry e-mails to the gym, hoping someone would read it and send a guy down there who knows the reset combination. Otherwise she’ll have to wait until 11 o’clock only to find her dog dead from digesting the dashboard… Shit’s serious.

While I was at the gym Lady C kept track of the press conferences, and what they were saying quite literally was that: "We don’t know shit, we just know it’s a server somewhere, we don’t really know where, what server or why, but it has stopped working or maybe it is working and it’s doing something it’s not supposed to, but we wouldn’t know, we’re just not sure at this hour."

It only affects cellphone and 2G/3G cellular network. I bet it’s someone DDoS’ing the cellphone servers. Apparently most ISPs run voice and data on the same servers as SMS. So in theory you have 3 services go down if you bruteforce SMS, which is rather trivial. But they should have been able to locate the source by now… So that’s additional points to the ‘zombie apocalypse theory’.

Another point in fact: No one knows where the mysterious mr. S is or what he is doing. He could be safely at home watching DVDs or somewhere else entirely. And there’s just no knowing. I wouldn’t worry too much though, the mysterious mr. S knows Kung-Fu. The rest of my peeps are either on Pidgin or tweeting in their misery.. It’s Friday after all.

Thank God for the Internet though. I’ll leave this message here on the front page, and if you scroll to the top of the message, you can read it over again. Thus, it serves as a shining beacon of light to the hope of mankind (in the Oslo/Norway area). Now, who said it was a bad idea to stockpile beer in the basement? Cheers!