The end, formally

This is the last post I’ll ever make on this blog.

I’ve cleaned it up, made it presentable, deleted all the pointless, inaccurate or stupid posts. Turned it into a memorial, pretty much. Only kept the things people still link to.

I don’t know how this is still getting 30+ views a day. Or why it has followers, of all things. On the off chance anyone sees this post pop up in their notification queue or something, sorry! It’s not an update, it’s a tombstone.

Here’s a comprehensive index of everything left:

I didn’t bother to save any screenshots of the myriad Linux setups I’ve used over the years. Sorry. But since nobody ever came here for them, it must not be too much of a loss.

Please don’t post comments. Auto-approval is off, so they’ll just be stuck in the moderation queue for all of eternity. Or until Automattic goes bankrupt, anyway.

So, that’s about it, kids! Remember to be nice, wash behind your ears, and never ever start a blog if you’re under 18. You’ll regret it later.

Posted in RIP | Leave a comment

Fixing natural scrolling in Ubuntu 12.04

Update, September 2016:
Seeing as basically every desktop environment has had a working reverse scroll option for years now, this post is defunct. Leaving it up in case you’re still rocking CentOS 6 or something. If you’re having trouble with recent touchpads on a recent distro, see this AskUbuntu answer. If you’re not on a Gnome-based desktop, I’m not sure what to say. Really. I haven’t used Linux in ages.

I recently “upgraded” my HP laptop from Fedora 16 to Ubuntu 12.04 and, as I always do, tried to set up natural scrolling on it. Obviously, I had to run into a problem – in this case, the new “smooth scrolling” implementation Ubuntu uses.

Smooth scrolling was introduced in GTK 3.4, which a few things (like the file manager) use now. However, it doesn’t rely on the standard “button”-based scrolling standard (you roll the scroll wheel a bit, the mouse sends it as a button press), but on a more precise reporting of scroll distance that some touchpads provide. Only Synaptics touchpads are supported for now, I think.

Anyway, my previous natural scrolling method hacks into the “normal” scrolling method, and not the one used by GTK 3.4, so a new approach is needed. Enter xinput.

$ xinput list
⎡ Virtual core pointer                    	id=2	[master pointer  (3)]
⎜   ↳ Virtual core XTEST pointer              	id=4	[slave  pointer  (2)]
⎜   ↳ SynPS/2 Synaptics TouchPad              	id=11	[slave  pointer  (2)]
⎣ Virtual core keyboard                   	id=3	[master keyboard (2)]

$ xinput list-props 11 | grep "Scrolling Distance"
    Synaptics Scrolling Distance (288):	106, 106
    Synaptics Circular Scrolling Distance (301):	0.100000

So, what did I do there? The first step is, obviously, to open a terminal window so you can copy-paste those things. With Unity, just hit the Super/Windows key, type “terminal” and hit Enter.

Then you’ll have to copy-paste the first command, xinput list, and hit Enter. Two notes I want to make here, for terminal newbies: firstly, don’t copy the $ – that represents the prompt you should already have on your screen. Secondly, paste using the right click menu in a terminal, not Ctrl-V.

Look around the listing for your Synaptics touchpad – I’ve put mine in italics. If you don’t find one, smooth scrolling should be off, and you should be able to use these instructions to set natural scrolling up. If you do find one, make a note of its ID (in my case, it was 11).

Next, you’ll have to run the second command, xinput list-props 11 | grep "Scrolling Distance", replacing the 11 in italics with the ID you found in the previous step. Another note for terminal newbies: use the arrow keys to move through the pasted command. You should get one or two lines as a reply – make a note of the number in parentheses next to “Synaptics Scrolling Distance” – mine was 288 – and the previous values – mine were both 106.

Next up, open the file manager and create a new empty file somewhere (I have it in my ~/Scripts directory). Call it, say, Open it up in gedit and copy-paste this in it, replacing the italicized properties with the numbers you found in the previous steps:

xinput set-prop 11 288 -106 -106
nautilus -q
nautilus -n &

(The last two lines quit the file manager, and then restart it in desktop-only mode, which should work around all possible related bugs.)

Save it, right click it in the file manager, go to the Permissions tab and check “Allow this file to be executed” (or something along those lines – I’m not on my Ubuntu machine). This script will set the new scrolling distance properties (which are basically the negatives of the previous ones) and restart the file manager.

Now, we need to set this to run on boot. Thankfully, Ubuntu makes that easy – just go to the system menu in the top right corner, click “Startup Applications”, click the “Add” button, give the entry a name (say, “Natural Scrolling”) and browse to wherever you saved the script.

Next, reboot and enjoy – it’ll hopefully work now. You could do worse than leave a comment if I helped. Note that this could also work on Fedora 17 and other distros implementing GTK 3.4’s smooth scrolling – no guarantees though, and you’ll have to tweak at least the “run on boot” part of the instructions.

If you run into any problems, first make sure you have no .Xmodmap file in your home folder (you could have one if, say, you followed my other natural scrolling setup guide), that your system is up to date (this fix only works with new versions of the Synaptics driver), and reboot again for good measure. If it doesn’t work after that, leave a comment and I’ll try to help you.

The obligatory hat tip goes to “RAOF” from the Ars Technica forums, who seems to be the first to have come up with this fix.

Posted in Fixes | 33 Comments

Mini-HOWTO: replace MIUI’s search with Google Search

Update, September 2016:
I’m not sure this is still relevant, or why it’s getting so many hits. It was written nearly five years ago. If you’re on a modern build of MIUI and search is broken, chances are this isn’t the solution.

One of the major problems of MIUI is that landscape support is nonexistent in the home screen and, more importantly, the search app. I have a hardware keyboard, dammit, let me search properly!

The obvious solution here is to install a sane search app – like Google Search. However, the search button will still run MIUI’s search app. The fix for this is, as a quick web searching session will reveal, to convert Google Search to a system app.

But how do you do that? The tips you’ll find on the Web will probably suggest using Titanium Backup (which lets you do that in the paid version) or, deities forbid, some Windows app and a 20-step guide. However, there’s a much simpler solution:

  1. Get the Apps2ROM app and open it.
  2. Scroll down to Google Search, tick the checkbox next to it.
  3. Tap the “Save” button.
  4. Tap the “Move now” button.
  5. Agree to the restarting of your phone.

That’s it. No payments and no PC involved.

Posted in Android | Tagged , , | 3 Comments

Bored with your music collection?

Update, September 2016:
This article has been tl;dr-ified for your convenience. And my sanity.

See this man page before attempting, but this is the 10-second version:

streamripper -a -A -s -M 1200 --xs-none

That tells streamripper to start ripping from the specified Shoutcast stream, storing the ripped contents in a single file (-a) without creating directories, trying to split everything into separate tracks or searching for silent spots (-A -s –xs-none) until it rips 1200 MB worth of music (-M 1200). You may want to skip the -a, -A and -s options if you’re using an old-fashioned player. Seeking through a 14-hour file is no fun.

The stream URL was lifted from’s 192k playlist file. If you’re not from Europe, you might want to pick another one.

Posted in Music | Tagged , , , | Leave a comment

The one-line method of getting natural scrolling in Linux

Update, September 2016:
This should pretty much always work with standard mice (well, either that or I’m seriously out of touch). It will generally not work with properly configured touchpads. See this post if you’re using a touchpad.

Nowadays, this is what I run right after installing Linux systems:

echo "pointer = 1 2 3 5 4 7 6 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap

No reboot required. Don’t like it? Use this to revert:

echo "pointer = 1 2 3 4 5 6 7 8 9 10 11 12" > ~/.Xmodmap && xmodmap ~/.Xmodmap

Xmodmap basically lets you remap keys, where “keys” is defined as “pretty much any hardware trigger you interact with, including everything in your mouse”. The first snippet above switches the two vertical (4 and 5) and horizontal (6 and 7) scroll keys, whereas the second puts them in their rightful order.

Posted in Linux | Tagged , | 15 Comments

Get OS X’s natural scrolling in Windows

Update, September 2016:
Short version: HTG article, NaturalScrolling.exe, possibly obsolete Linux version.

Posted in Windows | Tagged , | 18 Comments

Unlocking the Huawei E172 on Linux

Update, September 2016:
This post has been slightly shortened. I would also like to add that it’s over five years old now and newer dongles probably use less braindead SIM lock systems.

Before going through this procedure:
See Neil McPhail’s unlocker script and/or this slightly friendlier guide.

Step one: get your unlock code.

Find your modem’s 15-digit IMEI, open up a terminal, run python and copy-paste the following code:

import hashlib
def get_code (input):
  for i in range(0,4):
    code += (ord(digest[i])^ord(digest[4+i])^ord(digest[8+i])^ord(digest[12+i])) << (3-i)*8
  code &= 0x1ffffff
  code |= 0x2000000
  return code

Hit Enter twice after pasting. Next, type in the following, replacing the example IMEI with your own:


Hit Enter and you’ll get your 8-digit unlock code. For my example IMEI, the code would be 47412550.

Step two: find your dongle’s control channel.

Open a terminal and become superuser (sudo -i or su). Try cat /dev/ttyUSB0, cat /dev/ttyUSB1 and so on, until you get a continuous output that looks like this:


Note that the DSFLOWRPT messages will only appear when the dongle is actually connected. If it isn’t connected, you’ll probably get BOOT messages instead. If you’re getting no output, hit Control-C and try again with the next ttyUSB. If you run out of ttyUSBs to try, I don’t know what to say.

Step three: send the unlock command.

If you do get output, don’t hit Control-C or close the terminal. Instead, open another terminal window and copy-paste this command, replacing 47412550 with the unlock code you got in the previous step and /dev/ttyUSB1 with the control channel you just found out:

chat TIMEOUT 1 '' 'AT^CARDLOCK="47412550"' 'OK' > /dev/ttyUSB1

You should see OK on the other terminal window. I also got a +CME error: operation not allowed error, but it didn’t seem to be a problem.

If you get something like +CME error 3, though, that means something has gone wrong at some point. Maybe look for another guide?

Posted in Linux | Tagged , , | 10 Comments

Mac OS 6.0.8 on a DS

Update, September 2016:
This guide is a mess, but I’m leaving it here for historical reasons.

Prerequisites. Obviously, you need a Nintendo DS capable of running homebrew (via a flashcart + SD card; the flashcart must support .nds files) and a computer running Windows, Linux or OSX.

Get the software. You will need the following (skip down for an alternative resource):
* Mini vMac for DS (get it from here)
* the “normal” Mini vMac (get it from the official site; under Linux, run the Windows version with Wine)
* blank disks (archive here)
* System 6.0.8 (get it from Apple: disk 1, disk 2)
* either The Unarchiver (if you’re on a Mac), an older version of StuffIt Expander (5.5 or 7.0 should suffice, see here) or some other software that can extract StuffIt files, if you somehow manage to find it
* vMac.ROM (probably illegal to distribute, but grab it from here anyway)

Extract. First, extract Mini vMac DS (you should put the “vmac” folder on your SD card’s root and extract the 2MB binary to it; the ui_gfx folder should also be there). Then, extract the “normal” Mini vMac to a folder on your computer, along with System 6.0.8 (install Aladdin to extract it; you want two files: System Startup and System Additions), one of the blank disks (choose a size from the .zip and extract the .dsk) and vMac.ROM (capitalisation is most likely important, so rename it if necessary).

Install. Run Mini vMac (on your computer), open the System Startup disk and the blank one (you should get prompted to initialize it; if not, single-click it and go to Special -> Erase Disk), run the Installer (it’s on the System Startup disk) and follow the instructions. Then safely shutdown the virtual machine (Special -> Shut down) and proceed to the next step.

Copy the files. Rename the blank disk’s file to “disk0.dsk”, then copy both it and vMac.ROM to the “vmac” folder on the SD card.

Done! Now just use your flashcart’s launcher to run MinivMacDS.nds.
If you get any “this disk requires minor repairs” error, don’t hit OK, it won’t work. Shut the DS down, run the “normal” Mini vMac again, open the disk image and repair using that. And don’t forget to shut down safely!

I haven’t tried loading any software on it. If you do intend to do that, you’ll probably have to use the computer to copy software over to the disk. And by the way, you should be able to load additional .dsk files by renaming them disk1.dsk, disk2.dsk, etc. (up to disk4) and copying them to the SD card root.

Posted in Oddities | Tagged , , , | 4 Comments

Fix USB boot error in Arch Linux

Update, September 2016:
I’m leaving a tl;dr-ified version of the article up, but please note that I have no idea whether this procedure still works. Or whether it’s still relevant.

You might encounter a strange error message when trying to boot Arch from a USB drive:

Boot device didn't show up after 30 seconds

Arch then drops you to an initramfs shell, without any hint to what you should do. Here’s the hint.

Step 1: you need to know what device name Arch expects. It’ll be something along the lines of /dev/disk/by-label/ARCH_something and Arch should display it right before the error message. Write this down somewhere!

Step 2: you need to figure out what block device your USB drive has been assigned to. USB flash drives are managed by the SCSI subsystem for some reason, so you’ll need to use this command to get a list of all allegedly-SCSI drives on your system:

cat /proc/scsi/scsi

Take whatever CD drives (scd*) are there out of the picture and look at which position your USB drive occupies. For example, if it occupies the second position, it’ll probably be /dev/sdb1. For the third, it probably is /dev/sdc1.

Step 3: type the following command:

ln -sf [usb-device] [arch-device]

Replacing [usb-device] with the USB drive’s blockdevice (e.g. /dev/sda1) and [arch-device] with the device Arch expects.

Step 4: hit Control-D.

Posted in Arch Linux | Tagged , | 12 Comments

Quick HOWTO: Remove GNOME from a Debian install.

Update, September 2016:
This probably still works, though I don’t recommend it. This is basically the apt-get equivalent of a nuclear strike.

sudo apt-get autoremove --purge 'gnome*'
Posted in Debian, GNOME | Tagged , , | 20 Comments

Hello, blog.

Welcome to my humble corner of the Internet.

Here, I’ll probably be posting my success and failure stories regarding Ubuntu, various applications, bugs and, of course, making USB HSPA modems work with 10-year-old laptops.

Posted in Uncategorized | Leave a comment