Access remote MPD?

Asked by Erich Regen on 2010-04-25

I would like to control a remote MPD with the Panflute applet. My problem is that MPD does not show up in the Panflute preferences. Not in the preferred player field nor somwhere else can I find a hint.
How can I set up Panflute so it accesses the remote MPD?

I am using Ubuntu Karmic and just installed Panflute by adding a PPA (http://ppa.launchpad.net/kuliniew/ppa/ubuntu) and installed Panflute applet and daemon as well as all dependencies.

Furthermore in ~/.bashrc I added two lines:
  MPD_HOST=192.168.0.99
  MPD_PORT=6600

which reflect my MPD server. I am not using any authentication on the MPD server.
With other MPC clients I had no problem so far, meaning there is no problem with the network, etc.

I searched around the web but could nowhere find any hint how to solve this.

Thank's for your help!

Question information

Language:
English Edit question
Status:
Solved
For:
Panflute Edit question
Assignee:
No assignee Edit question
Solved by:
Erich Regen
Solved:
2010-05-02
Last query:
2010-05-02
Last reply:
2010-05-01
Paul Kuliniewicz (kuliniew) said : #1

If MPD isn't showing up as an option, that probably means the python-mpd package isn't installed. It's not a hard dependency, since it's only needed for MPD support, but Recommends: usually aren't installed by default by any of the package tools.

Erich Regen (schlonz47) said : #2

Yes, installing python-mpd solved this. I now was able to set up MPD as the preferred player.

But now the panel's icon tooltip just says 'Launch MPD' and clicking it leads to no remarkable result - nothing happens. This is no surprise since I do not want to start MPD but control an already running instance on another computer. Panflute does not seem to connect to the remote MPD instance.
Just for testing purposes I installed MPD on the local computer and as soon as MPD was running Panflute connected to it and let me control the local MPD instance. But - as mentioned this is not what I try to accomplish.

Paul Kuliniewicz (kuliniew) said : #3

It appears that when the applet launches the daemon via D-Bus activation, it doesn't get access to the environment variables that you set in .bashrc, so it winds up using the default of localhost:6600. I've verified that if you start panflute-daemon from the command line, it does respect MPD_HOST and MPD_PORT, so you can use that as a workaround.

Thinking about it a little more, shouldn't the only things that see what you do in .bashrc be programs you launch from the command line? Do you use any graphical clients, and do they use the right host and port if you launch them from the GNOME menu?

Erich Regen (schlonz47) said : #4

You are right. After some investigations it turned out that ~/.gnomerc is the right file. So I created the file, put
  export MPD_HOST=192.168.0.99
  export MPD_PORT=6600
into it, logged out and in again and everything works perfectly.
Thank you, Paul!