The latest version of Spotify for Linux has included some interesting news but, as is more common than we would like, when some bugs are added or corrected, others may appear. This is what happened in the recent update, where Spotify has been seen as its icon in the tray has disappeared, making it impossible to control music playback without opening the application window. But, like everything in Linux has a solution, Today we bring you a way to control Spotify music playback from the launcher.
Please note that what is described in this tutorial only required for version 184.108.40.206 from Spotify. The previous version did offer the option to minimize the application to the top bar, so adding the possibility to the launcher as well could be somewhat redundant. In any case, if you prefer to control from the launcher, you can also try in earlier versions. Here are the steps to follow.
How to control Spotify from launcher
Getting control of Spotify for Linux from the Ubuntu launcher is a very simple process. The only thing is that it is worth pointing it somewhere because we will have to edit a Spotify file and most likely, when updated, return to its original state. We will achieve this by performing the following steps:
- We need to edit the file spotify.desktop which is in the path / usr / share / applications. We can open and edit it by opening a terminal and typing the following command:
sudo gedit /usr/share/applications/spotify.desktop
- In the file that opens, we select all the text (Ctrl + A) and delete it.
- Then copy the following and paste it into the file:
[Desktop Entry] Name=Spotify GenericName=Music Player Comment=Spotify streaming music client Icon=spotify-client Exec=spotify %U TryExec=spotify Terminal=false Type=Application Categories=Audio;Music;Player;AudioVideo; MimeType=x-scheme-handler/spotify Actions=PlayOrPause;Stop;Next;Previous [Desktop Action PlayOrPause] Name=Reproducir/Pausar Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.PlayPause OnlyShowIn=Unity; [Desktop Action Stop] Name=Parar Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Stop OnlyShowIn=Unity; [Desktop Action Next] Name=Siguiente Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Next OnlyShowIn=Unity; [Desktop Action Previous] Name=Anterior Exec=dbus-send --print-reply --dest=org.mpris.MediaPlayer2.spotify /org/mpris/MediaPlayer2 org.mpris.MediaPlayer2.Player.Previous OnlyShowIn=Unity;
- Then click Save.
- Now we restart Spotify.
- Once the process is complete, to control Spotify from the launcher just right click on its icon and choose Play / Pause, Stop, Next or Previous.
- Note: If you want to change the displayed text you can do so by changing the lines given “Name =”, where you can change, for example, Play / Pause to “Give it a cane!”. I comment on it because it’s a possibility that exists and I know there are a lot of people with humor who might be interested in customizing this point.
It’s worth taking all the steps and controlling Spotify from the sidebar, right?