Categories
Linux / Gentoo Linux

Getting Evolution to go native on KDE4

Right now I’m trying to get Evolution to work and fill the void that the removal of KitchenSync from KDE 4.2 has caused: the possibility to synchronize your phone, PDA, calendar, contacts and email using one central point.

Installing Evolution is only the start and please note that I am running Gentoo so if you are on another linux distributions things might turn out different.

We start with the basics: when you try to install synce and you have the ‘kde’ use flag – it will try to pull in ‘synce-kio-rapip-0.10-r1’ or similar. If you are truly running KDE 4 (and ditched KDE 3 and Qt3 – like me) the ebuild will fail because it needs KDE 3. There is a new package called ‘kde4-kio-rapip’ (currently at version 0.2) which should work for KDE 4. I decided I don’t want the deprecated KIO slaves and should I need direct access to my Windows Mobile 2003 PDA I will rather install the FUSE driver for it.

To make Evolution look like the KDE applications you need to get GTK2 to use the Qt4 engine – which will theme everything like the rest of KDE. There are 2 or 3 choices at the moment but ‘x11-themes/gtk-engines-qt‘ is currently your best bet (at version 1.1-r1 right now).

After installing it, open up System Settings -> Appearance -> GTK Styles and Fonts and select "Use my KDE style…" and "Use my KDE fonts…" and hit apply. Now log out and back in and Firefox, Thunderbird, Evolution and any other GTK program should look like KDE applications.

The next obstacle was the fact that Evolution is missing its icons despite that the theming of the interface itself is working. This is because the normal parts of the program interface are rendered by Qt4 but the icons are not a part of the standard Qt4 theme. To fix this we need to tell GTK which native theme it should use. Not to skin the program but to provide the icons.

Unfortunately I can not figure out what is going wrong as some icons are picked up and others are not while the console of Evolution stays quiet. Running the program itself from a console shows these messages:

Bonobo-WARNING **: Could not find GNOME pixmap file (null)

Because reinstalling seems to do nothing I might try to downgrade Evolution to see if that works…

Categories
Linux / Gentoo Linux

Logitech Quickcam Communicate STX and Linux

Todays annoyance is the fact that my webcam was broken for months now because I couldn’t get the correct driver to work. To be exact, the device ID is 046d:08d7 and the correct driver for it is gspcav1, from this site. I tried the UVC driver from Berlios as well, but it only works with newer cameras (and as I upgraded from my perfectly fine Logitech Messenger just because Windows Vista needed it, Logitech can drop dead if they think I’ll buy yet another camera). Anyway, the UVC driver can be found here.

The problem I kept having was the fact that the gspcav1 driver was the only one for my camera but it wouldn’t compile. I would end up with this error dump:

make -C /usr/src/linux M=/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224 CC=x86_64-pc-linux-gnu-gcc modules
make[1]: Entering directory `/usr/src/linux-2.6.25-gentoo-r4'
  CC [M]  /var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.o
In file included from /var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:848:
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h: In function 'spca506_SetNormeInput':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h:120: error: 'VIDEO_MODE_NTSC' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h:120: error: (Each undeclared identifier is reported only once
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h:120: error: for each function it appears in.)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h:131: error: 'VIDEO_MODE_PAL' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/Sunplus/spca506.h:137: error: 'VIDEO_MODE_SECAM' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c: In function 'spca5xx_get_depth':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1093: error: 'VIDEO_PALETTE_RGB565' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1095: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1101: error: 'VIDEO_PALETTE_YUV420P' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1104: error: 'VIDEO_PALETTE_RGB32' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c: In function 'v4l_to_spca5xx':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1291: error: 'VIDEO_PALETTE_RGB565' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1293: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1295: error: 'VIDEO_PALETTE_RGB32' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1297: error: 'VIDEO_PALETTE_YUV422P' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1299: error: 'VIDEO_PALETTE_YUV420P' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c: In function 'spca50x_init_source':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1802: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c: In function 'spca5xx_setFrameDecoder':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:1841: error: 'VIDEO_PALETTE_RGB24' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c: In function 'spca5xx_do_ioctl':
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:2074: error: 'VIDIOCGCAP' undeclared (first use in this function)
/var/tmp/portage/media-video/gspcav1-20071224/work/gspcav1-20071224/gspca_core.c:2078: error: invalid application of 'sizeof' to incomplete type 'struct video_capability'

Note: I’m posting it all so someone might find it using a search engine because nobody else put this up.

The solution to this? So darn simple that I shouldn’t have missed it: enable Video For Linux 1 in the kernel. You see, this driver is designed for V4L1 and without the compatibility layer it will error like this. For the Gentoo users it seems like a problem which is here to stay as the ebuild can not check for this (only if any V4L version is enabled).

I still think it would be nice if the package maintainers put up a warning in the ebuild so I wouldn’t have to figure this out on my own… ahh well.

Tags van Technorati: ,,,
Categories
Linux / Gentoo Linux

Why Pulseaudio sucks…

A while back, I got really annoyed from the fact that when I was running Gentoo and I decided to play a game (Wine/Cedega) like EVE Online, I either have the sound from EVE-Online, or from my desktop – but not both.

This is usually due to a crappy sound card (no hardware mixing) and a driver which fails to fix this. I knew ALSA had dmix for software mixing but I read somewhere that pulseaudio was the new hot shot in the mixing scene. I was wrong.

You see, after enabling pulseaudio in Gentoo, rebuilding a number of packages to support it (Xine-lib for example) and following the guides to make ALSA-only applications use pulseaudio as well (in fact by looping the sound back from ALSA to pulse and again to ALSA), it should just work ™.

My first attempts were fine, I used aplay to select the pulse channel, played 6 songs at once and all was well. When it was time to make Phonon (KDE4) use the new pulseaudio sink, nothing happened. I even used the workaround as explained on the pulseaudio page – but nothing helped. I finally made the default audio-sink pulseaudio.

Next up: Wine. The first attempt to start Winamp went fine, except for the fact that I didn’t hear no sound. Looking in the logs, I see wine attempting to open the ALSA/Pulseaudio library from ‘/lib32’. For the more perceptive of you: yes, it want 32-bit libraries on my 64-bit system. Normally this is handled by a emulation package but guess what? The Gentoo emulation packages don’t feature these only slightly vital libraries.

After reading the bug page which explained the problem, I found a site of someone who provided the 32-bit binary drivers for ALSA/Pulseaudio. And indeed, after extraction into ‘/lib32’, sound came to life from the mysterious world inside Wine.

Then I tried to start World of Warcraft. The stuttering sound of a screwed up sound mixer emerged from my speakers and no matter how I started the game, the sound was useless. Finally I gave EVE-Online a try and it had the same, horrible sound output…

So I reverted everything I did, read up on how dmix was supposed to work (which seemed like a lot less work after following the ‘simple’ guide on the pulseaudio site), set up a software mixer and made it default and there we go – audio output for all!

Now I don’t know who decided that pulseaudio was ‘lightweight’ and ‘fast’ but I know for sure that its neither – the default dmix extension for ALSA works a million times better…

Categories
Linux / Gentoo Linux

Postfix Queues and Amavis trouble

After I had not received mail for a couple of days I suddenly started to receive postmaster errors from one of the servers I maintained. The message told me the mail could not be delivered. On further inspection it seemed that this was a problem because postfix could not connect to [127.0.0.1].

This meant of course that some daemon on the server was out for lunch and it was screwing up the mail deliveries. Using ‘postqueue -p’ to inspect the queues I found out that 4000 messages where packed up in the queue, filling her up to the maximum I allowed.

After running ‘postsuper -r ALL’ (which means, re-queue all messages for instant delivery) I tailed the ‘/var/log/mail.log’ file to find out that 20% of the messages got delivered and the rest wound up back in line.

One error that kept flashing by was: ‘TROUBLE in check_mail: parts_decode_ext FAILED: run_command (open pipe): Can’t fork at…’. It had something to do with the FileIO class. Now the message came from Amavis and in fact, amavisd is nothing more than a Perl framework, hooking all kinds of filters together. This means its memory hungry but won’t totally crash upon hitting the floor.

This explained why a part of the messages made it through: a few threads fitted in memory, allowing for completing the delivery, however most mail got rejected once again and returned faithfully to the waiting queue. Another inspection of the queue confirmed this: after 2 attempts 3200 messages where still there.

Then it dawned on me: I had not enabled the swap memory! After fixing this (and adding 1GB swap to the 256MB of RAM) and reloading Amavis I tried once again to requeue all mail. This time the mail got through the filters in one piece (and well within the memory boundaries). I wish all issues with servers were as simple as this ^-^.