Thursday, September 16, 2010

Squeeze in a jam?

Debian Lenny is a great operating system. It just seems to be completely reliable- if there are any bugs, I haven't found them. That's why it's also known as the Debian Stable release. However, what's also obvious from the first time you use it is that a lot of the packages it contains are old. Only a few years old, but that's a long time in computing. This laptop, for example, has a moderately high performance graphics card, but Lenny just can't use it. The open source drivers available in Lenny can't make full use of it, and the proprietary driver is only installable by recompiling the kernel. In contrast, the proprietary graphics driver was available in PCLinuxOS four years ago, in Ubuntu soon after, and the open source drivers available in Ubuntu could make full use of the card soon after that- meaning I could run desktop effects and games. Not that I'm much of a gamer, or a big fan of desktop effects, but I liked the minimal Compiz effects available in Ubuntu- this is the 21st century: windows should minimise smoothly, not by drawing smaller and smaller black outlines- that's just so 90's.
The next version of Debian Stable- called Squeeze- is long overdue. What's holding it up? Squeeze will be released when the release-critical bugs are squashed. I'd assumed these bugs were performance bugs in software packages in Squeeze, but now I think that many of them could be upgrade bugs that will foul up any upgrade form Lenny to Squeeze.
When I first tried Debian, the video driver issue prompted me to try an upgrade to Testing- the version of Debian with more up to date packages, but a higher risk of finding bugs. The attempt left me with unusable computer. I put this down to being a complete noob, and reinstalled Lenny. Later I learnt that the upgrade has to be staged- certain packages have to be updated before doing a full upgrade, otherwise the upgrade falls down.
Recently I saw a post on the Debian forum which suggested that an upgrade was now a relatively simple process- involving just a kernel upgrade before a full upgrade, so I thought I'd give it a go.
Being less of a noob this time, the error messages I saw put me off, and I aborted the upgrade.

Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading extended state information
Initializing package states... Done
Writing extended state information... Done
Reading task descriptions... Done
The following packages are BROKEN:
gdeb gnome-apt gnome-desktop-environment libcairo2 libept0
libgssapi-krb5-2 libk5crypto3 libkrb5-3 libkrb5support0
libnautilus-extension1 music-applet

The following NEW packages will be installed: {snip}

The following packages will be upgraded: {snip}

The following packages are RECOMMENDED but will NOT be installed: {snip}

The following packages have unmet dependencies:
libkrb5-3: Breaks: libkrb53 (< 1.6.dfsg.4~beta1-9) but 1.6.dfsg.4~beta1-5lenny4 is installed. libkrb5support0: Breaks: libkrb53 (< 1.6.dfsg.4~beta1-9) but 1.6.dfsg.4~beta1-5lenny4 is installed. gnome-desktop-environment: Conflicts: gstreamer0.10-gnomevfs but 0.10.30-1 is to be installed. gnome-apt: Depends: libapt-pkg-libc6.7-6-4.6 which is a virtual package. libcairo2: Breaks: xulrunner-1.9 but 1.9.0.19-4 is installed. libk5crypto3: Breaks: libkrb53 (< 1.6.dfsg.4~beta1-9) but 1.6.dfsg.4~beta1-5lenny4 is installed. libept0: Depends: libapt-pkg-libc6.7-6-4.6 which is a virtual package. gdeb: Depends: libapt-inst-libc6.7-6-1.1 which is a virtual package. Depends: libapt-pkg-libc6.7-6-4.6 which is a virtual package. music-applet: Depends: python (< 2.6) but 2.6.5-13 is to be installed. Depends: python-gnome2-desktop but it is not installable libgssapi-krb5-2: Breaks: libkrb53 but 1.6.dfsg.4~beta1-5lenny4 is installed. libnautilus-extension1: Breaks: gnome-mount (< 0.8) but 0.7-2 is installed. The following actions will resolve these dependencies: Remove the following packages: gdeb gnome gnome-apt gnome-desktop-environment gnome-mount libbind9-40 libcamel1.2-11 libdns45 libept0 libisccfg40 libkrb53 libtotem-plparser10 music-applet xulrunner-1.9 Leave the following dependencies unresolved: update-notifier recommends apport-gtk libnautilus-burn4 recommends gnome-mount (>= 0.4)
Score is -1192

Accept this solution? [Y/n/q/?]

I don't really think I want to uninstall Gnome, so 'no' thanks.
I Googled the first 'unmet dependencies' issue and found this:
libkrb5-3 introduces a "Breaks: libkrb53 (<< href="http://blog.windfluechter.net/content/blog/2010/09/13/915-upgrading-postgresql-83-84-squeeze">here for an instance of this problem (which is a pretty deep swamp to get
out of).
A pretty deep swamp to get out of? I think I'll give that a miss!
It seems to me that the other issues reported are upgrade bugs.
Now of course Squeeze is not ready yet. As a fresh install, it's only an alpha.
The absence of a release manager seems to be a factor in the delay. Lack of manpower is an issue mentioned on the Debian installer page above.
As most people will have noticed, this release has taken more time than usual. This was for various reasons that go from technical (major changes in the installer itself and other components that affect us) to lack of manpower to manage all the work required quickly. We really need more people to help us and contribute; please contact us if you're interested in helping.
It's frustrating waiting for Squeeze, but when it comes, I'm sure it will be a great release- so good luck to the Debian team in squashing those release-critical bugs!

Tuesday, September 7, 2010

On themes

A good computer desktop should be elegant, both in function and appearance. Gnome goes a long way towards satisfying those requirements for me, but in some ways, it's become a little dated both in functionality and appearance. As I've written about previously, the taskbar and the notification area date from 1995. (Application launchers are a more recent alternative to minimised windows in the taskbar, and the much-abused notification area is disappearing in Ubuntu.)
Now of course, both of these objections are going to be addresses in the radical overhaul of Gnome that is Gnome 3, which is also going to change the appearance of the Gnome desktop.
So really this post is already obsolete, because I'm going to write about the appearance of the Gnome desktop, but here I go anyway.
I've been trying out various Gnome themes. The default theme in Gnome in Fedora, Mandriva and Debian is 'Clearlooks', an elegant but somewhat dated theme. Now there's 'dated' as in simply, gone out of fashion, and there's dated, as in, there's something better available now. Think about the web- there are web sites done with tables and with clumsy menus and too many glassy buttons and animated gif's, and there are elegant and restrained web sites done with CSS, beautiful backgrounds and well laid out menus. No surprise to learn that Gnome 3 will use CSS in its design, giving theme designers wings.
Clearlooks is certainly a vast improvement over the way Gnome looks unthemed- as much '95 as the notification and taskbar. It's not the naff 90's web site of my analogy. I suspect that blue has gone out of fashion, for me at least, but is there anything better available? Is clearlooks the elegant contemporary CSS layout website?







Any possible improvements in appearance are slight, mostly due to the limitations of the GUI toolkit used by Gnome. A subtle shading of a border, maybe, or a slight glow or 3D effect to a button, a new slider design or some new icons for the window buttons. So no, clearlooks isn't the 'elegant contemporary CSS layout website' of my analogy either: we'll have to wait for Gnome 3 to see what designers can really do.
(One aspect of Gnome where designers already have free reign is in icon design. Sharp-eyed readers will also spot that I've changed my icon theme in some screenshots. Icon sets can look horribly dated or elegant and contemporary.)
So I'm looking for a new colour, with some subtle improvements in design.
For me, dark is the new black, so I'm going to be looking at dark themes. Now obviously Ubuntu has some beautiful dark themes, but I've been looking for alternatives, ones that will work on my Debian Lenny computer.
Dark themes can look good, but there are two issues that quickly become apparent: some applications do not respect the way themes tell them to display light text on a dark background, resulting in illegible menus, and a dark theme may look good on a dark wallpaper, but open a browser window or a document in OpenOffice, and the contrast can be a strain on the eyes.
One dark theme I've used for a long time is New Wave. It's elegant and easy on the eye. It avoids a harsh contrast with white browser or document pages by having toolbars in grey, so there is a gradient from the dark upper panel and menu bar. I've seen the greyness of New Wave criticised as dated, but I feel this is just fashion. Grey is easy on the eye, neutral, and leaves text easy to read. In fact, I make New Wave even more neutral on my desktop by using the Gnome-Colors Gnome-dust icon set.


Over the past few days, I've been trying out quite a few themes from gnome-look.org. I've found two dark themes that work on Debian Lenny that I consider good enough to keep installed and use from time to time.

The first is Shiki-colors, which 'mixes the elegance of a dark theme with the usability of a light theme.' I suppose that's true of New Wave too, really. I've used the Shiki-Dust theme, the most neutral of the set- other variants are more colourful. The one thing I don't like about the theme is that drop-down menus are dark- I find these difficult to read, and prefer the grey of New Wave.
One problem using Shiki is that the Firefox search bar drop-down is almost unreadable using this theme- but there is a fix. Shiki-colors comes in two versions, with different engines- Clearlooks and Murrine. The former will run on Debian Lenny out of the box, the latter requires the installation of an updated Murrine engine (the one that comes with Lenny is too old). See below for details.


The second theme I've chosen is Sugar. This theme utilises the Murrine engine to apply some (very subtle) glassy looks. It won't work with Debian Lenny because the version of Murrine in Lenny is too old. There is a Debian package of an updated Murrine engine on gnome-looks- with that installed, I could use the Murrine version of Shiki-colors, and Sugar 1.0, but not Sugar 1.3. I'm guessing that depends on and even later update to Murrine, available in Ubuntu (which the theme is intended for).
However, even Sugar 1.0 is very nice. In the screenshot, I'm using it with the Elementary icon set.
Sugar seems to avoid the problem of menu items on a dark background not being displayed correctly by having the menu bar grey in some applications (like Firefox) but dark in other applications like Nautilus and the Gimp. This means the theme is somewhat inconsistent. [Update: this is corrected in version 1.3 of Sugar, but to install this version, Debian Lenny users will need to install libgtk2.0-0 from backports and compile an updated version of Murrine.]
On the plus side, it doesn't have dark drop down menu's, which suits me.


In summary, it's not only Ubuntu users who can have an elegant and contemporary Linux desktop (although they- and Debian Unstable users, of course- have the lead).
However, to see what the most talented designers can do with a modern desktop, wait for Gnome 3.

Saturday, September 4, 2010

Bucky balls & browsers

It was the the 25th anniversary of the discovery of fullerenes today and Google marked the occasion with an interactively rotatable fullerene C60 molecule as the second 'o' in their logo.
The animation was done by a large javascript on the Google homepage, which proved very CPU demanding for some users. Hardly surprising as the animation contains 60 points in 3D space, making up 12 pentagons and 20 hexagons with all the connecting lines involved.
Interestingly, Firefox seemed to struggle the most with the animation; Opera and Chrome handled it with less effort.

Firefox CPU usage:


Opera CPU usage:


Chrome CPU usage:

Tuesday, August 31, 2010

Pidgin Guifications theme for Gnome

Pidgin is my favourite IM client. It does IM's well, and also tells me about new emails, but only when I open the Buddy list. Recently I found the Guifications plugin (install via Synaptic in Debian), which does a popup notification when new emails arrive. Unfortunately, the default popup is rather poor- it doesn't match Gnome pop-ups, the information it contains is unreadable, and the icon used is the old Gaim icon, not the Pidgin icon.
Well this is Linux- if you don't like it, you're supposed to fix it, so I had a go.
Guifications includes a theme editor. It doesn't work on the themes that come pre-installed, so I grabbed a copy of the default theme from /usr/share/pixmaps/pidgin/guifications/themes and put it in ~/.purple/guifications/themes/.

Here is the default Guifications theme:


The first step was to try widening the background image:


OK, at least the information is readable now. Next, I updated the log using the Gimp:


Not bad, but it doesn't match Gnome popups:


I edited my screenshot of a Gnome popup and added the Pidgin logo. Text and account icon positions were off:


After another edit, the icon was positioned in the right corner, but I'd borked the text positioning:


Another edit sorted out vertical positioning, but clipping and the icon position still needed adjustment:


Another edit sorted out those problems. The popup looked like it needed a title in bold:


The email address in the 'From' field is not the sender, it's account- and that information is obvious from the account icon, so the email address was redundant:


If I say so myself, I was impressed with the result! A very nice popup which matches Gnome popups almost exactly.
[NB: There a glitch in Guifications which means email notifications don't appear unless you deselect 'Email' from the 'Notifications' tab in the Guifications configuration window and then reselect it again after changing themes. Bear this in mind if you try alternative themes.]

Wednesday, August 25, 2010

Tagging audio files using Music Brainz Picard- Some more examples

Here are some more screen shots to illustrate identifying music files by use of an acoustic fingerprint, and adding tag information, using Music Brainz Picard.
I've added a folder containing 19 music files which are not tagged with meta-information- album, artist, track etc.- and used the scan button to have Music Brainz Picard check the acoustic fingerprints of the tracks against its database. The application has suggested four possible album matches:


The first suggestion is actually the album I'd ripped to MP3.


The complete green bars indicate a match with high confidence; the incomplete green bars a slightly less confident match, and the incomplete orange bar (track 16) a tentative match. (As we saw in the previous post, matches with low confidence are shown by a red bar.)
There are three tracks (5, 15 & 19) for which the application has not found a matching file. If we select this album and save, the corresponding files will not have their tag information added. We need to tell the application that three of our files in the added folder correspond with these tracks- we'll either find them in the unmatched files, or in the three other album suggestions.
In this case, my unidentified album was a soundtrack, which included tracks originally found on other albums, so it won't be surprising if Music Brainz Picard thinks they belong on another CD.
Here is our missing track 19, track 18 on another CD: we need to drag and drop it to track 19 on the first CD suggestion.


Here is our missing track 5: again we need to drag and drop it onto track 5 in the first CD suggestion.


And here is our missing track 15: drag and drop to the first CD suggestion as before.


In this example, Music Brainz Picard had correctly identified all the tracks, but understandably not been able to tell which CD the tracks were from.
It's also possible to see the acoustic identification completely misidentify a track, it which case it's again necessary to manually drag the misidentified file to the correct CD suggestion, and drop it on the correct track number.
(If there is a way to tell Music Brainz Picard "this suggestion is the correct album, and all my files belong to that album, in the order that they appear as files in the folder", then I haven't found it. If anybody knows better, or can simply or clarify the instructions given, please leave a comment.
Update: Forgot to RTFM.
You can drag whole directories, multiple files or album clusters onto albums and Picard will attempt to match the dragged files to the album. Any track that doesn't match up well enough, will be added to an "Unmatched Files" sub-folder specific to that album. You can drag files out of this folder and into the right slots in the album to fix up the files that Picard couldn't get right.

Tuesday, August 24, 2010

Tagging audio files using Music Brainz Picard

As described in the previous post, I recently converted some audio files from the FLAC format to MP3 using Sound Converter. Now sound converter is very clever, and when it converts files with no tags, it goes online to look for the appropriate information: album, artist, title etc. As far as I can work out, (see a previous post), it does this using a discid calculated from track lengths and an online database of CD discid's.
For several of my CD folders, Sound Converter correctly added MP3 tag information (although it left the files without meaningful filenames). Other folder it could not identify, and I had to use a different system of file identification, an acoustic fingerprint, and a different application Music Brainz Picard (which can also take care of the file name issue, renaming files according to the track name*).
It took me a while previously to work out how to use Music Brainz Picard, and when I cam to use it again, I realised I forgotten what I'd learnt, so I thought I'd write a short tutorial.
The first step is to add a folder containing tracks you want to identify from the menu.


The unidentified tracks should appear as unmatched files.


[Update: Anonymous has commented that it would be more efficient to use the Cluster and Lookup features here first- see comment for details.]
I can then select the unmatched files and use the Scan option from the menu, which will create an acoustic fingerprint and check it against the Music Brainz database. Suggested matches will appear in the right-hand window. In this case, there are only two hits- the red bars show that the confidence in a match is low, but the result is correct.

In the case of a more certain match, the bars will be green. If the track appears on more than one album, or the acoustic fingerprint created matches more than one track, alternative album or track suggestions will be displayed.
This is where some manual work comes in- I have to drag the unmatched file to the appropriate track (on the appropriate album, if applicable). (In the case of mismatched files, I have to drag those from the wrongly suggested album to the correct album.)
[Update: From reading the Music Brainz Picard documentation, it seems I can drag all of my unmatched files and drop them on the identified album, and Music Brainz Picard will attempt to sort them out.]
Note: If I click Save above, Music Brainz Picard will only add tag information for two tracks in the folder. I have to do some dragging and dropping:

Now I have matched all the tracks, I can click Save.

The correct tags have been appended to my files. (To change the file names to something more meaningful, select Options>Rename Files.)
In the event that acoustic fingerprinting can't suggest an album match, enter album, artist or track details and click the search icon. This will open a web page in your default browser. Check the suggested hits and click the green Tagger button to return details to Music Brainz Picard.

* To change file names to match tag information, select a folder and use the Lookup button to match tag information against Music Brainz Picard's database, select Options>Rename Files and save.)
Update: More example screen shots in this post.

Monday, August 23, 2010

Split Flac audio file

I recently downloaded some rips of audio CD's. In each CD folder, I found one huge .flac file and a .cue file. Professor Google told me that Flac is a lossless audio codec, and that I could split the .flac file into individual tracks using a command-line tool and the .cue file.
I installed flac, shntool and cuetools from the Debian repository and ran the following command:
shntool split -f *.cue -o flac *.flac
This splits the one big flac file, whatever its name, into separate flac files, according to the information in the .cue file, whatever its name. (It is of course possible to specify the file names if there's more than one in the directory.)
I didn't have any luck trying to change the output format to MP3, or trying to add file tags using the .cue file, and simply used Sound Converter instead.
Users of Ubuntu and Debian Unstable can get this good looking GUI application to split audio files. It's called gCue2tracks. The screenshot I found here.

Update: If you experience the following error message, see this post:
shntool [split]: error: m:ss.ff format can only be used with CD-quality files