Archive for the ‘Software’ Category

MPRIS2 and the Music Player Daemon

17th May 2012

If you tend to want to keep your music running when you log out, or control your music playing on a desktop machine from a laptop, for example, you may well use the Music Player Daemon (MPD).  If you use Ubuntu’s Unity desktop or KDE’s Plasma desktop, you may well wonder how to get the Ubuntu sound menu or Plasma’s Now Playing widget to talk to it.

Both of these use MPRIS2 to communicate with media players.  MPD, however, does not have an MPRIS2 interface.  Even if it did, it would take a bit of work to be able to use it from another computer.  What you need, then, is a “bridge” of some sort to translate.  One such possibility is mpDris2 (which, I hasten to point out, I haven’t tested).

You would run such a bridge on the computer you want to control MPD from, and point it to your MPD instance.  And voilà!  Every MPRIS2 client application that you run can talk to MPD, without knowing anything about the MPD protocol.

If you just want a headless music player on your local machine, though, you can always use Raven, which talks MPRIS2 natively.

New Now Playing Plasmoid, MPRIS2 dataengine

11th May 2012

One thing that will be in KDE Plasma Desktop 4.9 is a new version of the Now Playing widget.  Based on QML, it works much better, especially on panels (where its design is based heavily on my favourite KDE-3-era applet, kirocker).

Now Playing on a panel

In the background, it uses the new mpris2 dataengine.  This exclusively supports MPRIS2-capable media players (which these days is most), and doesn’t include any hacks to support XMMS 1, for example.  JuK and Dragon have both gained MPRIS2 support for the 4.9 release, and Ubuntu’s sound menu uses MPRIS2, which is compelling many other media players to support it.

Now Playing on the desktop

The result is a cleaner, more reliable design, and completely asynchronous behaviour, so it will use less power and (unlike the old nowplaying dataengine) it should never cause your desktop to freeze due to a badly-behaving media player.

Now Playing with the mouse over

The old nowplaying dataengine is still there (and will be until KDE Plasma Desktop 5 is released), but should not be used for new widgets.  Instead, you should use the mpris2 dataengine, and I highly recommend porting any existing widgets to mpris2 as well.

Overall, I’m really pleased with the design of MPRIS2, which allowed me to create the mpris2 dataengine with a minimum of fuss, and allowed for widgets to implement a seek bar without querying the media player once or twice a second to find the current position (and not take the performance/power hit if they didn’t care about the current playback position).

MPRIS now on FreeDesktop.org

11th May 2012

This news is actually a bit old, but I thought I’d make use of my new presence on planet.freedesktop.org to say that the Media Player Remote Interfacing Specification is now using FreeDesktop.org infrastructure, instead of a hodge-podge of other services.

You can view the specifiation, file a bug, view the git repository and participate on the mailing list.

If you’re creating an MPRIS2-capable media player, you may want to make use of the MPRIS tester application (which is actually not hosted on fd.o, but on GitHub).

MPRIS2 Support in NowPlaying

10th November 2011

Do you recall NowPlaying?  The dataengine/widget pair for Plasma that tells you what your media player is currently playing, and allows you to control it?

The Now Playing widget (with an old theme)

Well, now it supports MPRIS2.  What does this mean for you?

Well, probably not much right now.  Juk doesn’t support MPRIS2 (although I intend to change that for 4.9/5.0), Amarok worked before (although it should use marginally less power with MPRIS2 rather than the old MPRIS interface), VLC doesn’t support MPRIS2 (yet; version 1.2 will).  A handful of other players support MPRIS2, though, including the Raven Music Server.

The main thing, though, is that support for MPRIS2 is increasing in media players, partly because of Ubuntu’s adoption of it as the mechanism for its sound menu to talk to media players.  Spotify now supports MPRIS2, for example.  And now the Now Playing widget can support them.

MPRIS2 has many advantages over the original MPRIS specification, not least of which is not having to query the media player every second for up-to-date position information.  As a result, the nowplaying dataengine will prefer the MPRIS2 interface to the MPRIS interface for a media player that offers both.

The only quirk to be aware of is that Amarok’s MPRIS2 support isn’t quite right in the 2.4.x series, and this will affect a couple of features of the Now Playing widget (seeking and enabling/disabling of the next/previous buttons); this shouldn’t be an issue though, as these problems are fixed for Amarok 2.5, which will be released before KDE Plasma Workspace 4.8.

Screen locking with the Plasma netbook interface

4th September 2011

If you are using the Plasma desktop on your netbook in “netbook mode”, you may have noticed that screen locking (in all its forms – the Ctrl+Alt+L shortcut, typing “lock” into search-and-run, and automatic locking when suspending to RAM or when the screensaver starts) no longer works.  This is because KRunner doesn’t run in this case, and KRunner is (somewhat bizarrely) responsible for activating the screen locker.

The proper solution to this (and the one that should be implemented for 4.8, hopefully) is to get KWin to manage screen locking.  After all, it knows best when it comes to managing the screen.  But, until then, you can use the quick hack I came up with: putting screen locking into a kded module.

This works quite nicely with existing installations, as you can just compile and install the KDED module and be on your way.  One caveat: KRunner will retain the shortcut.  Once you’ve started the module for the first time (either from the Service Manager kcm or by logging out and in again), you will need to go to the Global Keyboard Shortcuts kcm and set Lock Session shortcut for KDE Dæmon.

Run the following commands to do this (you’ll need cmake and automoc, as well as development packages for Xorg and kdelibs):

git clone git://anongit.kde.org/scratch/alexmerry/kscreenlockmgr
mkdir kscreenlockmgr.build
cd kscreenlockmgr.build
cmake ../kscreenlockmgr -DCMAKE_INSTALL_PREFIX=$(kde4-config --prefix)
make
sudo make install

Or, if you’re on ArchLinux, just grab kscreenlockmgr-git from AUR.

Desktop Summit Discussion List

8th June 2011

I’ve been looking for people to share accommodation with at the upcoming Desktop Summit (comment on this post if you’re in the same position!), and was pointed towards the ds-discuss list, which I wasn’t aware of (and apparently has no posts in its archive).  So I thought I’d spread the word.

It appears that if you’ve registered for the desktop summit, you should already be on the ds-announce list, but you have to manually sign up for the ds-discuss list.  Don’t forget the #desktopsummit IRC channel as well.

I'm going to the Desktop Summit 2011

Busy Day

1st April 2011

Today is clearly a busy day in the world of technology.  Several major projects have been unveiled, including:

Know about any other exciting new developments announced this morning?  Post in the comments!

(Also of interest: invisibility cloak stolen from lab).

The Ada Initiative

17th February 2011

LWN has an interesting article on a new startup: The Ada Initiative (“Supporting women in open technology and culture”), and about how it is taking a different approach to similar initiatives.

The link above is to an article on the LWN that is subscriber-only for the next week.  Being a subscriber, I can provide a link that you can use – if you are interested in what’s happening in Linux, and FOSS in general, I highly recommend subscribing.

There is also other press coverage.

Also, I would suggest that the founders do Ada Lovelace a disservice in calling her “the world’s first woman open source programmer” – she is arguably the world’s first programmer, full stop.

Harassment at FOSS Conferences

10th December 2010

I recommend you go and read Valerie Aurora’s article on harassment at FOSS conferences on LWN.net.  It’s grim stuff, but also a positive piece – looking at how to improve things.

I’d like to think that this sort of thing doesn’t happen at KDE events, but I guess everyone like to think well of their own community.  And I don’t mean that I’d like to think no harassment happens at an event as large as Akademy, say – I’m not that naïve.  But I would like to think that KDE’s atmosphere is one that welcomes everyone, not just men, and doesn’t tolerate such behaviour.

Is this really the case, though?  I don’t think that I’m in a position to answer that, being a man and not having attended many KDE events.  It’s not something I’ve ever experienced or come across, but there’s no reason I should have.  The antipathetic response to Stallman’s “EMACS virgins” quip at GCDS 2009 didn’t really inspire me with confidence on this front, however.  There was outrage, sure, but it certainly wasn’t universal.

What is clear is that the wider software industry and community has issues attracting and retaining women.  While this is a larger problem that we can’t solve on our own, what we can do is make sure that everyone is welcome in our FOSS communities, providing they are willing to get involved, and that we don’t make anyone feel uncomfortable.

So I’m asking some questions: what do we need to do to make this a reality, at least within KDE?  How far away from this are we?  Where do we need to focus our efforts?  I’d be especially interested in hearing from women in KDE on this, as you will have first hand experience of the issues.

DeviceKit: How to Replace HAL

16th November 2010

Following on from my last blog post, I’m trying to assemble information about what, exactly, is supposed to replace HAL on the FDO DeviceKit page.  If you know anything, please add it!


Follow

Get every new post delivered to your Inbox.