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 "http://print.home.s3e.de:631/", there was only a "400 Bad Request" error.
So as a first solution I configured the client to print on "print", not on "print.home.s3e.de", but that was of course still an issue that needed investigation.
Long story short: I had this line in /etc/hosts:
192.168.200.1 server.home.s3e.de 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 "print.home.s3e.de" 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
   --server=/foo.corp/10.11.12.13

This will look up everything "*.foo.corp" using nameserver 10.11.12.13. 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 in-addr.arpa zone, with the "reversed" IP address. So I tried
  --server=/10.in-addr.arpa/10.11.12.13

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

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:
/usr/lib/claws-mail/plugins/rssyl.so:
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
[Plugins_GTK2]
/usr/lib/claws-mail/plugins/rssyl.so
/usr/lib/claws-mail/plugins/pgpcore.so
/usr/lib/claws-mail/plugins/smime.so
/usr/lib/claws-mail/plugins/pgpmime.so
/usr/lib/claws-mail/plugins/pgpinline.so

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