Thursday, December 9, 2010

Group open windows in Gnome panel

I've been using Linux for four years, all that time the thought has been at the back of my mind that the bottom panel gets a bit full when I have multiple open windows. Something made me remember today that Windows used to group open windows when the taskbar was getting full. I quick Google search and I found that this is also possible in Gnome, although it's not the default. It's even possible to specify that windows are always grouped.
Simply right-click the little vertical "grip" bar to the left of the window list, and select preferences, as described here.

Thursday, November 25, 2010

HP Deskjet 3050 j610 on Debian Squeeze

HP Deskjet all-in-one printers are selling for silly prices at the moment. I recently saw a Deskjet 2050 j510 printer/scanner in PCWorld for £40 and was tempted. Then I saw the same printer in Asda for £35 and was even more tempted. Then I saw a HP Deskjet 3050 j610 wireless printer/scanner in PCWorld for £34 and almost couldn't resist- I just thought I should check compatibility with Linux.
The 2050 j510 will print with the version of HPLIP (Hewlett-Packard's Linux Imaging and Printing software) that comes with squeeze, but it won't scan (without a hack), whist the 3050 j610 will print and scan but requires the manual installation of the latest version of HPLIP from HP.
I ummed and arred for a bit. Then I checked the PCWorld web site and all the 3050 j610's had gone- Comet still had some at the same price. The next morning I needed to do a scan, so that clinched it- I went back to the Comet web site, reserved the printer, and was given a further discount, bringing the price down to £30.90.
That's a silly price because a basic HP printer is £40- no scanner, no wireless. (And also because I remember the first printer I bought- a nine pin dot matrix printer back in 1989, which coast me £220. I could seven 3050 j610's for that!)
Now the hairy part- could I get it to work?
I ran the installation wizard from the HP website, which has easy-to-follow instructions. I encountered a couple of dependency issues (well, this is a beta version of squeeze) which I thought for a while might be a nightmare to solve, but were in fact relatively simple to get around.
The first unmet dependency was for cupsys-bsd, which is not in the Squeeze repositories, but is in the Lenny repositories. The solution was to add the Lenny repositories to /ect/apt/sourses.list (just copy the Squeeze dependencies and change Squeeze to Lenny), reload Synaptic, install cupsys-bsd, and then remove the Lenny entries.
The second unmet dependency was for cups-image, which isn't in either repository. I was at a loss until I found this post, which solved the issue.
My new printer now prints and scans on Squeeze.

I haven't tried a wireless connection yet- I don't think laptop>printer is going to be supported, but a network connection via my router might be. Not really an issue as the printer with wireless was cheaper than the one without.
These HP all-in-one printers are certainly good value, and them come with full ink cartridges and a USB cable. The only problem for Linux users is that they are only supported by the most recent version of HPLIP, if at all. HP has a page to check if a particular printer is supported here. HP have made installing the latest version of HPLIP on Linux as easy as possible- I am running a beta version of Squeeze, so maybe that explains the issues I experienced. More up-to-date versions of HPLIP should find their way into Debian backports eventually, but if you're after a bargain printer now, a manual install might be the only option.

Update: Couldn't get wireless working. Had the same problem as this person.

Update 2: The printer is now connected over the network. Yipee! See link above for solution.

Update 3: I've just installed Debian Squeeze 6.03 on my laptop, and  didn't have any of the dependency issues mentioned in this post- which was for Squeeze Beta after all.

Update 4 (Feb 2012): HPLIP 3.11.12 does not currently work with Debian 6.0.4, meaning that printing won't work, with a Filter "usr/lib/cups/filter/foomatic-rip-hplip" for printer "*" not available error. If you are trying to install HPLIP via the installation wizard and automatic install mentioned in this post, check to see if the latest version of HPLP supports the latest version of Debian, or use the manual build and install for Debian. More here.

Tuesday, November 23, 2010

Return of the living dead

I've been testing Debian Squeeze beat for a while now, and I'm disappointed to find that a trio of annoying bugs that had appeared in Ubuntu just before I stopped using it are now in Squeeze.
  • Copy and paste occasionally fails to work in Firefox (Iceweasel in Squeeze) web forms.
  • Trying to safely remove USB hard drive results in a "Unable to stop drive" error message.
  • In Movie Player in full screen, the controls disappear when hovered over after the screensaver has been on for a while. (Normal behaviour is obviously for the controls to appear when hovered over.)
These bugs are irritating. They'd be show stoppers if there was any other show in town.


Update: two of these bugs (1&3) are actually the same bug in Compiz. See Return of the Living Dead Part II.

Monday, November 22, 2010

Secure that PC!

I really should change the title of this blog, as the title refers to computer security. Since buying a router and switching to Linux, I really haven't been that interested in the topic- my PC sits behind the router firewall and it's not vulnerable to Windows malware.
But today a couple of web pages caught my eye. The first was this page, a collection of anti-virus tests and and an attempt to collate the results. How useful the exercise is, is moot, but this test caught my eye. Partly because it's a review sponsored by Norton in which Norton comes out top (dubious) but mainly because it tests AV products on Windows XP SP2 with Internet Explorer 6 (even more dubious). That not even SP2 updated, that's SP2 as it was when it came out without any updates- by now as full of security vulnerabilities which can be levered to install malware as Swiss cheese is full of holes.
I would like to have seen the results obtained if the testers had used XP SP3 fully updated with IE8 or an alternative browser. My guess is that the system wouldn't have been infected even without any AV present, but that's not what Norton or any other AV company want you to hear.
Krebs on Security, the second page to catch my eye today, makes the point that it's often the non-Windows applications that are a security threat on Windows PCs:
A study released earlier this year found that the average Windows user has software from 22 vendors on her PC, and needs to install a new security update roughly every five days in order to use these programs safely.
Linux has the advantage here, because the popular Linux distros check most applications the user is likely to install on the computer to see if they are up to date; windows leaves third-party software unchecked- a nightmare until applications like Secunia came along.
(The main point of the article is that vulnerability counts don't mean anything by themselves- a very sensible point.)
The first line of defence on a Windows computer is ensuring that applications are kept up-to-date and secure, and , if necessary, avoiding applications with a poor security record, as Krebs has suggested in the past.
The second is probably ensuring users don't have admin rights, as Krebs has again suggested several times.
An AV is probably a good third line of defence. This is where those comparative tests come in. If the collation above has any merit, Panda, Avira, Avast! and AVG are the best free options.

Thursday, November 18, 2010

No webcam in Meebo with Flash on Squeeze

Meebo is an IM client accessed via a web page. As it's web-based, in theory it's platform-independent- useful for Linux users who want to chat to Windows users over the MSN network, as I described here.
Now I don't do video chat that often, in fact the last time was six months ago when I wrote that post. At that time I got Meebo working with video, but not sound (although I later fixed the sound issue).
Today I was trying to set up a video chat with the same person, and was looking forward to a straight-forward connection over Meebo with sound. But this time sound was working but my webcam just wasn't visible.
To cut a long story short, after a lot of Googling, I found a solution, and later on a reason for the problem.

[Update: the rest of this post is me working out what was going on over a couple of days, and although the solution is there, the post is somewhat confusing, so I'm going to add an update explaining the problem more clearly. This was prompted by seeing the same problem in Skype, finding a solution, and getting a clearer understanding of what's going on.

The solution to the problem is to start Firefox from a command line with the following command:
LD_PRELOAD=/usr/lib/libv4l/ firefox &
The reason for the problem is that Flash doesn't (yet) support the latest webcam interface libraries (V4L2) used by recent versions of Linux (such as Squeeze).

The command above tells Firefox to use the older video libraries (V4L1) when it starts, hence Flash is able to work with those libraries.

At some point an update to Flash will get it working with V4L2- so if your distro gets a Flash update, or you install updates yourself, and you have used this fix, check to see if Flash works without it after the update.

The rest of the post below is retained for reference.]

I'll give the reason first, found on the Ubuntu documentation site:
Old webcam which doesn't work well with V4L2
There seems to be a known problem in Ubuntu Intrepid and Jaunty (at least), due to switching from the video system V4L to the more recent V4L2. Many applications, like webcams, doesn't seem to work well (or at all) with V4L2. But luckily there is a simple workaround to avoid the problem, through installing and loading some libraries with backward-compatibility with V4L, so that Flash sees again your Webcam, as it used to do until Ubuntu Hardy.
[Update: Further research proved that this wasn't the reason my webcam wasn't working- see below for the real reason.]

Hmm, so Debian Squeeze must have switched to V4L2 as well.

I didn't use the fix described on the Ubuntu site, because I'd already found a simpler fix on the Ubuntu forum:
LD_PRELOAD=/usr/lib/libv4l/ firefox &
(In a terminal, substituting 'iceweasel' for 'firefox' in my case.)

Oh well. I guess I'll have to buy a decent webcam- this one came from the sale bin at Asda and cost £3, so no wonder it's crap.

Afterthought: my webcam works fine in Cheese, so this may be a Flash bug too. I came across this today.
Basically, Flash 9 had great webcam support – but lousy sound support. And in Flash 10 they fixed sound support, but broke older webcam support (by adding V4L2, I believe they removed V4L1 support. Or vise versa).
Update: Curiously, in gstreamer-properties, my webcam is set to use V4L2, and the test button shows the webcam produces an image, but V4L1 doesn't work.

Maybe the fault doesn't lie with my webcam but with Flash, as suggested above?

Update 2: Yep, it seems V4L2 support in Flash is poor. The Flashcam Project is dedicated to getting webcams working with Flash in Linux.
Flash 10 and updates have been in the wild for a long time now. Frankly the V4L2 support is still poor and there is still some job to do on this project to make webcams work with it.
But Adobe are working on it:
Flash 10 (aka Astro) Beta 2 is out and is supposed to support V4L2. At last! I guess Flashcam won't be useful for long on the desktop.
In the meantime, try the solution above that worked for me, or give the flashcam utility from the Flashcam Project a try.

Sunday, November 14, 2010

Debian Squeeze beta- a first look

OK, this is still a beta, so any nits found here may be fixed before release, but these are my first impressions of Debian Squeeze Beta.

The good:
  • Squeeze can use my graphics card, and I could install Compiz. I had to install some kernel firmware first, but after that there were no problems.
  • Squeeze can play my media files- in Lenny I had to install GStreamer plugins and MPlayer from before I could play some files. The movie player in Squeeze can fast forward in video files and switch to different points in the file with ease, where the player in Lenny couldn't.
  • I now have the Extra Pane option in Nautilus- no more opening two windows to try and move files around.
  • Iceweasel and Icedove (Debian's rebrandings of Firefox and Thunderbird) are recent enough for me not to miss the originals, and my extensions work.
  • Squeeze comes with Gnash installed. It seemed to play Flash videos well in Iceweasl, it sent my CPU wild, so I uninstalled it and installed Adobe Flash- now in the repositories, so no more messing about with backports to watch Youtube.
The bad:
  • There's nothing to tell new users that they need to install firmware to support graphics cards. After the installation, my laptop fan was blowing hard. Installing the firmware fixed this, but I wouldn't have known about it if I hadn't been on the case already.
  • Network Manager reports I have no network connection, and says for my wired connection "device not managed". Some applications can access the internet (Iceweasel), other's can't (Evolution). (See below for fix.)
  • Logging into a second user account, and then logging back into my account without logging out of the second user means I get logged out again after a few seconds. Disappointing- Lenny was rock solid on switching between users.
  • It's not possible (yet?) to enable a sound theme in Squeeze. Maybe not important for some.
Overall impression: Good. There's far less messing around required to get things working than was the case with Lenny. Applications are up to date and work as expected. With any luck the bugs I noticed will get fixed before release.

A fix for the Device not supported "bug".

Edit nm-system-settings.conf as described here.

(I asked myself why "managed" was set to "false" and found this. Now I don't have any understanding of network connections, but it looks like this is a feature not a bug for the moment and the final release will contain a work-around for the issue.)

Third time lucky

Following my recent abortive attempt to update Debian Lenny to Squeeze, I've increasingly impatient to try out Squeeze. A couple of days ago I decided to go for a fresh install, something I'd been reluctant to try, because my CD drive is failing.
The first attempt at installation stalled. I tried cleaning the CD drive lens with a cotton bud and some cleaning alcohol.
The second attempt stalled in the same place. I was about to give up and resign myself to having no computer for a while until I could take this laptop to the repair shop. Then I remembered what had saved me the previous time- the baby nose pump. Fortunately, it was still around, and our baby is a toddler now and doesn't use it, so it was snotty but dry.
A few blasts with the nose pump and the installation went through smoothly!
More posts to follow on Debian Squeeze beta.

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 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="">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 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

Saturday, August 21, 2010

Debian swirl in Gnome

The Debian desktop is pretty much Gnome with some Debian wallpaper. The default Main Menu icon is the Gnome foot.
To replace the Gnome foot with the Debian Swirl, replace the start-here.svg or start-here.png image with an appropriate Debian Swirl image. (Other Gnome foot icons in the directory are just shortcuts to those images and will change automatically.)
Then update the icon cache:
# gtk-update-icon-cache -f '/usr/share/icons/'
For a user-installed theme, the location and the image filename will be different:
/home/user/.icons/icon theme/scalable/places
/home/user/.icons/icon theme/32x32/places
/home/user/.icons/icon theme/24x24/places
/home/user/.icons/icon theme/22x22/places
/home/user/.icons/icon theme/16x16/places
A similar icon cache update will be required:
$ gtk-update-icon-cache -f '/home//.icons/'
Or simply delete the icon-theme.cache file from the icon theme directory and it will be rebuilt with the new icon.

Credit goes here and here.

Update : Edited the gtk-update-icon-cache commands following these instructions.

Saturday, August 14, 2010

Upgrade kernel from backports in Debian Stable

Debian Stable (currently Lenny) is, as the version name implies, stable. If there are any annoying bugs, I haven't come across any, and I haven't experienced any crashes or lock-ups in the OS itself. Some of the packages in Stable are, however, rather long in the tooth- they haven't been updated for a couple of years or more.
Recently I've been using Debian backports to update versions of some applications- Pidgin, Transmission, Open Office. I'd come across a few recommendations to upgrade the kernel, but had trouble finding a simple guide to doing so. There are hundreds of kernel entries in the list of software packages in Debian Lenny: which one to choose? The best guide I found was this one.
For an example one package I recommend updating on a desktop system is the Linux kernel. Debian ships Linux kernels that are geared towards server use by default. This is fine if you are running Debian on a server, and if you are, I strongly suggest you stick with the default kernel. However, there are other kernels available that are optimised for desktop use...
The guide goes on to recommend a couple of kernel packages that are not in the current list of packages- so I guess they've been updated. I went ahead and installed linux-image-2.6.32-bpo.5-686, Linux 2.6.32 for modern PCs.
This seems to be the kernel for duel-core processors. There are many different kernels for different computer architectures. I'm guessing "bpo.5" stands for backport (something) 5- but if any reader knows better, or of a guide to choosing the best kernel for a particular computer, please leave a comment.
UPDATE: A comment informs "bpo.5" stands for

Sunday, August 1, 2010

Gnome 3 mockups

[Update, June 2011: for some reason this page has been getting a lot of hits recently. Gnome 3 has been released, people. If you want screenshots, visit the Gnome 3 site for screenshots of the finished product.]
I found some screenshots of the new Gnome 3 mockup on the Debian forum. (The Gnome 3 release has apparently been delayed to accommodate the changes.)
I'm looking forward to using Gnome 3. The present desktop model in Gnome dates back to 1995. Time for a change. I've used the Gnome 3 shell in Ubuntu and (briefly) in Fedora and liked it. In both distros it caused computer lock-ups, but I'm pretty sure these were due to using it with Compiz running at the same time. Now I'm running Debian Stable, where the Gnome shell is not available. If Gnome 3 comes out in March, I guess it will miss the next release of Debian Stable too (due around the end of the year). Sigh.