linux - (spotify:1): Gtk-WARNING **: cannot open display: unix -


i try run spotify docker container. have docker 1.11.2 installed on ubuntu 14.04 vm. i'm on mac , i'm using ssh connect vm. it's working fine when try run docker container error:

ubuntu@ubuntu-virtual-machine:~$ docker run -it -v /tmp/.x11-unix:/tmp/.x11-unix -e display=unix$display -v /dev/snd:/dev/snd --privileged --name spotify jess/spotify  (spotify:1): gtk-warning **: cannot open display: unix 

how can fix this? tried things read on internet like: edit ~/.xinitrc , put following in it:

#! /bin/bash xhost +localhost & 

also tried ssh ubuntu in following way: ssh ubuntu@ip -x ,

ssh ubuntu@ip -y