Introduction: Play Music on Raspberry Pi Using XMMS2

Picture of Play Music on Raspberry Pi Using XMMS2

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

Picture of 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

Comments

About This Instructable

4,933views

3favorites

Bio: Systems Administrator and Software Programmer.
More by mirza irwan osman:Install Modem USB Device in Raspberry PiMake the Volume Knob of Sound Blaster X-Fi Surround 5.1 Pro Sound Card Work in Raspberry PiCreate a Volume Control for USB Sound Card in Raspberry Pi
Add instructable to: