Introduction: Play Music on Raspberry Pi Using XMMS2

About: Systems Administrator and Software Programmer.

Introduction

I installed and trialled the following music/media players in my Raspberry Pi:

rhythymbox - Crashed every time I clicked on a song

audacious - Did not respond every time I clicked on a song

mplayer - Worked as expected

clementine - Did not respond every time I clicked on a song

xmms2 - Worked as expected

Of the 2 music player that worked on my Raspberry Pi, I chose xmms2 to be the music player of my Raspberry Pi because it has Linux Infrared Remote Control (LIRC) support that is easily implemented.

The following package are involved in distributing XMMS2:

  • xmms2-core
  • xmms2-client-cli

Scope

This instructable will show how to:

  1. Install XMMS2 player and its command line interface (CLI) client.
  2. Add songs to the default playlist using its CLI client.
  3. Play the songs using its CLI client.

Step 1: Install the Xmms2

Open terminal emulator in Raspberry Pi

$sudo apt-get update
$sudo apt-get install xmms2

Step 2: Add Songs to the Default Playlist

Open terminal emulator in Raspberry Pi

$xmms2 add -f /path/to/mp3/files/*.mp3<br>

Verify that the songs has been added to the playlist

$xmms2 list

Step 3: Play Songs in the Playlist

Open terminal emulator in Raspberry Pi.

Instruct XMMS2 to begin playing

$xmms2 play

Step 4: Auto Start XMMS2 After Every Reboot

Open terminal emulator in Raspberry Pi

Configure X session to auto start XMMS2.

$vi ~/.config/lxsession/LXDE/autostart

Add the entries as shown in the screenshot

Save the file