Donnerstag, 20. Dezember 2007

VirtualBox and USB devices

My parents bought a new panasonic camcorder, the software that came with it is Windows only of course. So I tried to get it running in Wine, but the installer didn't get very far before hanging. Next I installed VirtualBox, and installing the video software in a Windows 2000 hosted on VirtualBox worked just fine.

Unfortunately, Windows didn't see the camera's SD card that was attached via a USB adapter. Some googling showed that USB support in VirtualBox is broken in Gutsy. Here are the steps to get it working:


  1. Edit /etc/init.d/mountdevsubfs.sh as root
  2. , then activate the commented lines for making /proc/bus/usb work:

    mkdir -p /dev/bus/usb/.usbfs
    domount usbfs "" /dev/bus/usb/.usbfs -obusmode=0700,devmode=0600,listmode=0644
    ln -s .usbfs/devices /dev/bus/usb/devices
    mount --rbind /dev/bus/usb /proc/bus/usb


  3. Save the file and run the script via sudo /etc/init.d/mountdevsubfs.sh

  4. Edit /etc/fstab as root and add a line:

    none /proc/bus/usb usbfs devgid=XXXX,devmode=664 0 0

    where XXXX is the gid for group vboxusers as defined in /etc/group

  5. Save the file, then activate the changed configuration via sudo mount -a


When you start VirtualBox now, a USB controller can be activated in the settings for each virtual machine.

Mittwoch, 5. Dezember 2007

KNetworkManager doesn't support KPPP

I've convinced my parents (mostly my father) that it would be easier for them to have Kubuntu on their new laptop than Vista. They'll have to learn a new user interface anyway, but Kubuntu makes support for me much easiear (especially since I've learnt about the desktop sharing feature of NX).

So I've ordered a trusty Dell Inspiron 6400n like my wife has, but this time with Ubuntu 7.04 preinstalled. Installation of Kubuntu 7.10 went smoothly, thanks to Dell's Ubuntu support even the internal modem is supported by a restricted driver.

But when using KPPP for making an internet connection, I was not able to brwose the internet using konqueror. Firefox did work, so I set it up as default internet browser.

But some days later my father found out that he couldn't receive any mails in KMail, though checking with the web frontend I saw he had new mails. There was no error message in KMail, it just said there were no new mails.

Some googling later I found a bug report and knew that KDE software like Konqueror and KMail rely on KNetworkManager to check wether they are in online or offline mode. When it works, it's a great feature. Unfortunately it doesn't work with some weird WLAN setups -- and with KPPP!

The easiest solution to get around this is to simpy quit KNetworkManager -- and make sure it doesn't automatically come up again on the next start.

Donnerstag, 22. November 2007

Compiling source code

I've found a kate plugin for sorting but had to compile it. I had gcc installed but still ./configure told me that the ,,C compiler cannot create executables.'' I quickly found out that some packages for doing development stuff were still missing, so that was a quick fix.

Dienstag, 6. November 2007

libxine1-extracodecs is now libxine1-ffmpeg

I've already posted about installing libxine-extracodecs in august and april. This is no longer true since Gutsy, now the package is libxine1-ffmpeg.

Actually, now there is a meta package kubuntu-restricted-extras with commonly used restricted packages which also contains libxine1-ffmpeg. I've not installed the meta package, since I didn't want Java6 to be installed, but I've installed most of the other packages contained.

Freitag, 2. November 2007

Speeding up Konqueror

Upgrading from Kubuntu Feisty to Gutsy didn't work for me, so I've installed Gutsy from scratch. As Konqueror still was far slower than Firefox, especially for sites with many images like GMX or Xing, I started to search again for solutions. Here's what I found out, and now Konqueror is nearly as fast as Firefox for me:

  • deactivate IPv6, otherwise IPv6 DNS queries will happen that can result in timeouts when some servers don't support it yet: append KDE_NO_IPV6=true to /etc/environment

  • install a local DNS cache, as Konqueror/KDE doesn't implement it (in contrast to Firefox): I'm using pdnsd, see here for installation instructions.

  • Konqueror uses a disk cache by default, the directory is /var/tmp/kdecache-username/http. I found out that the directory had root:root ownership for my installation, I have no idea how that happened. After chowning back to my user, the directory is now used as expected.

Montag, 8. Oktober 2007

Installing Type1 fonts for OpenOffice

My wife has a binary encoded Type1 font (a .pfb and a .pfm file) that contains symbols for guitar tab notation. It came with some Windows software, and obviously in Windows the .pfb file and .pfm file are enough to use the font.

Right clicking the .pfb file in KDE let's you install the font, but it doesn't show up in OpenOffice's font selector. KWord on the other hand let's you use it.

After some googling I found out that OpenOffice in Linux needs an accompanying .afm file, and here's how to create the .afm file from the .pfb file:

  • Install t1lib, a library for generating character- and string-glyphs from Adobe Type 1 fonts: sudo apt-get install t1lib-bin

  • Go to the directory where the .pfb file was installed, e.g.: cd ~/.fonts

  • Create the .afm file, e.g.: type1afm fontfile.pfb


And that's all, starting OpenOffice should now show the font in the font selector.

Alternatively, the .afm file can go to a subdirectory named afm.

Montag, 3. September 2007

Automounting SD card in Feisty

When I started using Kubuntu (Edgy and the first Feisty betas), the SD card I have for my Palm TX always was automagically automounted when I inserted it into my Dell's internal TEAC card reader. But since using Feisty (final), it no longer works. I thought it wasn't correctly recognised by the kernel, as there are some open launchpad entries regarding USB devices/card readers, but as I've found out now, this is not the case. Strangely enough, it still works when I insert a Compact Flash Card ...

After some googling, this is what works for me in Feisty:

  • Create an entry in /etc/fstab for the SD card device:
    /dev/sde1 /media/sd vfat user,noauto 0 0

  • Create a desktop device link (e.g. for a ZIP device) for the device, the mount point is then taken from /etc/fstab

  • Now the /etc/fstab entry can be removed again

That's all. Now you have an icon for the device on the desktop, to mount an SD card just insert it and open the icon. To unmount, open the context menu and select Eject.