[Ubuntu TIP] Solved: Totem Cannot Detect UPnP Media Server

First a bit of background. A UPnP media server can serve your media files (video / audio / pictures) over the network to any compatible player. Some of the most known examples of these media servers are MediaTomb, TVersity, ushare, etc. In linux, few players can play media off these servers natively, but many require a plugin / library called “coherence”. e.g. the default media players (Totem and RhythmBox) can detect and play media from media servers once you install coherence (“sudo apt-get install python-coherence”). This works, BUT you will see that many times Totem will stop detecting the server suddenly. It happens to me quite a bit (The server I use is Mediatomb). First I thought that the problem is with Media Tomb, but my PS3 continued to play videos from it over wi-fi without any issues, so that was ruled out. I tried many things but in the end, the solution turned out to be pretty simple. The problem seems to be that the coherence library hangs some times. Simple thing is to just restart it. So, all you need to do is run the following command:

sudo killall coherence

Then, just restart Totem and it will work fine now (Totem will invoke coherence again automatically). :)

See also