Tuesday, December 23, 2008

Black Egret within city limits

I popped into a local bird sanctuary (Austin Roberts Bird Sanctuary) yesterday morning, just to see whether there was anything new to see. The sanctuary itself, is a city block in size and used to be in suburbia. However, with businesses moving from downtown Pretoria into the suburbs, the sanctuary is now in a mini business hub. It is pleasing to see that the birds are remaining in the sanctuary, in spite of the developments.

I found a Black Egret in open view from the hide, preening itself:



I took many shots, but unfortunately, in the excitement of finding this bird, forgot to change the camera from ISO 1600, that I'd been using on another bird in the shade. I was able to save some images with a bit of aggressive post-processing:



After preening for about half an hour, it jumped into the water and started wading around. It was here that I realised that I was working at too high an ISO.




One of the amazing things about a Black Egret is that it fans its wings to form an umbrella while hunting. It then catches fish which move into the shade of this 'tent':







All in all, a very rewarding session, not only for finding the bird, but also seeing it go through its 'tenting' routine.

Friday, December 19, 2008

Kubuntu 8.10 mutterings

Why Kubuntu?
I started with Unix back in 1988 with system development, mainly interfacing between the Unix box and peripherals. This followed a period working on CDC mainframes, Novell networking and PC software development and support. Around 1998 I got back to Unix through Linux when I built my first Web server. At this stage, X was also starting to make an appearance. I looked at Gnome, but didn't like the way its mouse handling worked, so I changed over to KDE. Unfortunately, I had no time to do any serious work with it, so was out of Linux until recently. Naturally, I felt that I had preferred KDE historically, so had to go for Kubuntu.

I've been looking at Kubuntu 8.10 for a while now. I have it on my office PC and there it seems pretty stable, but I don't do too much out of the ordinary with it. I had 7.10 on an old machine at home, which worked very well, albeit a bit slowly (350MHz P2). Come October this year, and I decided maybe it was time to have a look at what KDE 4 was all about. First thing that happened was that I couldn't upgrade as the driver for the old nVidia TNT card caused hassles with the upgrader. To upgrade from a live CD:

sudo /cdrom/cdromupgrade

This bombed out during the process with "cannot calculate upgrade". After much searching on the Web, I found that it was a package that the upgrader could not uninstall (the said TNT driver). The upgrade errors can be found in this file:

/var/log/dist-upgrade/main.log

I tried to set the system back to the generic nVidia driver, then uninstalled the TNT driver manually. Unfortunately, this broke X completely, so I had to install from scratch. As a test of the upgrade, I first installed 8.04, then upgraded to 8.10 and everything went well. KDE 4 was unbelievably slow on the old machine, so I decided to pop the hard drive into a 3.0GHz P4 HT machine. This worked very well, with Linux picking up all the necessary hardware changes on the first boot. However, and this is the reason for this post, I started running into many of the complaints against KDE 4 found in cyberspace, with the new setup. What follows is some of the problems and the fixes that I've made to get everything working (these are not necessarily in the order that I came across the problems). I'm going to put everything into this post, so it may become a bit monolithic.

Mounting Windows disks in Kubuntu
Even though I had already sorted this out with 7.10, I'm going to include it here too, as it's not trivial to mount other disks from Kubuntu. First off, all the disks and their various partitions can be found with:

sudo fdisk -l

The disks will appear as /dev/sda1 /dev/sda2 etc for the partitions on the master disk (sda), /dev/sdb1 /dev/sdb2 etc for the partitions on the second disk (sdb), /dev/sdc1 for the third disk, and so on. Now normally, in other flavours of Linux all that is necessary to mount a partition is:

sudo mount /dev/sdc1

(this will probably require some extra switches to mount the correct disk format). However, on Kubuntu trying this results in the error

mount: can't find /dev/sdc1 in /etc/fstab or /etc/mtab

Kubuntu requires that the disk be mounted according to its UUID and the problem is trying to find that UUID. What I found by trial and error was a directory under /dev/disk called by-uuid. Now if you list everything in that directory with

cd /dev/disk/by-uuid
ls -al


you will get the UUID of all the partitions with the corresponding link to the sdxn. These are pretty complex IDs, so instead of trying to copy them, create a file with the necessary entry in (here looking for sdc1):

ls -al | grep sdc1 > /home/alan/disk3

This creates a file in your home directory (you will of course not use alan here :)) called disk3. What I then did was to edit the file to remove everything other than the UUID and then add the commands to actually mount the disk (it's a bit too much to remember).

cd
kate disk3


Now, change the contents of the file so that it contains the commands necessary to mount the disk:

sudo mount -U your-UUID-here /media/windowsd3

To make the file disk3 an executable script, do the following:

chmod 751 disk3

Now before you can execute this file, you need to make the mount point, windowsd3, for the disk:

cd /media
sudo mkdir windowsd3


Now you can go back to your home directory and mount the disk:

cd
./disk3


and the disk will be available under /media/windowsd3

Simple??

Booting from a Windows slave disk
Although this is also not a specific 8.10 problem, but rather X in general, I am adding it here as it fits in nicely with the previous section. Again, although it may look easy, trying to piece together all the necessary information is not trivial, especially as Windows wants to control the boot process. A simple bit of editing in the Linux grub menu is all that is required.

sudo kate /boot/grub/menu.lst

Near the top of the file, you will find the following entry:

# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#

Copy these lines and paste them at the bottom of the file, before the following line:

### END DEBIAN AUTOMAGIC KERNELS LIST

Now edit the lines that you have added, firstly by removing the # at the start of each line. Add the lines so that your entry looks like the one shown below:

title Windows XP
root (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1


An important point to make sure of is the space between the entries in the two map lines. If your grub menu is hidden, make sure that you increase the timeout entry to something around 10s (or add a # before the hiddenmenu entry). When you next boot, pressing ESC when requested will take you into the boot menu and you will be able to select your Windows entry.

KDE 4 has a grub editor in the system settings, but it's a bit painful to use, so I rather edit the grub menu file directly.

Adept package manager
Adept has changed from KDE 3.5 to KDE 4, and not for the better. In 3.5, I used adept-manager to add packages. While this was quite buggy (suffered from frequent crashes), it was reasonably easy to use. With version 4, adept-manager disappeared to be replaced by adept, with two switches (as far as I can make out - no man entry and no documentation for the help files), manager or installer (with manager being the default). Both of these appear in the menus:
* under the classic menus, manager is under system and installer on the start menu
* under the new kickoff menus (which is rather painful to use), installer is under the application menu and manager under application>system menu.

What makes both flavours of the adept software excruciatingly difficult to use is that the packages are not sorted into alphabetical order. So, unless you know exactly what you are looking for, it is incredibly difficult to find packages if you have included universe and multiverse repositories. installer tries to make it easier by categorizing the packages. However, the browse function requires that you enter the complete and correct name of a package in order to find it.

Fortunately, there is always synaptic to fall back on.

I did hit one very bizarre bug with 'adept manager'. For some reason, it refused to look outside the CD as a repository, which meant that it could not find synaptic. 'adept installer' found and installed it through the browse function, but synaptic suffered with the same problem as 'adept manager', it could only find packages on the CD. I tried many different "tricks" to try and get these apps to see all the repositories (including many apt switches, such as 'apt-get update') without any luck. You can imagine how frustrating this is when you're wanting to install your workhorse apps (firefox, krusader, etc), but instead find yourself trying to fix something else. Along the way, I found that this was not a unique problem. What made this problem even more bizarre was that the next morning, I tried 'apt-get update' again, and synaptic could suddenly see the outside world...

Playing an audio CD
Neither Amarok nor kaffeine will play an audio CD as both look for the CD device in /dev/cdrom (as does System settings>Advanced>Audio CD). There was no device /dev/cdrom on my system, so I changed the device to /dev/scd0.
Amarok:
Settings>Engine>Default device
To play the CD, Engage>Play Audio CD

Kaffeine:
Settings>Xine Engine Parameters>Media

In some situations, I found Kaffeine would not play, so I created a cdrom entry in /dev:

sudo ln -s /dev/scd0 /dev/cdrom

This seems to have made Kaffeine happier.
[update]My /dev/cdrom entry has been deleted by Kubuntu on reboot. Methinks it's time to uninstall Kaffeine.

Playing a movie DVD
One of the strange features of the ubuntu range is that a DVD movie player gets installed, but it can't play DVD movies! (Unless of course you have medibuntu installed.) You need to install some software from the medibuntu repositories in order to get your DVD movies playing. The easiest way to do this is the following:

sudo apt-get install kubuntu-restricted-extras

However, this is a rather large download as things like flash and quicktime players get installed as well. Now, one of my pet hates is flash and I don't want it on any of my machines, so I had to find another route to get the required software. The following does the job very nicely:

sudo apt-get install libdvdread3

Once the download is complete, you need to run the install script:

sudo /usr/share/doc/libdvdread3/install-css.sh

You should now be able to view your DVD movies.

CD drive opening then closing immediately on eject
This was really irritating, when I ejected a CD, the drive would open, then close as soon as the drawer reached the end of its travel. The drive would open, and remain open, if the eject button was then pressed.

I did a bit of searching for this and found that it is a bug which is due to be fixed in KDE 4.2 (is evidently fixed in 4.2 beta). A workaround is to download this rules file, then do the following:

cd /etc/udev/rules.d
sudo mv 60-persistent-storage.rules 60-persistent-storage.rules.old
sudo cp /home/ME/Download/60-persistent-storage.rules .


Of course, the ME/Download will be replaced with where ever you downloaded the rules file (also, this blog template has split line two - there should be three lines, one starting with cd and two with sudo).

Kmail causing Kontak to crash
Recently, on starting Kontak, it would crash with the error:

"KCrash: Application 'kontak' crashing..."

with preceding references to kmail. Now, I have never used kmail, so ran it to check whether it was causing the crash. Sure enough:

"KCrash: Application 'kmail' crashing..."

So, I started searching. One possible solution I found was to install kdepim. I did this (45MB download, with several upgrades I hadn't done), but kmail still crashed. Another option found was to reinstall kmail, but to no avail. Eventually, I searched synaptic for kmail and found one upgrade hadn't been done: libkpgp4. Upgrading this fixed the problem.

From the description of this library:

"This package contains libkgpg4, a gnupg-library for kmail and other parts of kdepim using gpg-based crypto.

This package is part of KDE, and a component of the KDE PIM module. See the 'kde' and 'kdepim' packages for more information."

So why didn't the installer see the dependency of kdepim on this library when it upgraded many other modules?

Garbled or broken taskbar icons
This is a bug in Kde 4.1 which has evidently been fixed in 4.2. It seems to be caused by a mixture of Qt4, the taskbar manager (plasma) and nVidia drivers. A workaround is to switch to a console (ctrl-alt-F1) and then back to the GUI (ctrl-alt-F7). This forces a redraw of the entire screen.

Things that don't work
Kdehelpcenter
Kexi, Amarok and Kaffeine (plus: Korganizer) are still using old helpcenter files, so no online help is available.

Kipi plugins
The kipi plugins have not been upgraded to KDE 4, so Gwenview (and I imagine digikam) have very limited capabilities.

Every so often, the time goes haywire. I haven't figured out why yet. I'm on GMT +2, and every once in a while, I find the time at GMT +4.

Another "every so often": KDE hangs while shutting down. I have to do a console login (ctrl-alt-F2) then shutdown with

sudo shutdown -h now

Saturday, December 13, 2008

Rietvlei Dam Nature Reserve

On my last visit to the reserve, I was pleased to see that the building activities at the bridge between the two dams was complete. They had built a weir which formed a really nice little dam which was well shaded by willow trees allowing for plenty of hideaway places for birds. Here, a Little Egret hunting next to the road.


What was also nice to see was a Giant Kingfisher sitting on the railing of the bridge. As I tried to move closer, she flew into a tree giving a more natural looking backdrop.


Elsewhere in the reserve I also managed to get a shot of a Golden Bishop. Unfortunately, it never sat in a place where I could get a clear shot at it.


Another bird which was not at all keen to have its picture taken was a Levaillant's Cisticola. With this shot, I had to aim the camera very carefully between the reeds.

One bird which was very keen to pose (for a change) was a male Whitewinged Widow. I took many shots of this bird as he called trying to attract a female. Unfortunately, the sun stayed behind the clouds during the time he was posing for me.

As I was leaving the reserve, I came across this Rufousnaped Lark singing on a bush.

All in all, a pleasant morning, with not too many photo opportunities, but I was able to use those that presented themselves.