How to Show Spotify Music in Pidgin on Ubuntu
To show Spotify music in Pidgin on Ubuntu, install Spotify, confirm it appears as an MPRIS player with playerctl, and then write your current track into your Pidgin status. The dependable way is a short script that reads Spotify with playerctl and sets the status through Pidgin's D-Bus interface, because the older Pidgin now-playing plugins do not list Spotify. This guide covers each step and the related chat topics.
Spotify does not talk to Pidgin directly, so showing your current track means connecting three pieces: the Spotify app, a way to read what it is playing, and a way to write that text into a Pidgin status message. This guide walks through all three on Ubuntu and then points to the related guides on showing music in Pidgin, Emesene and recording calls after the Skype shutdown.
How does Spotify show up in Pidgin?
Spotify shows up in Pidgin as plain text in your status message. The Spotify desktop app publishes what it is playing on the D-Bus session bus, and something has to read that and write it into Pidgin.

The standard that makes this possible is MPRIS, the Media Player Remote Interfacing Specification, a D-Bus interface for discovering, querying and controlling media players. An MPRIS player must claim a bus name beginning with org.mpris.MediaPlayer2 and expose the object path /org/mpris/MediaPlayer2. The command-line tool playerctl talks to those players, and its README lists Spotify as a supported player and documents --player=NAME.
Pidgin has a D-Bus interface of its own. Its developer wiki gives a Python example that creates a status, sets its message and activates it. Joining those two pieces with a small script is the approach this guide recommends.
How do you install Spotify on Ubuntu?
You can install Spotify on Ubuntu as a snap, from Spotify’s own apt repository, or from a community Flatpak. All three give you the Linux desktop client. Spotify says plainly that Linux is “a labor of love from our engineers” and “not a platform that we actively support,” and that the experience may differ from the Windows and Mac clients.
Install with snap
Spotify’s Linux page lists this command:
sudo snap install spotify
The Snap Store listing shows the publisher as Spotify, with the latest stable version at 1.2.95.453.g0eeebbed, last updated 12 August 2026, when this guide was written. Your version will be newer or the same.
Install from Spotify’s apt repository
Spotify’s page gives the repository setup for Debian and Ubuntu:
curl -sS https://download.spotify.com/debian/pubkey_5384CE82BA52C83A.asc | sudo gpg --dearmor --yes -o /etc/apt/trusted.gpg.d/spotify.gpg
echo "deb https://repository.spotify.com stable non-free" | sudo tee /etc/apt/sources.list.d/spotify.list
sudo apt-get update && sudo apt-get install spotify-client
Read each line before you run it. The first line downloads a signing key over HTTPS and stores it in /etc/apt/trusted.gpg.d, which trusts that key for every repository. If you prefer to bind the key to this one repository, the post on fixing a PPA GPG error explains the Signed-By approach that Ubuntu now recommends.
Install the Flatpak
A Spotify Flatpak is published on Flathub as com.spotify.Client. Its GitHub README describes it as “community flatpak packaging of official spotify binaries,” so Spotify does not publish it. The README also explains how to set flags in spotify-flags.conf and how to choose between PipeWire and PulseAudio for audio. Spotify’s own Linux page does not mention Flatpak.
If you want Pidgin to read Spotify through D-Bus, the snap or deb install is the simpler path, because a Flatpak sandbox may hide or restrict bus names. Check Flatpak permissions before assuming a sandboxed Spotify and a host Pidgin can see each other.
Which install should you pick?
Use the snap or apt package if you plan to script anything against D-Bus. Use the Flatpak only if you already run your other apps that way and you are ready to adjust permissions. Whichever you choose, test the Spotify features you rely on after installing.
How do you confirm Spotify exposes MPRIS?
Install playerctl, start Spotify, and list the players. Ubuntu lists playerctl 2.4.1-2build2 in universe for 24.04 (2.4.1-1 for 22.04 and 2.4.1-3build1 for 26.04):
sudo apt install playerctl
playerctl --list-all
If spotify appears in the list, Spotify is publishing MPRIS data. Print the current track using playerctl’s --player and metadata --format options:
playerctl --player=spotify metadata --format "{{ artist }} - {{ title }}"
Add --follow to print a new line every time the answer changes. The README says follow mode waits for players to connect and prints a newline when no player can answer. That behavior is what makes a status script simple.
If --list-all prints nothing, start Spotify first and try again. The playerctl README also notes that Spotify may need certain D-Bus environment variables, and that launching the desktop session under dbus-launch can fix the problem when no session manager sets them.
Which version of Pidgin should you install?
Install Pidgin 2.14 from Ubuntu’s archive. Ubuntu 24.04 packages Pidgin 1:2.14.13-1ubuntu2 in universe, and Flathub offers 2.14.14, a release the project announced in January 2025.
sudo apt install pidgin
Pidgin 3 is not ready for this job. The Pidgin forum lists Pidgin 3.0 Alpha 4 (2.98.0) on 30 October 2026, and the 2.x plugin interface used by the older now-playing plugins belongs to the 2.x line. The D-Bus approach below is also described on the 2.x developer wiki.
Add an account in Pidgin before you continue. Any protocol that supports status messages works; XMPP (Jabber) is a common choice.
How do you put your Spotify track into a Pidgin status?
Run a script that follows Spotify with playerctl and sets the Pidgin status each time the track changes. The script uses the status calls from Pidgin’s D-Bus how-to: PurpleSavedstatusNew, PurpleSavedstatusSetMessage and PurpleSavedstatusActivate.

#!/usr/bin/env python3
import subprocess
from pydbus import SessionBus
purple = SessionBus().get("im.pidgin.purple.PurpleService",
"/im/pidgin/purple/PurpleObject")
def set_message(message):
current = purple.PurpleSavedstatusGetType(purple.PurpleSavedstatusGetCurrent())
status = purple.PurpleSavedstatusNew("", current)
purple.PurpleSavedstatusSetMessage(status, message)
purple.PurpleSavedstatusActivate(status)
cmd = ["playerctl", "--player=spotify", "metadata",
"--format", "{{ artist }} - {{ title }}", "--follow"]
with subprocess.Popen(cmd, stdout=subprocess.PIPE, text=True) as proc:
for line in proc.stdout:
track = line.strip()
set_message("Listening to " + track if track else "")
Steps to run it:
- Start Pidgin and sign in to your account.
- Start Spotify and play a track.
- Install the
pydbusPython library for Python 3. - Save the script, for example as
spotify-pidgin.py, and runpython3 spotify-pidgin.pyfrom a terminal in the same desktop session.
The wiki that the status calls come from warns that the method “still does unexpected things when your current status is a complex one,” and that scripts must use the same D-Bus session bus as Pidgin. Keep your saved status simple while you test, and try one account before you roll it out.
The sibling guide on displaying current music in Pidgin walks through this script in more detail, including how to restore a normal status when the music stops.
Do the Pidgin now-playing plugins work with Spotify?
Not reliably. The two best-known plugins were written for older players, and neither names Spotify in its package description.
| Plugin | Documented players | Status on Ubuntu |
|---|---|---|
| pidgin-mpris | A user-selected MPRIS player; the description names VLC, BMPx and Audacious 1.4 | Ubuntu’s package search listed 0.2.3-3 in 22.04 (jammy) universe |
| pidgin-musictracker | Amarok, Audacious, Banshee, Exaile, MPD, Rhythmbox and others; MPRIS for Amarok 2, BMPx and VLC | No result in a Ubuntu package-name search |
pidgin-mpris replaces %now-playing in your status message and user info with the track title, so it is the closest plugin to a drop-in fix. Because it is described as working with a user-selected MPRIS-compliant player, it may work with Spotify, but nothing in its description promises that. Test it with apt policy pidgin-mpris on your release first.
pidgin-musictracker has richer status formatting, including progress bars and per-account formats, but its Launchpad listing shows 0.4.22-2ubuntu1 as the latest upload, and a package-name search across Ubuntu suites found nothing. Use it only if you can build it yourself.
What about the Pidgin Flatpak and the D-Bus sandbox?
The Pidgin Flatpak can work for chat, but it complicates the music setup. The flatpak-metadata manual says a sandboxed app without full session bus access gets filtered access: by default it can own and talk to names based on its own application ID and to portal APIs, and other bus names are invisible to it.
Two things follow from that. A plugin inside the sandbox may not see your player’s org.mpris.MediaPlayer2.* name. A script outside the sandbox may not be able to call Pidgin’s D-Bus service, because that name does not match the Flatpak’s ID. Both can be addressed with Flatpak permission overrides, but the deb package avoids the question. If you choose the Flatpak anyway, read the manual page’s none, see, talk and own levels before changing any permission.
What happened to emesene’s now-playing feature?
Emesene’s music plugin once covered this need, but the client is no longer a realistic choice on Ubuntu. Microsoft switched off Windows Live Messenger on 15 March 2013, and a 2021 Launchpad comment says emesene was removed from Ubuntu and Debian in 2015 and is no longer developed.
The emesene developer’s 2010 post describes a music plugin with player handlers, with MPD as the reference and a documented method for adding more by copying a handler file and registering it. It does not mention Spotify or MPRIS. The full story, plus the options for anyone still holding on to it, is in the guide to showing current music in Emesene on Ubuntu. The short version is to move to Pidgin and use the script above.
What about Skype and recording calls?
Skype is gone, so the question is now about recording calls in whatever you use instead. Microsoft’s support page says “As of May 5th, 2025, Skype is retired,” and that free and paid Skype users could sign in to Microsoft Teams Free with their Skype credentials to keep contacts and chats.
For capture, the options are the app’s own recorder where one exists, GNOME’s built-in screen recorder, or OBS Studio, always with the other person’s consent. The guide to recording Skype and other calls on Ubuntu covers each route, the Teams Free recording rules and the legal basics.
How does the script work, line by line?
The script has two halves: a reader that asks playerctl what is playing, and a writer that sets the Pidgin status. Knowing the split makes it easy to change.
- Connect to Pidgin.
SessionBus().get(...)opens the Pidgin D-Bus service namedim.pidgin.purple.PurpleServiceat the object path/im/pidgin/purple/PurpleObject, as in the developer wiki. - Keep the current status type.
PurpleSavedstatusGetCurrentandPurpleSavedstatusGetTyperead whether you are Available, Away and so on, so the new status keeps that type. - Create, fill and activate.
PurpleSavedstatusNewmakes a transient status,PurpleSavedstatusSetMessageputs the text in it andPurpleSavedstatusActivateapplies it. - Follow the player. playerctl with
--followprints a line whenever the answer changes, and a blank line when no player can answer, so the script sets an empty message when Spotify closes.
The wiki also lists numeric status types, including STATUS_AVAILABLE = 2, STATUS_AWAY = 5 and STATUS_TUNE = 8. It says these constants cannot yet be fetched over D-Bus, so the script copies the type of your current status instead of setting one by number.
Can you use a different player or format?
Yes. Change the player name or the format string and the rest stays the same. playerctl --list-all shows the exact player names on your system, and the README says that with --player playerctl acts on the first matching player that supports the command.
The format string uses double braces around variable names. The README’s example prints {{ artist }} - {{ album }} - {{ title }}, and it describes helper functions such as duration(...) for time formatting. A short format such as {{ artist }} - {{ title }} reads best in a narrow contact list. If you drop --player=spotify altogether, playerctl picks from whatever players are running, which can lead to a browser tab or another app appearing in your status. Name the player on purpose.
How do you start the script at login?
Add it to your desktop’s startup applications once it works, and make sure it starts after Pidgin. A script that runs before Pidgin has started cannot connect to the Pidgin D-Bus service, and it will stop with an error.
For that reason, many people run it from a terminal when they want the feature, instead of at login. If you do automate it, wrap the connection in a retry loop so it waits for Pidgin to appear on the session bus, and have it send an empty message on exit so a stale song does not stay in your status.
What is available on which Ubuntu release?
The packages you need are in the universe component, which is enabled on a default desktop. This table shows what the Ubuntu package pages listed when this guide was written, so check apt policy on your own machine.
| Package | 22.04 (jammy) | 24.04 (noble) | Newer |
|---|---|---|---|
| playerctl | 2.4.1-1 | 2.4.1-2build2 | 2.4.1-3build1 on 26.04 |
| pidgin | Not checked | 1:2.14.13-1ubuntu2 | Not checked |
| pidgin-mpris | 0.2.3-3 | Not listed in the search | Not listed in the search |
The pattern is clear enough: playerctl and Pidgin are packaged, and the old now-playing plugins are thin on the ground. That is one more reason the script is the safer choice. If a package is missing on your release, do not fix it with a random third-party repository; use the script, which needs only playerctl, Pidgin and one Python library.
Is it safe to run a script that talks to Pidgin?
Yes, if you read it first and run it only as your own user. The script does three things: it runs playerctl, reads one line of text and calls Pidgin’s status functions on your session bus. It does not need sudo, network access or any file outside your home folder.
Treat any script you copy from the web the same way, including this one. Read each line, change the player name to the one you actually use, and test with a throwaway account if you have one. If a script asks for sudo just to set a chat status, something is wrong.
Which instant messenger should you use on Ubuntu now?
Use the one your contacts use, and prefer one that Ubuntu or Flathub still maintains. Pidgin is a good general choice if you want several accounts in one window and you are comfortable with a classic interface. It is in Ubuntu’s archive, receives releases, and supports status messages for the now-playing trick in this guide.

Before you commit, check three things:
- Is the app in Ubuntu’s archive or on Flathub, and when was it last updated?
- Does the network still exist? Messenger and Skype do not.
- Does the app show status messages, so that a now-playing line has somewhere to go?
If those answers are yes, you can build the same Spotify setup on it, provided a script can reach the app’s status through D-Bus or a plugin.
How do you stop sharing your music, and what should you watch for?
Stop the script or unload the plugin, then type a normal status message. Everyone who can see your status can see the track, so think about who that is before you turn it on.
Some practical points:
- Scope. Run the script on personal accounts only.
- Wording. Keep it to artist and title; extra detail makes the status noisy.
- Clearing. The script above sends an empty message when no player answers, but it does not restore an older message, so set your status manually when you stop.
- Autostart. Add the script to your desktop’s startup applications only after you are happy with how it behaves.
- Updates. After a Pidgin or Ubuntu upgrade, re-run the checks in this guide:
playerctl --list-all, then a test track.
What should you check if nothing shows up?
Most failures are D-Bus visibility problems. Work through the list in this order.
- Run
playerctl --list-all. If Spotify is missing, restart it and check the D-Bus advice in the playerctl README. - Confirm Pidgin is running as the same user and on the same session bus as the script.
- Install the
pydbuslibrary for the Python version you are running. - Check whether Pidgin or Spotify is a Flatpak, and if so, review the sandbox permissions.
- Set a plain status in Pidgin and test again with one account.
- If you use a plugin instead, confirm it is loaded and that your status text contains
%now-playing.
When the status updates once and then stops, the usual cause is a player or Pidgin restart. Restart the script after either one.
| Approach | Reads Spotify | Works on current Ubuntu | Effort |
|---|---|---|---|
| playerctl plus Pidgin D-Bus script | Yes, via MPRIS (playerctl lists spotify and documents --player=NAME) | Yes, with Pidgin 2.14 from the deb package | Medium |
| pidgin-mpris plugin | Not named in its player list; test it | Packaged for Ubuntu 22.04 universe when checked; check your release | Low |
| pidgin-musictracker plugin | Not in its documented player list | Not found in a Ubuntu package search; source build only | High |
| Emesene music plugin | No Spotify handler described in the developer notes | No: emesene left Ubuntu in 2015 | Not recommended |
The playerctl and D-Bus script is the only approach on this list with documented Spotify support on a current Ubuntu release.
All Messaging Apps And Now Playing Integrations guides
- How to Record Skype Calls on Ubuntu (After the Skype Shutdown)
Skype retired on 5 May 2025. See how to record a call on Ubuntu now with Teams, GNOME screen recording or OBS, plus the consent rules to follow.
- How to Show the Music You're Playing in Pidgin on Ubuntu
Show your current song in a Pidgin status on Ubuntu: compare pidgin-mpris, pidgin-musictracker and a D-Bus script, with install steps and fixes.
- Show Current Music in Emesene on Ubuntu (and What to Use Today)
Emesene's music plugin once showed your song in chat. Learn how it worked, why it no longer fits Ubuntu, and how to share your track from Pidgin.
Questions readers ask
How do I show what I'm playing on Spotify in Pidgin?
Install Spotify, check that playerctl --list-all shows it, then send the track to Pidgin's status message. The reliable route is a short Python script that reads the track with playerctl and sets the status through Pidgin's D-Bus interface. The older pidgin-mpris and pidgin-musictracker plugins do not name Spotify in their player lists, so test them before you depend on them.
How do I install Spotify on Ubuntu?
Spotify's Linux page gives two main routes: run sudo snap install spotify, or add Spotify's apt repository and install spotify-client with apt-get. The Ubuntu Software store also lists it. There is also a community Flatpak that packages Spotify's official binaries. Spotify says Linux is a labor of love from its engineers and not a platform it actively supports.
Does Spotify support MPRIS on Linux?
Yes, in practice. The playerctl README lists Spotify as a supported player, shows --player=vlc,spotify next, and documents metadata --format for reading artist and title, which means the client publishes MPRIS data on the D-Bus session bus. MPRIS is the freedesktop standard for discovering and querying media players. If playerctl lists no players, the README says Spotify may need D-Bus environment variables set.
Is Pidgin still maintained?
Yes. The Pidgin project released 2.14.14 in January 2025 and has been publishing Pidgin 3 alpha builds since 2026, the latest being Alpha 4 (2.98.0) on 30 October 2026. Ubuntu 24.04 packages the 2.14 line in universe, which is the version that most plugins and the D-Bus script in this guide target.
Will Pidgin show my Spotify status on every chat network?
It shows on any account whose protocol supports status messages. The pidgin-musictracker description says its status text works on any protocol that supports custom statuses, such as XMPP. Some networks show the text in different places or truncate it, so keep the format short. Networks without status messages will not show it at all.
Can I use Pidgin from Flatpak and still show Spotify tracks?
It is harder. Flatpak limits which D-Bus names a sandboxed app can see, and by default an app can only talk to names matching its own ID. Reading a media player or reaching Pidgin's D-Bus service from outside the sandbox may need extra permissions. For a now-playing status, the deb package from Ubuntu's archive avoids that extra layer.
What is the best instant messenger for Ubuntu?
It depends on the network your contacts use. Pidgin suits people who want one app for several accounts, such as XMPP and IRC, and Ubuntu 24.04 packages it. Skype is gone: Microsoft retired it on 5 May 2025 and sent users to Microsoft Teams Free. Pick the app your contacts actually use, then check it has a maintained Ubuntu or Flatpak package.
Is it a good idea to share what I'm listening to?
Only with care. Your track appears in your status message, so everyone who can see your status can see it. Titles can reveal habits or moods, and some people do not want clients or coworkers reading them. Use it on personal accounts, keep it short, and know how to clear it by turning off the script or plugin and typing a normal status.
Further reading
- Download Spotify for Linux (Spotify) (spotify.com)
- Spotify on the Snap Store (snapcraft.io)
- Spotify Flatpak packaging (Flathub GitHub repository) (github.com)
- playerctl README (GitHub) (github.com)
- MPRIS D-Bus Interface Specification (dueno.pages.freedesktop.org)
- Pidgin D-Bus how-to (Pidgin developer wiki) (developer.pidgin.im)
- Ubuntu 24.04 package: pidgin (packages.ubuntu.com)
- Ubuntu package search: playerctl (packages.ubuntu.com)
- Pidgin on Flathub (flathub.org)
- Pidgin release topics (Instant Messaging Freedom forum) (discourse.imfreedom.org)
- pidgin-mpris package description (Debian sources) (sources.debian.org)
- pidgin-mpris README (Debian sources) (sources.debian.org)
- pidgin-musictracker package description (Debian testing, via LinuXia) (linuxia.de)
- flatpak-metadata(5) manual page (Session Bus Policy) (manpages.ubuntu.com)
- Skype is retiring in May 2025 (Microsoft Support) (support.microsoft.com)
- Microsoft to end Messenger service (RNZ, 2013) (rnz.co.nz)
- Launchpad bug 822834, comment 4 (emesene package) (bugs.launchpad.net)
Worth reading next
- How to Record Skype Calls on Ubuntu (After the Skype Shutdown)
Skype retired on 5 May 2025. See how to record a call on Ubuntu now with Teams, GNOME screen recording or OBS, plus the consent rules to follow.
- Show Current Music in Emesene on Ubuntu (and What to Use Today)
Emesene's music plugin once showed your song in chat. Learn how it worked, why it no longer fits Ubuntu, and how to share your track from Pidgin.
- How to Show the Music You're Playing in Pidgin on Ubuntu
Show your current song in a Pidgin status on Ubuntu: compare pidgin-mpris, pidgin-musictracker and a D-Bus script, with install steps and fixes.
- Paste Text or Commands in Ubuntu Terminal
Paste text or commands in the Ubuntu terminal with Ctrl+Shift+V, the right-click menu or middle click. Fixes for when paste fails, plus safety tips.
- How to Fix the NO_PUBKEY GPG Error for a Launchpad PPA
Fix NO_PUBKEY and EXPKEYSIG errors from ppa.launchpad.net on Ubuntu by re-adding the PPA or storing the key with Signed-By instead of apt-key.
- Install DirectX 10 on Ubuntu: Wine, DXVK and Proton Explained
You cannot install Microsoft DirectX on Ubuntu, but Wine and DXVK run Direct3D 10 games through Vulkan. Setup, driver checks and fixes.