108

I would like to remove the bubble notifications of Spotify that are shown when a new song is being played. This is quite distracting while you are working.

I still like the integration within the volume menu.

Ubuntu Version: 14.04

Spotify Version: 0.9.10.17.g4129e1c9

edwinksl
  • 23,789
Israel Varea
  • 1,183
  • 2
  • 8
  • 7

2 Answers2

144

In recent versions of Spotify, you can disable the notification inside the GUI itself.

Go to "Settings" and then "Display" and toggle the "Show desktop notifications when the song changes" option.

Display options for Spotify

edwinksl
  • 23,789
  • 9
    Using Ubuntu 18.04 and the other answer's dir structure didn't exist. This is the correct answer. Thanks. – Force Hero Mar 16 '19 at 07:42
  • 1
    I cannot find this settings page in KDE (the top toolbar is not visible) – Vedant Agarwala Jun 25 '19 at 10:31
  • 1
    Can't get to this page on Cinnamon either. – sjf Jan 28 '20 at 20:41
  • 1
    Hey @sjf, hopefully the accepted answer, which modifies the config file directly, works for you. – edwinksl Jan 29 '20 at 04:19
  • 2
    I want to add to the Spotify Settings Solution from Edwinksi that those settings are available under the dropdown menu besides your username in the UI, seeing some people having trouble finding it. Would have commented this in that thread if I was allowed to... – Merijn Bol Jun 08 '20 at 08:38
131

Exit Spotify, then edit ~/.config/spotify/Users/[Spotify user name]-user/prefs and set ui.track_notifications_enabled=false

Jos
  • 29,224
  • 2
    No @Jobin, $USER would be the Ubuntu user name, not the Spotify user name. I will revert your edit. – Jos May 26 '14 at 09:40
  • 1
    I have modified the prefs file as you have pointed out, but when Spotify is restarted, it modifies the prefs again removing the ui.track_notifications_enabled=false – Israel Varea May 26 '14 at 09:45
  • Hm. In my case, it works exactly as it should, after a restart. I am using version 0.9.10.17.g4129ee1c9. The ui.track_notifications_enabled=false simply goes on a separate line, nothing more. – Jos May 26 '14 at 09:59
  • 1
    Modified again and now it is working. It seems that I was modifying the file while spotify was running or anything else. Anyway, the solution you've propose is working for me now! – Israel Varea May 26 '14 at 10:10
  • 4
    It works! (I'm on Ubuntu 14.04 with Unity) Funny that we have to go to a config file to do this simple preference change... when will GUI's ever learn? – modulitos Jun 28 '14 at 08:40
  • Here i needed to change the directory to ~/.config/spotify/Users/[Spotify user name]-user/prefs, the file was not found when i used just the [Spotify user name]. – Iago Jul 22 '14 at 01:34
  • 1
    How did you know to do this? Is there a secret file somewhere that lists all the possible key names in the Spotify prefs file? – Mark Dominus Jul 25 '14 at 16:30
  • 1
    I think I found this snippet of wisdom on a Dutch site once. – Jos Jul 25 '14 at 17:56
  • 7
    Unfortunately this also disables a part of the mpris d-bus interface which normally provides things like "currently playing" information. – exic Jul 31 '14 at 08:27
  • This also works on debian jessie – Brett Sep 10 '14 at 21:55
  • Ubuntu 15: Though the line didn't exist, it now works perfectly fine. – Aiyion.Prime Sep 22 '15 at 15:40
  • 1
    for the 'secret file' that lists the possible keynames, run the following. And note that this does not say what goes in which preferences file, nor what values are expected: strings /usr/bin/spotify | grep -P '^[a-z_]+.[a-z_-]+$' – Falsenames Oct 09 '15 at 23:15
  • Should we add a little note about the username must be lowercase? I just ran into it... – Dionysius Nov 04 '16 at 14:04
  • You should also create the file if it does not already exist. – Michael Hampton Jan 08 '19 at 04:24
  • 5
    For snap installed spotify the file is: ~/snap/spotify/current/.config/spotify/Users/[Some user hash]-user/prefs – Vedant Agarwala Jun 25 '19 at 10:39
  • 1
    Or just open the app and disable it from the GUI settings ("Show desktop notifications when the song changes") – undefined Dec 09 '20 at 14:45
  • @undefined I'm pretty sure that wasn't yet possible in 2014... – Jos Dec 09 '20 at 15:10