How to Minimize Spotify to the System Tray in Linux

Spotify Linux Tray Minimize Featured

Spotify isn’t what it used to be. The recent versions of the Spotify client for Linux have lost the ability to hide in the tray. Now they always take up a spot in your taskbar or dock, but thankfully, there is a way to minimize Spotify to the system tray in Linux. Let’s see how.

Also read: How to Manage Your Downloaded Spotify Music and Move to SD Card

Install KDocker

For this to work, we will use both the latest version of the Spotify client and KDocker. Although its name starts with a “k,” KDocker is not associated with the KDE desktop. It is a simple tool that allows you to move any application to the tray in most popular desktop environments. While it has not been updated for quite a while, it is still working fine for most desktop environments. It is probably the best current solution for docking Spotify’s client.

You can install KDocker in Ubuntu and compatible distributions with:

sudo apt install kdocker
Linux Spotify To Tray Apt Install Kdocker

In Fedora, Red Hat, and their siblings, try:

sudo dnf install kdocker

Use KDocker to Minimize Spotify to the System Tray

Launch KDocker from your Applications menu after installation.

Linux Spotify To Tray Kdocker In Apps List

Click on the Spotify window to minimize it to the tray.

Linux Spotify To Tray Select Window

Done! You’ll find your app in the tray instead of your taskbar.

Linux Spotify To Tray Minimized To Taskbar

For it to show Spotify again, click on the KDocker tray icon and select “Show Spotify.”

You can also right-click on the icon and select “Dock Another” to repeat the process for other apps.

Integrate KDocker to Spotify

As you can see, the above method requires you to run Spotify and KDocker simultaneously. Another way to do it is to integrate KDocker to Spotify so it can minimize to the tray anytime.

Note that the following instructions make use of the Ubuntu’s default desktop.

Also, keep in mind that these tweaks will apply only to the desktop icon. If you launch Spotify any other way, such as from your app list or the terminal, Spotify will behave normally and won’t hide to the tray.

Start by locating Spotify’s icons. Try:

ls /usr/share/icons/Papirus/64x64/apps/spotify.svg

You should see a list of spotify-related icons. Jot down the path to a specific one, such as “/usr/share/icons/Papirus/64×64/apps/spotify.svg”.

Copy the Spotify client’s desktop entry to your Home folder with the command:

cp /usr/share/applications/spotify.desktop ~/.local/share/applications

Edit the copied file with your favorite text editor. We prefer nano, so our command was:

nano ~/.local/share/applications/spotify.desktop

Locate the Exec=spotify %U line.

Linux Spotify To Tray Default Desktop File

Change it to:

Exec=kdocker -q -o -l -i /usr/share/icons/Papirus/64x64/apps/spotify.svg -n Spotify spotify %U

What the above command does is let KDocker handle the opening of the Spotify app so that it can become minimizable. The path to the Spotify icon is for KDocker to display the Spotify icon on the system tray. Without it, it will just show a generic icon.

Save the changes with Ctrl + o and exit the file with Ctrl + X.

Launch your Spotify, and you should see its icon on the system tray.

Linux Spotify To Tray Spotify Running With Tray Icon

Click on it to minimize Spotify to the system tray.

If you are tired of using the Spotify client, you can try the Spotify Web Player or use these tips to hide your Spotify listening activity.

Subscribe to our newsletter!

Our latest tutorials delivered straight to your inbox

Odysseas Kourafalos

OK's real life started at around 10, when he got his first computer - a Commodore 128. Since then, he's been melting keycaps by typing 24/7, trying to spread The Word Of Tech to anyone interested enough to listen. Or, rather, read.