Pinterest Stumbleupon Whatsapp
Advertisement

One amazing thing about Linux desktops It's Your Choice: The Top 10 Linux Desktop Environments It's Your Choice: The Top 10 Linux Desktop Environments From Gnome to KDE, from MATE to Unity, there's a lot of choice out there. Where should you start? Overwhelmed? Start here. Read More is the amount of integration you get. You certainly wouldn’t be able to customize all your applications to have a similar look to them on Windows! Aside from the larger things, this sort of integration has other, less noticeable perks as well.

Specifically, you can control your music in the comfort of your desktop, without even touching your media player — you can even hide it if you want. You’ll also be able to use your media keys (Play, Pause, etc.) to do this.

Talking to Media Players With MPRIS

A lot of Linux applications have the ability to communicate with each other. This is usually done using a special piece of software called D-Bus, which acts as a mediator for many programs. It’s D-Bus which lets Linux desktops integrate with media players in the form of MPRIS.

The Media Player Remote Interfacing Specification (MPRIS) is a subset of D-Bus’s features that’s used for controlling media players. As such, if you want your music 4 Linux Music Players That Deserve Your Attention Now 4 Linux Music Players That Deserve Your Attention Now Which Linux music player is the best? We compare four excellent music players you may not know about. Read More or video player to integrate with your desktop, you’ll need one that supports it. Most of them will already do so, but some may need some extra tweaking to enable them.

As a thumb rule, it’s the video players 5 Amazing Linux Video Players for Watching Movies and Shows 5 Amazing Linux Video Players for Watching Movies and Shows There are dozens of Linux video players to choose from, so which one should you use? Which one is right for you? Variety is great, but who has the time to sift through it all? Read More which need adjusting (VLC is an exception to this). An example of this is GNOME Videos. You’ll need to enable MPRIS support by checking the Edit > Preferences > Plugins > MPRIS D-Bus Interface option.

Actually controlling these media players using MPRIS from the desktop however, requires a separate application. This process differs between desktop environments, but in general, they’re always part of the desktop itself.

Advertisement

Integration With Plasma, Unity, and Cinnamon

For many desktop environments, integration comes out of the box. As long as you have a media player that supports MPRIS, you won’t have to do much else. The three desktops above have excellent controllers, and don’t require setting up.

Plasma

The MPRIS controller in the Plasma desktop The Current State Of the New Linux Desktop Environment, Plasma 5 The Current State Of the New Linux Desktop Environment, Plasma 5 After years of polishing the 4.x series, KDE is once again leading the innovation race among Linux desktop environments with its latest product: Plasma 5. Read More is hidden in your system tray. Whenever you start up a media player, it’ll appear. From there, you can stop, start, and change your playback when you click on the controller. In addition to this, you can even keep the menu permanently up by clicking on the pin icon in the corner, useful as a miniature player.

VLC player in Plasma desktop

If you want to disable this feature, you can do this in System Tray Settings > Media Player. Keep in mind that without this, your media keys won’t work!

System tray settings in Plasma

Unity

MPRIS integration is a little more advanced in Unity Unity - A Modern Lightweight Desktop For Ubuntu [Linux] Unity - A Modern Lightweight Desktop For Ubuntu [Linux] Read More , built into the sound applet. Once you’ve launched an audio or video player, it’ll show up as an entry in your volume menu. This provides an alternate way of starting them up.

Unity VLC media player settings

If the sound menu is controlling a video player such as VLC, you’ll have less options to control it: play, pause, back, and forward. Audio players on the other hand, are a bit more malleable, as seen below.

Unity VLC media player settings

This design makes sense. Video players are a visual experience, so controlling them from the desktop without looking at the content ruins their purpose. MPRIS has the additional benefit of making media keys, such as the ones on Macbooks, work across all players. You could use them as a convenient alternative.

Cinnamon

Like Unity, the Cinnamon desktop Spice Up Your Cinnamon Themes – It's Easy! Spice Up Your Cinnamon Themes – It's Easy! Ever wanted to customize your Linux desktop, but just couldn't find that one perfect theme? If Cinnamon is your current desktop environment, creating your own theme is easy to learn. Read More has its MPRIS support built directly into its sound applet. Similarly, you also get the ability to open up the media player of your choice from the desktop’s volume menu.

Cinnamon VLC media player settings

There are a few (mainly cosmetic) differences however. If you enjoy larger album art 7 Websites To Search For The Perfect Album Cover Art 7 Websites To Search For The Perfect Album Cover Art Read More , you might like the way Cinnamon goes about presenting your music as compared to Unity. The applet menu also provides you with a way of shutting down your media player — this is more of a feature for dedicated music players. In general, music players minimize themselves when they’re closed, so this provides you with a surefire way of killing them.

Cinnamon VLC media player settings

Advanced Integration in GNOME

Currently, the GNOME desktop GNOME Explained: A Look at One of Linux's Most Popular Desktops GNOME Explained: A Look at One of Linux's Most Popular Desktops You're interested in Linux, and you've come across "GNOME", an acronym for GNU Network Object Model Environment. GNOME is one of the most popular open source interfaces, but what does that mean? Read More  has only basic MPRIS integration: media key control. To get something more advanced than this, you’ll need to download a GNOME shell extension called Media player indicator. You can install it by following this link.

Make sure to open it with Firefox or GNOME’s default web browser! This will let you install the extension through the webpage (in the form of a large ON/OFF button). If you’re using Firefox, remember to enable the Gnome Shell Integration plugin!

Gnome Shell Integration warning

After you’ve installed this extension, it’ll appear in your system menu once you’ve opened up a MPRIS compatible media player. Like the Plasma desktop widget, you can control playback from it.

Make Your Linux Music Experience Seamless With These Tools GNOME Media Player

With the GNOME Tweak Tool Configure Your Gnome 3 Desktop With Gnome Tweak Tool Configure Your Gnome 3 Desktop With Gnome Tweak Tool There aren't exactly a bazillion different customization options for just about anything, as GNOME 3/Shell is still relatively new. If you're one of those people who can't stand GNOME 3 as long as you cannot... Read More installed, you can also customize the extension’s behaviour. For example, there’s an option to adjust media player volume levels. You can even make the extension persistent, so it’ll stay in your system menu even without a MPRIS compatible player open.

Make Your Linux Music Experience Seamless With These Tools GNOME Integration Settings

Using MPRIS With XFCE

Being a lightweight desktop The Best Lean Linux Desktop Environment: LXDE Vs Xfce Vs MATE The Best Lean Linux Desktop Environment: LXDE Vs Xfce Vs MATE On a fresh Linux installation, there's not much you can do to speed things up, other than look at your choice of desktop environment. Here we look at three options: LXDE, Xfce, and MATE. Read More , you need to install a media player controller for XFCE to make it work. This comes in the form of an XFCE panel plugin called xfce4-soundmenu-plugin. To get it, you’ll need to add a PPA repository from the Xubuntu team, containing the program. Enter these commands to do so:

sudo add-apt-repository ppa:xubuntu-dev/extras
sudo apt-get update
sudo apt-get install xfce4-soundmenu-plugin

In future, you may not even need to do this. The programs in them may be integrated into Ubuntu’s repository.

Adding the Plugin

Even after installing the plugin, you still need to add it to one of XFCE’s panels. To do this, open up the Panel Preferences window, by entering this line into your terminal:

xfce4-panel -p

Make Your Linux Music Experience Seamless With These Tools XFCE Panel Preferences

Having done this, go to the Items tab, and click on the Plus sign. You’ll be greeted with a list of plugins you can add to your panel. If you scroll down near the bottom, you’ll find an entry called Sound menu Plugin. Once you select it, press the Add button, and it’ll appear in one of your panels.

Make Your Linux Music Experience Seamless With These Tools XFCE Add Integration

Configuring the Plugin

To make the controller work, you need to tweak it a little first. Right click on the plugin and select the Properties dialogue. This will open up a configuration window.

Make Your Linux Music Experience Seamless With These Tools XFCE Configure Integration

You need to tell XFCE’s XFCE: Your Lightweight, Speedy, Fully-Fledged Linux Desktop XFCE: Your Lightweight, Speedy, Fully-Fledged Linux Desktop As far as Linux goes, customization is king. Not only that, but the customization options are so great it might make your head spin. I have previously mentioned the differences between the major desktop environments... Read More sound menu what you want it to control. If you don’t do this, it won’t work! Firstly, open up your media player of choice. After this, click on the refresh button in the Player text box. This automatically searches for opened media players.

Make Your Linux Music Experience Seamless With These Tools XFCE Integration Functional

One thing you might like about this setup is that you can move the controller around, unlike other desktop environments. There’s a lot you can customize the plugin to do as well. For example, I placed the plugin in a new (widened) side panel, and let it display album art.

Another useful thing I found was that the speaker icon was not for show: I could control the volume from it by scrolling up and down over it.

Other Desktops?

If you’re using an extremely lightweight desktop setup, such as Openbox Need A Fresh Desktop Environment for Linux? Try Openbox Or xmonad Need A Fresh Desktop Environment for Linux? Try Openbox Or xmonad Read More , your integration will be limited to your media player keys (like GNOME without the extra plugin). This can also act as an alternative for people who don’t want advanced integration features. Unfortunately, this is not an option for desktops that tightly integrate their controllers, such as Unity and Cinnamon.

To achieve this, you’ll need a command line tool called Playerctl. For Ubuntu/Mint users, you can download the DEB file/program from here. Installation should be easy as double clicking on the download.

Make Your Linux Music Experience Seamless With These Tools Playerctl Download

This tool will try to automatically control any media player that supports MPRIS using terminal commands. All commands are preceded with the word playerctl, followed by a command, like so:

playerctl pause|play|play-pause|next|previous

If you want to use the program for more, enter in playerctl –help to see what else it can do.

Make Your Linux Music Experience Seamless With These Tools Playerctl Help

However, this isn’t an ideal way to control a media player. Instead, you create keyboard shortcuts that execute these actions, as seen below.

Make Your Linux Music Experience Seamless With These Tools Playerctl Mapping

For very lightweight desktops, you might have to manually enter in which shortcuts Save Time with 20 Linux Keyboard Shortcuts GNOME, KDE, & Unity Save Time with 20 Linux Keyboard Shortcuts GNOME, KDE, & Unity You know about Windows keyboard shortcuts, but having just migrated, you're wondering "what about Linux?" Well, try these 20 awesome shortcuts for three of the most popular Linux desktop environments: GNOME, KDE, and Unity. Read More you’d like to use. For such systems, here some keyboard symbols you might need:

  • XF86AudioPlay
  • XF86AudioPause
  • XF86AudioNext
  • XF86AudioPrev

These symbols match to commands that playerctl has. Most desktops will just let you press your media keys to map them to a command — quick and simple.

Enjoy Seamless Control!

While it may not be one of the most flashy parts of the desktop, integration with a media player makes the whole experience that much better. Yes, it might not be needed, but put together with many other things, it shows just how amazing Linux can be.

What features do you love about your Linux desktop?

Image Credit: natrot via Shutterstock.com

Leave a Reply

Your email address will not be published. Required fields are marked *