Configuring Clementine with LIRC

Amarok 1.4 from the KDE 3 days was installed in the original living room home theater PC built around 2009. As KDE 3 faded from active development that was replaced by the Trinity Desktop version.

The media system is treated as an appliance. Unlike other Linux computers in the home, keeping the system updated with the so-called “latest and greatest” software is not important. The system is not used to connect to the web. Thus Amarok remained on the system for many years.

Amarok 1.4 was one of the best music players. I was dismayed with the development efforts for Amarok 2.x. The developers thought they could rebuild a better wheel and mouse trap. They forgot that not being broken means do not fix.

One of the useful features with the old Amarok was the dcop support, which lent well toward using a remote control to manage the software. A simple but important feature in a living room media player.

As the years passed the ability to recompile Amarok stopped working. Thanks to development concepts such as rapid release and a developer attitude of not giving a hoot about backwards compatibility (update to the bleeding edge or get out of the way dumb user), eventually the build chain failed.

While Amarok continued to function without recompiling, sometimes the software caused the desktop environment to freeze hard. I never found the root cause.

An obvious replacement is Clementine, which is modeled after the original Amarok 1.4.

Modeled after does not mean exactly the same. For some time I wanted to move to Clementine, but there was no dcop support. The dcop interface was a KDE 3 feature. Clementine is not KDE software.

Time away from a problem has a unique way of finding solutions. Along with my recent effort to replace the living room media player remote control, I paused to look into whether I could migrate to Clementine and use the new remote control.

Turns out Clementine supports a handful of keyboard shortcuts. The proverbial light bulb in my head began to glow.

I was on my way. I created a new LIRC config file and a shell script wrapper to launch Clementine. Pretty much the same way I configured Amarok. Using the irxevent command I mapped remote control buttons to keyboard shortcuts.

Clementine supports some command line options. For example, controlling volume. Using the irexec command I configured those commands in the LIRC configuration.

The basic design of the living room media player is only one media tool is in use at one time. Thus there are no conflicts with the multiple LIRC configuration files and shell script wrappers I have created.

I tinkered a bit with xdotool, but that did not go well. In the end I decided the tool was not needed anyway.

While much of Clementine can be controlled with a remote control, selecting a new play list was a challenge. The only method I found is mapping the Tab key to a remote control button. The button must be pressed several times to move the Clementine cursor into the play list pane and repeated to return the cursor to the play list pane. Clunky but doable.

To select a different play list I can connect a mouse or VNC into the desktop, but the idea is to use a remote control.

The media player no longer freezes when playing tunes. I am pleased with the results. Too bad the original Amarok is now little more than a footnote in history.

Posted: Category: Usability Tagged: General

Next: CentOS and Apt-Cacher-NG

Previous: New Media Player Remote Control