Giocoso on [K]ubuntu

Back in April of this year, as I mentioned previously, I bought myself a new Minisforum UM250 small-form-factor PC. The experiment with using it with Arch and/or Manjaro proved less than successful -so I reverted back to my vintage 2012 PC and retired the UM250 back to its box, in which it has sat ever since, on one of the bookshelves in my study.

Around June of this year (I think), I happened to be laid up in bed (after one of my Covid-19 vaccine shots) and was thus using an old laptop for browsing the web. It was a 2016-vintage Dell of some bog-standard sort. But way-back-when, I had installed multiple operating systems on it, so I could boot into Windows 10, Ubuntu 18.x and Manjaro as and when I chose… and I happened to notice that the laptop’s fan noise was considerably worse when booted into Manjaro than it was if I booted into Ubuntu. I can’t remember if it was any worse or better in Windows, but it struck me at the time that in the presence of laptop-style hardware, Ubuntu seemed to have a better lid on thermal management than Manjaro did. I don’t know if that’s actually true or not -or, if it is, why that might be. But if made me think that if I had conducted my earlier Minisforum experiment with Ubuntu (or one of its derivative flavours) rather than with Arch or Manjaro, maybe it would have run more quietly too, and thus the outcome might have been happier all round.

This week, I put that chance observation-and-speculative-guess to the test. I wheeled out the Minisforum once more and installed Kubuntu 20.04 on it. Kubuntu, because I can’t stand the Gnome desktop, but find the KDE one more than acceptable; Version 20.04 because it’s a Long-Term Edition of that distro (meaning it’s supported until 2024 at least).

The first thing I noticed was that it was considerably quieter in operation than I remembered it being on my initial installations with Arch and Manjaro. The second thing I noticed was that it was a hell of a lot more stable: my earlier blog post reported strange graphical glitches and lock-ups at ever-increasing frequencies, for example… but the Minisforum has been running Kubuntu for 4 days now and hasn’t glitched or locked up once. So, on this occasion, the Minisforum seems to be a success and it’s something I’m planning on transitioning to as my full-time desktop PC in the next couple of days. It’s already doing most of the heavy lifting in that regard, anyway.

All the software packages I’ve used on the old PC have been readily available for the new Kubuntu distro, so I’ve not lacked anything there, either. But one little quirk popped up that annoyed me for a while: Giocoso had weird trouble displaying the name of the piece of music it was playing underneath the album art displayed for that piece. Here is an example:

That blank red rectangle underneath the album art picture itself is supposed to be displaying text that reveals the actual name of the composition being played… but clearly, it isn’t. I couldn’t think what was going wrong, really, because the exact same code worked perfectly on my Manjaro-running old PC. Even on Kubuntu, though, Giocoso wasn’t having any problem persuading the ImageMagick program to display the album art itself.

Well, I couldn’t think of a rational explanation for this behaviour, so I had to add some debug code into Giocoso to see what was going on at the point it was creating that red rectangle plus album name text… and I was thus able to spot the program encountering this error:

…and in case you can’t read the error text from that screenshot too clearly, here it is in plain-vanilla text form:

convert-im6.q16: attempt to perform an operation not allowed by the security policy '...caption.txt' @ etc. etc. etc

So the ‘convert’ program (which is part of ImageMagick) is trying to do something with ‘caption.txt’ and being prevented from doing it by some sort of security policy or other. That certainly sounds like the root cause of my album title display problem -since the ALBUM tag data is first exported to a text file called .caption.txt, and from there is piped to ImageMagick to turn into a graphical rectangle.

So, I had to do a DuckDuckGo search for that error message, and the first result it found was this page of helpful advice. That confirmed something I’d sort-of guessed at: you see, I’ve encountered this sort of ‘security policy prohibition on useful things’ before (on Manjaro, even) when attempting to convert a bunch of JPGs into a PDF -and that’s precisely what that linked site is describing. Having dealt with this myself before, I should probably have already known the solution, but alas my memory is not that infallible! Fortunately, that search-result article points out that it merely involves editing the contents of the /etc/imagemagic-6/policy.xml file.

Well… that’s almost the answer! Unfortunately, on a fresh install of Ubuntu 20.04 (or its Kubuntu cousin), the actual folder involved is called /etc/ImageMagick-6 …the extra capital letters are rather important for the business of successfully navigating your file system to reach the right place! Also note that a version 7 of ImageMagick has been out for quite some time, so the correct folder might have a “-7” at the end of its name rather than a “-6” if you’re using a more up-to-date version.

Anyway, once the right folder had been found, and the right file (which is called policy.xml) has been opened in a text editor using sudo privileges (because you need root privileges to save modifications in the /etc folder), you’ll see this set of lines:

 <!-- disable ghostscript format types --> 
 <policy domain="coder" rights="none" pattern="PS" /> 
 <policy domain="coder" rights="none" pattern="PS2" /> 
 <policy domain="coder" rights="none" pattern="PS3" /> 
 <policy domain="coder" rights="none" pattern="EPS" /> 
 <policy domain="coder" rights="none" pattern="PDF" /> 
 <policy
Continue Reading

Worst Transition Ever!

This website is brought to you from a server in my loft. It’s been that way for over a year now, I think. That is only possible, of course, because my Internet Service Provider provides a reasonably-fast, robust connection with a static IP address. For the past 18 months, Vodafone has provided such a service, for around £24 a month, using Fibre-to-the-Cabinet technology. That means that whilst Vodafone provides fibre connections to a green box/cabinet half-way up my street, the ‘last

Continue Reading

A Musical Guessing Game?

I don’t know about you, but if I tune into the radio randomly as a piece of classical music is playing, I then like to test myself and see if I can guess the composer of the piece before the announcer returns to give away the crucial information. I’ll maybe even try guessing the name of the piece, if I’m feeling particularly confident. Once or twice, I’ve even gone for a guess as to who the conductor or soloist might be: those ones usually don’t

Continue Reading

Giocoso Bug-fix for Dual Screen Setups

Another small bug-fix, this time to Giocoso.

It was occasioned by my switching away from using a 4K TV as my monitor and replacing it with two 1920×1200 monitors in a dual-screen setup. Since I had never used a dual screen display before, I had not realised that when Giocoso is asked to display album art as a new recording plays, it would break when confronted with the decision as to which monitor it would display the art on!

The fix is now in place. It brings Giocoso

Continue Reading

Another Giocoso Update

Just when I thought I’d got away with not having to do lots of updates to Giocoso, I found another bug in the Stats report. This time, it’s a really silly one, based on a flawed piece of selection logic in the program’s code.

The short version is: the Stats report was computing the number of things that have yet to be played by looking for composition names known to exist, but which haven’t yet been recorded as played. That *almost* works (because

Continue Reading

Giocoso – First Update

Somewhat annoyingly, I just discovered an error in Giocoso’s ––stats reporting function. It’s not a particularly terrible one: more a question of labelling the various numbers.

The stats report shows how many recordings you’ve got that last for various ‘time bands’ (i.e., 0 to 5 minutes long, 5 to 10 minutes long and so on). One of the bands said ’10 to 30 minutes’… but the actual query  submitted to the Giocoso database

Continue Reading

Giocoso – A New Randomising FLAC Player

Today, I’m announcing the initial release of Giocoso, the randomising FLAC player for Linux, which is a replacement for my old AMP program. Giocoso is built on much the same code-base as AMP, but with quite a few changes. The most significant differences between Giocoso and AMP are, probably:

  • AMP scrobbled by default and had to be told not to; Giocoso does not scrobble by default, and has to be told to do so if it’s required.
  • AMP scrobbling required the installation and running of a separate ‘amp-scrobbler’ script. Giocoso uses no external functionality to scrobble: it’s all built-in to the main program.
  • AMP had acquired a bunch of ‘statistical overrides’ (such as ––levelup, ––xlevelup and ––xxlevelup); those are now gone from Giocoso.
  • AMP could only apply ––minduration and ––maxduration filters after selecting something to play. This could result in a significant pause before stumbling across something randomly selected that happened to have the correct duration. Giocoso now knows the durations of pieces from the get-go, so duration-based selections are done successfully within fractions of a second.
  • AMP only displayed album art; when Giocoso displays album art, it adds a ‘caption’ to it, with its text derived from the ALBUM tag of the music being played: the album art can therefore now visually provide you with all information about what, precisely, is being played.

There are lots of other differences, detailed in Appendix A of Giocoso’s User Manual, which

Continue Reading

AMP Per-Cycle Pause

Today, I’m releasing yet another new version of AMP (version 1.28 if you’re keeping count).

It’s main reason for existence is that it contains a new feature: you have been able to get AMP to do multiple ‘cycles’ of play since the very earliest versions, by setting the ––selections=x run-time parameter. Replace ‘x’ with 2, for example, and AMP will randomly select one piece of music to play,

Continue Reading

Another AMP Release

Just a day or two after the last one, there’s a new AMP release (version 1.27). I am heroically trying to reduce the rate of version releases, I hasten to add! But if I come across a bug that needs fixing, my hands are rather tied to making the fixes available as soon as possible!

Sure enough, whilst this releases introduces a useful new feature, it also fixes a quite significant bug I just encountered.

First, the new feature: if you ever specify ––maxduration=x

Continue Reading

The Loudness Wars…

Just a quick note to report that I’ve just released a couple of software fixes related to the problem of sub-optimal loudness levels in music files ripped from CDs or other sources.

Firstly, MAXV has been bumped to version 1.08, because of the addition of a tiny bux-fix that stops the grep utility sometimes thinking that what it’s being asked for is a binary file rather than a text file.

Continue Reading