Fixing natural scrolling in Ubuntu 12.04

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.

Windows 8 Consumer Preview: not bad

Last Tuesday I was one of the select few from my school (okay, 40 kids) to attend a Microsoft-organized event called “Digi High School”. Basically, we went to their Romanian Global Tech Support Center and various people gave us presentations about things like what the GTSC does, what Microsoft does and what the hell Metro is.

At one point, a guy gave us a demo of an app making use of the Kinect, which let him switch between presentation slides with his hand. What does this have to do with the article’s title? He was using Windows 8. And… well, it looked nice – not Metro, but the desktop itself. It just seemed simple and neat, and made me want to try it.

This is what Windows 8 looks like. Seriously.

So the next day I downloaded it, installed it (bye, Vista) and set it up. I used Ninite to get most of the apps I have on it now, and then configured it to run every 2 days and fetch updates. I installed these two drivers for my sound card and TV tuner from Sony’s support site. I set up every app, for both my account and the guest account (intended to be used by my parents).

And then I proceeded to use Windows as I normally would. And everything works just fine. It doesn’t impact my productivity one bit. Except for one annoying bug that I hope gets sorted out soon I eventually fixed.

I don’t really get all the hatred towards Windows 8. Sure, the Start screen could be better, and Metro apps are downright useless and unintuitive, but everything else just works. I might be biased, of course, since I’m used to hitting the Windows key and starting to type instead of searching through menus, but I don’t see how this is a regression.

Just hit the Windows key and type. It's not hard.

Admittedly, Windows 8 could use a tour for new users – or an option to just disable the Start screen – but I just find it intuitive. It’s a bit like using Gnome 3, really.

Which implies it’s going to be poorly received. As I said before, Metro apps are a big screw up. Sure, make a phone/tablet version (Windows Phone 8, maybe?), but don’t give desktop users something they won’t use.

Although if you do remove Metro, this thing is basically just a big service pack for Windows 7. But hey, it’s free, it doesn’t need Windows 7, and it’ll last ’till 2013, so I don’t have much to complain about. I’ll just try to buy a new TV tuner in the meantime and switch to Linux – that’s where I’ll end up anyway.

Just Xubuntu

So I’ve switched to Xubuntu again. Ah, the good old times I had with this. It has its issues – lots of them – but it works okay, and it’s pretty lightweight.

Until now, I have been using Gnome 3 and took quick peeks at Unity and KDE. Long story short, Unity is about as slow as a turtle and KDE on Ubuntu is still KDE on Ubuntu. So I’ll just give Xfce a fair chance. Who knows, maybe I’ll keep it – until Luna is released, that is.

So yeah, I am very much still alive and capable of writing blog posts. And coding, a bit – this is my latest project. I just need to fix a couple of bugs…

Oh, and a final note: I’ve just moved all my images to imgur, and some of them might show up as “not found” placeholders on the blog – the images are there, but the thumbnails haven’t been generated, or something.

Yet another list of Android apps

What better way to start the new year than with a post about Android apps? Actually, I can think with a ton of better ways, from browsing Reddit to skydiving, but I just got a new Android smartphone for Sir Isaac Newton’s birthday and I’ve been busy populating it with apps. And today I’m here to share some of those with you.

First off, nobody’s first list of Android apps can be complete without a mention of the device they own. Mine is an HTC Desire Z, currently rooted and running Gingerbread (with this ROM).
Well, now that we’ve got that settled, I think we can start with the list.

Surfing the Interwebs

  • The stock Android/HTC browser. Opera Mobile used to be my favourite, but after some time with it I decided I prefer the stock one.  I’m not touching Firefox – not until the Android version works smoothly and the desktop one gets better – and I don’t like Dolphin. Or other browsers.
  • BaconReader. I need my dose of Reddit, and this app is happy to provide. It does exhibit some weird bugs sometimes (e.g. finding myself logged out and at a completely different comment thread, because I clicked a link), but they don’t disrupt me too much.

Communication and Sharing

  • imo beta. imo is widely regarded as one of the best instant messengers around. That praise is not undeserved. Well, maybe a little. I listed the beta because that’s what I’m using right now – I upgraded one morning after finding out (by being woken up by my best friend from the first lucid dream I’ve had in months) that the main version somehow switched my status to “available” overnight on Yahoo. Temporary glitch? Maybe. The beta didn’t really fix anything, but it comes with a way nicer UI. Nowadays I avoid the situation by keeping it signed out. Kinda defeats the purpose of an always-on network though. Maybe I should write my own IM client.
  • AndChat. After some time trying this one and AndroIRC against one another, I lean towards AndChat. It took me a while to figure out that the search key does nickname completion though – the Tab key doesn’t work for me, for some reason. I’ve submitted a “bug report” to the mailing list, let’s hope it gets fixed.
  • Bump. I haven’t gotten the chance to actually try this one in practice, but I like the concept.
  • imgur for Android. Install, log in, go to image, “share” using this, copy link, paste. It can also delete shared images, something which I find pretty useful.
  • Skitch. Already made one girl smile using this, so I can vouch for its utility. Maybe.
  • HTC Peep. A decent client for my limited Twitter needs, and has an awesome-looking widget. Here‘s an ugly support page, if you want screenshots (of the app itself, not the widget).


  • GTasks. Does what it says on the tin, and does it well enough. The widgets are horrible, but other than that it’s a great app.
  • Notational Acceleration. I’ve recently switched from Evernote to Simplenote as my note taking service. This app lets me type notes and sync them with Simplenote without even thinking about it. It’s simply amazing.


  • Subsonic. With a bit of configuration (and an always-on computer at home), this app lets you stream your entire music collection over mobile Internet. I didn’t use it too much for now, but I’ll have plenty of time to do that when school starts. Note that the server part of Subsonic requires a “donation” to be able to use the API after a 30-day trial. You can either donate or go the unethical route and just hack the damn thing.
  • Dood’s Music Streamer. Infinite music from Grooveshark. No further comment required.
  • 8tracks. Sometimes you just want to listen to some random songs that go well together. This app lets you do just that.
  • TuneIn. Think of a radio station. Open TuneIn. Search for it. Listen. I mainly use this one for


Abduction, AirPenguin, Angry Birds, Frozen Bubble, Fruit Ninja, Lane Splitter, Robo Defense and others.


  • Google Goggles. An app that lets you search for things using your smartphone’s camera – text, products, QR codes…
  • ConnectBot. I use it primarily to connect to my laptop over the Internet. Supports pretty much everything you’d need from an SSH client.
  • Dropbox.
  • FBReader. Sometimes I want to read actual books instead of Reddit comment threads. This app fulfills that need.
  • Titanium Backup. Safety first, I guess. This one is pretty useful when ROM-hopping.

Well, I think that would be it. As usual, drop your suggestions in the comment section.😉

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

Yes, I have finally gotten my hands on an Android phone, an HTC Desire Z! I’ve just installed a MIUI ROM on it yesterday, and I’ve been tweaking it ever since.

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 hackish 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 – just an app.

As always, drop a comment if I helped!


Let’s spread the word and stop internet censorship. It’s bad for everyone, not just Americans.

locate your files in style.

Next time you learn a new language, you could consider creating a search engine as your first project.

Or… maybe not, since other things are way cooler and more useful.

Anyway, that’s what I did, and the result is DesktopSearch. As the post title subtly suggests, it uses the locate tool, part of the mlocate utility set found on most Linux systems, to search for files. So it doesn’t actually do the hard work itself.

But wait! It does more than that. It actually maintains its own file index (using the updatedb tool), in which only files from your home directory are included – this way, you won’t get some random result from /etc instead of what you’re really looking for. It also hides dotfiles, so that when you search for “ruby” you don’t get stuff from ~/.gem/ instead of ~/Documents/ruby/. Pretty neat, eh?

So, what are you waiting for? (Don’t answer with “something interesting”, please.) Go download it from GitHub and have fun!


Get every new post delivered to your Inbox.