I use ubuntu spotify on ubuntu 14.04 and there is no settings in windows behavior for minimazing system tray for ubuntu its a missing option since 1.0.1 -my Spotify version 1.0.64.407.g9bd02c2d- and there is no solution for on spotify community or stackoverflow. This situation bother me when i am working.I dont want to see spotify when i am browsing between windows. I find a program on github named kdocker and kdocker solve my problem. KDocker minimize every program to system tray and i change spotify desktop script for minimizing easily.

image

Install kdocker

sudo apt-get install kdocker

Create file named as spotify-minimized.desktop.

[Desktop Entry]
Name=Spotify-minimized
GenericName=Music Player
Comment=Start spotify with minimized on tray with kdocker
Icon=spotify-client
Exec=kdocker -i /usr/share/spotify/icons/spotify-linux-64.png spotify %U
TryExec=spotify
Terminal=false
Type=Application
Categories=Audio;Music;Player;AudioVideo;
MimeType=x-scheme-handler/spotify;
Name[en_US]=spotify-minimized

Then move to file to applications.

 sudo mv spotify-minimized.desktop /usr/share/applications/

Start easily minimized spotify from unity dash. image

You can change music directly from tray and kdocker hide spotify window.

image