POSTS
Controlling Roon from your Linux desktop's media keys
I have been experimenting recently with Roon. It is a very good system for playing music, both from your own collection and from Tidal, Qobuz etc.. It also focuses on high quality playback, as if my ears can tell the difference :P One of the fun things that it does is split out the display, player and music source (core), so that you can have multi-zone houses with music streaming everywhere.
The only problem is that there is no official Roon client for Linux. I have an iPad that I can use to control it, but it would be nice if I could also control it from my laptop while I’m working. RoPieee have made a nifty little Wine Wrapper that gets it to run the windows client in a WINE emulator, and this works well, except for one thing. The media keys on my keyboard don’t control it. If somebody walks into the office and I want to pause the music, I can’t just hit the Pause button. I have to ALT-TAB to the roon window, then press space. Annoying.
Roon provides a node.js based API which will do what I want, so I spent some time today looking into how Ubuntu controls its various media players when you press the media keys. It turns out that it uses a d-bus based communication mechanism called MPRIS. There was also a handy node module for that, so I wrote a quick script to plug them together. Hey presto! Now I see what is playing in the Ubuntu taskbar, and the media keys will control the player of my chosen zone.
I’ve released the code on Github. Its pretty basic, but I’ll improve it as I go. LMK if you have questions.
If you decide to sign up to Roon, They will give bonuses for using my Referral Link