Wednesday, October 22, 2008

Laptop woes and a switch to KDE

The fan on my Ubuntu laptop is making all sorts of noise (loud) and I fear it's not long for this earth (the fan). Since I don't really use this laptop as a portable device (just a wireless one) I think I might be able to come up with some kind of kludge or hack to keep it going. One problem I began to run into is that Gnome and it's apps are eating up my CPU (but not ram). Basically the latest updates caused the entire system to run amok. The response was terrible! Add this to the fan problems and all sorts of 'fun' ensues (the fan needs to work harder, the apps run slower, the CPU kicks up and the heat goes up and then the CPU slows down but the heat isn't dissipating, rinse, lather, repeat ... ). Previously I had tried to use KDE with Edgy but switched to gnome because I was familiar with it. With Gnome running like a pig (and all those processes, what are all those processes for?) I decided to switch to KDE. Well that didn't go well. Seems the KDE is only kind of installed on this Hardy setup. I attempted to use adept_manager to reinstall but that didn't help. I then use synaptic and that helped but I ran into mime problems (needed to remove files from /var/tmp and /tmp). Then Firefox would start up in offline mode (needed to change toolkit.networkmanager.disable to true in about:config and restart). This is because my WiFi is not being managed by the Network manager, which I can't seem to find. Argh, I hate relearning a new environment but this time it was really necessary. Gnome is gotten to be too bloated and no longer runs properly on a 1.5GHz (2.4GHz when run at full speed) laptop. I may really start digging in and trying to find a lighter X setup. Right now KDE is working okay. Now if I can just get Desktop pager to allow me to use keystrokes (Alt-1 etc. doesn't work).

Sunday, October 12, 2008

That was painful!

I compiled everything I needed for MediaTomb (ffmpeg, vlc, etc). Some things were easy to compile and install. Others a little more painful. Of everything I installed, VLC was the most painful. When I visited the web site there were plenty of other packages that were mentioned so I knew I was in for a lot of work but the stuff that they didn't mention was the painful part. Things like Lua, and things like liba52 and a few other things that I told it not to use (--disable-xxx). Oddly enough I was able to disable QT (I have no intention of running VLC with the GUI). The way I'd find out I needed another package was to compile VLC and wait for an error (missing glib.h, or lua.h or somethingelse.h). It's a very difficult way to do things. I have no idea why it was so difficult. One thing I will do is recompile MediaTomb since now I have a lot more of the stuff I excluded in it's first compile. Hopefully I haven't messed things up and I'll find out sometime this week after I test out the mms transcoding for the local radio stations with my WMLS11B.

Keeping up to date

One of my home servers is running Fedora Core 6 (FC6). I've got it nicely setup for my specific home use (printing, file sharing, DHCP, DNS, etc). Basically a well tuned system, something that is a royal pain to upgrade. One of the problems with Fedora is that it needs to be upgraded just about every 18 months. So I decided that my next upgrade would be to CentOS. It needs to be upgraded less often and I'm hoping that the upgrades will less painful. A few of my Fedora upgrades have actually been fresh installs. A very painful way to upgrade! I really like the way Ubuntu's upgrades have gone on my laptop (just let the package manager upgrade, after waiting a few weeks for everyone else to try ;-). Anyway I still haven't solved the real problem. How to upgrade those custom packages such as the Sendmail configs, or my custom use of tinydns (I'm not using the daemontools) and other customizations. This is something I really need to resolve as it's still a problem with whatever OS I use. If anyone has a solution please let me know.

Currently I'm installing MediaTomb on my HA server. Since my Fedora setup is a legacy release it's no longer supported and you can't use the package manager (rpm) to download and upgrade to the latest and greatest packages. So to install MediaTomb I've had to downloaded the SVN release (I want YouTube access among other things) plus some 40+ packages to upgrade, compile and install. What I've done in the past is to simply download the package source, compile and install the code. One small problem. The pkg-config tool doesn't know where the new package is (argh!). Well today I accidentally found out about the .pc files and the PKG_CONFIG_PATH variable. When you do a './configure' in the new package's source directory it may call the command: pkg-config to find out all sorts of useful information about installed packages. If the command doesn't know about the installed package then it doesn't think it's installed. When you set the PKG_CONFIG_PATH to something like /usr/local/lib/pkgconfig/ it tells the command: pkg-config to also look in that directory for the appropriate '.pc' files for information on the packages installed on the system. Most manually installed packages will install in /usr/local but not all will install a '.pc' file. The good news is you can manually create the file and drop it in the $PKG_CONFIG_PATH and the pkg-config command will find it. Great, so we know where to look but what information is it looking for? Well that one got me too until I found the libpostproc.pc file (it was missing on my FFmpeg install). Here's what the libpostproc.pc file looks like on my setup:

 prefix=/usr/local
exec_prefix=${prefix}
libdir=${exec_prefix}/lib
includedir=${prefix}/include

Name: libpostproc
Description: FFmpeg post processing library
Version: 51.1.0
Requires:
Conflicts:
Libs: -L${libdir} -lpostproc
Cflags: -I${includedir} -I${includedir}/postproc

As you might be able to discern it has the information about where the library files are contained (/usr/local/lib), where the include directories are kept (/usr/local/include) and the appropriate C compiler flags to compile programs that need libpostproc. I wish I had this information a long time ago it would have made some of the most complex manual installs a lot easier. Hopefully this might be useful information for others who are going about it the hard way. ;-)

Friday, October 10, 2008

MediaTomb

Last week my friends and I sat down for our 'hack session' which is really nothing more than our weekly excuse to get together and tear into technology. We've been doing it since the 1980's and we've been quite creative (we're not black hats). This week it was my friend's NSLU2 and Twonky. For some odd reason the NSLU2 didn't want to start up and of course this meant that Twonky didn't start up either. After much haggling we settled on upgrading the NSLU2 (and three others) to the latest Unslung firmware release (6.10 - Oh, OpenWRT Kamikaze 7.09 is available, more upgrading to do). Once that was taken care of everything went well. While we were at it we took one of the other NSLU2s and loaded MediaTomb on it. Other than it's odd interface it worked really well. This is good as Twonky isn't supporting the NSLU2 anymore and I prefer Open Source. I don't know what our next session will be but we'll be using the NSLU2, Linksys WMLS11B and the D-Link DSM320. It'll probably be more MediaTomb as it has some really cool transcoding capabilities. :-) In simple terms it means that the WMLS11B can now play Ogg audio files (or FLAC or any other audio format you might think of). Well almost, MediaTomb translates (transcodes) it from Ogg to Wav or MP3 (my choice). By similar means MediaTomb can transcode a YouTube Video to something that the DMS320 can use to show on your TV set. Now devices that have been discontinued can still be used and adapted to support newer technologies. Now that's cool.

At home I decided to learn more about MediaTomb. So I pulled down the source code (and there is a lot of it as it's features depend on external packages) and compiled it up. I did use the package manager on Unbuntu but I still wanted to go the long route of compiling for use on my main HA server. I currently have v0.11.0 installed but found out that I wanted some features that are only in the SVN release. So some more upgrades (I'm running Fedora 6 on the server - I really should get that Centos upgrade installed) and some more compiles, which went easier than the 0.11.0 compiles and I'm almost ready to install the SVN version. If all goes well I may write up a replacement chapter for my book. But with school that won't happen any time too soon.