Wednesday, April 28, 2010

Rebuilding a single kernel module

Due to Bug 596844, I had to rebuild the i915 module with a patch. I have done things like that quite often over the last years, and every time I have to dig through the documentation, so I'll put it up here in the hope that I'll find it easier in the future and that it might be useful for somebody else ;)

There are only a few steps, following the README.SUSE in the kernel-source package:

  • install the kernel-syms and kernel-source packages

  • copy the kernel sources to some other place where you have write access as a normal user (this is not in the README, but I hate doing stuff like that as root, so I'm doing it anyway)

  • patch the source

  • build the module

Or, as an almost-copy'n'pasteable list of commands:
cd /tmp
cp -a /usr/src/linux/ . # do not only copy the symlink ;)
cd linux/drivers/gpu/drm/i915/
patch < /tmp/i915-nofbc.diff # your diff
make -C /usr/src/linux-obj/x86_64/desktop M=$(pwd)
ls -l i915.ko

You need to adjust the directory given to "make -C" to your desired kernel flavour, of course, but that's it. Copy the module over to /lib/modules and reboot (I usually save the old module somewhere else, in case something goes wrong, but you probably figured that out already).

Saturday, April 17, 2010

Android sucks bigtime

So there's my brand new Motorola Milestone, with Android 2.1
Yes, it has Bluetooth.
Yes, it has WiFi.
Yes, it has USB.
But can you use Bluetooth for anything useful (DUN or PAN/NAP)? No. (I think I even had to install an "app" first for it to be able to receive OBEX Push...)
Can you use it as a WiFi access point / router? No.
Can you get IP connection via the USB port? No.

Short: there is no way you can use the mobile Internet connection of your Phone e.g. with a laptop. That's something my (really crappy) Sony Ericsson K600i did more than 5 years ago. And almost every other phone since the availability of GPRS, even back when the connection was via IRDA and not Bluetooth.

So the Milestone (and probably almost every other Android phone) is a clumsy, heavy, but mostly useless brick.

I honestly don't care if there are "apps" (of course at additional cost and most of them crap, or requiring that I first hack the phone for root access) that can enable functionality that should definitely be there from the start.

I probably should have insisted on getting a N900 instead.

Wednesday, April 14, 2010

Followup: Accounts in Claws-Mail

Just to let everyone know that it was me being blind and not Claws-Mail lacking the function to rearrange the Folder list. As Paul pointed out in his comment on my post, there is "File -> Change Folder Order", pretty much on top of all other options. So no need to pull out your favourite editor and mess around with XML files ;)

(Sometimes I'm wondering why I am not finding easy stuff like that anymore. My wife or children would probably have found it immediately. Maybe I'm not looking hard enough, because I'm not expecting it to be there? Maybe I'm just spoiled by 10 Years of using console tools for almost everything? I know that I tried to drag and drop the accounts, even though I do not really like drag-n-drop for such configuration changes, because it could happen accidentally. Or, in other words, the "Change Folder Order" menu entry is pretty well matching my personal taste of how such things should be implemented, but I did not find it anyway. Am I the usability designers nightmare after all? Who knows ;) )

Monday, April 12, 2010

Claws-Mail trick of the day: plugins

Today I found another useful trick for claws-mail users. I switched from an old i586 machine to a brand new x86-64 thinkpad. I copied my $HOME over. Then I wondered, where all my claws-mail plugins had gone.

Starting it from the command line showed (wrapped for your reading pleasure):
** (claws-mail:9938): WARNING **: plugin loading error:
cannot open shared object file:
No such file or directory

Uhm, yes. This is an 64bit system, so the plugins are installed in /usr/lib64/claws-mail/...
Two possible solutions to the problem came into my mind.

  • creating a softlink from /usr/lib64/claws-mail to /usr/lib/claws-mail

  • changing the configuration

The second method was actually easier, and is probably more future-proof (If I reinstall the machine, I might forget to create that link...)

I checked the config file in ~/.claws-mail/clawsrc and found a section

I simply duplicated the plugins and substituted /usr/lib with /usr/lib64. As a result, I now get the "plugin loading error"-lines on both machines, because the i586 can only find the plugins in /usr/lib and the x86-64 only those in /usr/lib64, but since claws-mail does not really care and just works, I also just ignore them.

It will be interesting what happens once I use the GUI to add another plugin, but I will care for that when it happens :)

Rearranging Accounts in Claws-Mail

I recently added a new account to my Claws-Mail configuration. That account will soon become one of my main accounts, so I was not happy about it being shown on the bottom of the folder list, below all my less important accounts.
Using the GUI, I could not find a way to move it around. I already thought about manually changing the configuration, editing all the references for all accounts.
Fortunately, when looking around the ~/.claws-mail directory that contains everything, I found folderlist.xml which is an easy to understand (and edit) XML file that describes how the folders are displayed. I did no fancy stuff, just moved the <folder type="imap"...> ... </folder> block, that corresponds to the new account up to the first place and voilá -- it works.
BTW: Claws-Mail is still my favourite email client after using it for over a year - that clearly is a new record ;)