Note that there are some explanatory texts on larger screens.

plurals
  1. POConnecting to dbus over tcp
    primarykey
    data
    text
    <p>I wrote a simple python program to play and pause banshee music player. While its working on my own machine, I have trouble doing it to a remote computer, connected to the same router (LAN). I edited the session.conf of the remote machine, to add this line:</p> <pre><code>&lt;listen&gt;tcp:host=localhost,port=12434&lt;/listen&gt; </code></pre> <p>and here is my program:</p> <pre><code> import dbus bus_obj=dbus.bus.BusConnection("tcp:host=localhost,port=12434") proxy_object=bus_obj.get_object('org.bansheeproject.Banshee', '/org/bansheeproject/Banshee/PlayerEngine') playerengine_iface=dbus.Interface(proxy_object, dbus_interface='org.bansheeproject.Banshee.PlayerEngine') var=0 while (var!="3"): var=raw_input("\nPress\n1 to play\n2 to pause\n3 to exit\n") if var=="1": print "playing..." playerengine_iface.Play() elif var=="2": print "pausing" playerengine_iface.Pause() </code></pre> <p>This is what i get when i try to execute it</p> <pre><code>Traceback (most recent call last): File "dbus3.py", line 4, in &lt;module&gt; bus_obj=dbus.bus.BusConnection("tcp:host=localhost,port=12434") File "/usr/lib/python2.7/dist-packages/dbus/bus.py", line 125, in __new__ bus = cls._new_for_bus(address_or_type, mainloop=mainloop) dbus.exceptions.DBusException: org.freedesktop.DBus.Error.NoServer: Failed to connect to socket "localhost:12434" Connection refused </code></pre> <p>What am I doing wrong here? should i edit /usr/lib/python2.7/dist-packages/dbus/bus.py</p> <p>UPDATE:</p> <p>ok, here is the deal when i add </p> <pre><code>&lt;listen&gt;tcp:host=192.168.1.7,port=12434&lt;/listen&gt; </code></pre> <p>to to /etc/dbus-1/session.conf, then reboot, hoping it would start listening on reboot, It never boots. It gets stuck on loading screen and occasionally, a black screen with the following text flashes:</p> <pre><code>Pulseaudio Configured For Per-user Sessions Saned Disabled;edit/etc/default/saned </code></pre> <p>so, when i go ctrl+alt+f1 , change session.conf to original state and reboot, it boots properly.</p> <p>Whats all that about? How can I make dbus daemon listen for tcp connections, without encountering problems?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload