Sunday, November 21, 2010

CUPS "400 Bad Request" Problem - And its Simple Solution

Recently I wondered why the CUPS client machines in my network, all with a client only setup, could not print.
I finally found out that the CUPS webfrontend on port 631 was only reachable when called as "http://print:631/", with "", there was only a "400 Bad Request" error.
So as a first solution I configured the client to print on "print", not on "", but that was of course still an issue that needed investigation.
Long story short: I had this line in /etc/hosts: server proxy print ntp

(I'm running dnsmasq on this machine to serve the internal network with DNS and DHCP, so those multiple hostnames are for the different functions of the machine).
Adding "" to this line and restarting cupsd solved those issues.
No idea why CUPS looks into /etc/hosts (or if it is some libc function that does this), but maybe this post helps somebody else with this problem.

Saturday, October 23, 2010

plasmoid-networkmanagement - How to connect?

After Will's talk about new KDE Features for 11.4 on the openSUSE Conference, I thought I'd finally give the networkmanagement plasmoid a try and installed it.
While it looks neat and apparently would show additional information about my connection (compared to knetworkmanager), I was unable to find a button or other UI element that would allow me to connect to a 3G Network.

Has anyone managed to use this for connecting? How?

I was just lucky that I had nm-applet installed, otherwise I would not even have had a way to get online at all... :-)

Tuesday, June 22, 2010

Nifty dnsmasq Trick: Reverse Lookup using a specific Server

With dnsmasq, it's easy to look up a whole domain using a special dns server. The option is

This will look up everything "*.foo.corp" using nameserver So far, so good. But today I also needed the reverse lookup for a specific IP adress zone to be done via a specific nameserver. Reading the manpage, I found no option for that, but then I remembered stuff that I had learnt in a distant past: that reverse lookups are actually a name lookup of the zone, with the "reversed" IP address. So I tried

and that one works fine, looking up everything 10.x.x.x using

And it still was much easier than using ugly bind. That's why I prefer dnsmasq in daily use over bind, dhcpd and all the other crap. It just works ;)

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 ;)

Tuesday, March 23, 2010

PAN/NAP made even easier...

I wrote last year about how to use bluetooth networking to connect to the internet via a mobile phone. Since then, I had heard rumours that NetworkManager was now able to do this as well, but I actually never managed to find out how to do that (admittedly, I never looked too hard).
Today I checked again.
Since those are the "reference implementations", I started GNOME's nm-applet and bluetooth-applet instead of knetworkmanager and kbluetooth. I still could not find anything related to bluetooth in nm-applet's UI. Then I looked a bit farther and found Dan Williams' post about it.
Long story short: I deleted my phone from bluetooth-applet's "known hosts" and re-paired it again. There it asked me if I want to access the internet via my mobile phone, which I confirmed. After that, nm-applet has now an entry for "PANU" which is the Phone's connection.
Working well and pretty cool, too. One more workaround that's not needed anymore.

For completeness, I also tried to remove and pair the phone with kbluetooth, but apart from it not working at all (never asking for a PIN), it also did not ask for the internet connection stuff. So for now, if you want Bluetooth networking, just use nm-applet and bluetooth-applet.

Wednesday, January 27, 2010

$HOME full? WTF?

Today I discovered that my $HOME was nearly full. My machine has only moderate space for the encrypted /home partition, but there were almost 2GB free until a few days ago, so I decided to look where the space went.

It was easy: ~/.xsession-errors was over 1,5GB. I looked who was wanting to tell me lots of important stuff and found out that about every KDE4 program produced several debug lines, almost every second.
Since I doubt that anybody will ever want to look at 1,5GB logfiles, I just decided to redirect it to /dev/null in /usr/bin/startkde. Now only my submitrequest number 30607 needs to be accepted into KDE:KDE4:Factory:Desktop, so that everyone benefits from this solution.

Note: it took 15 days for the logfile to get that big, but to be honest: I don't want to reboot every two weeks, only to keep KDE4 from crapping my home directory.
Second Note: If there had been any significant updates in FACTORY in the last two months, I would probably not even have noticed the problem, but there were none ;)