Can't start deluge "GtkWarning: could not open display"

Support for Deluge on Apple Mac OS
robertogluck
New User
New User
Posts: 6
Joined: Sat Nov 24, 2007 10:21 pm

Re: Can't start deluge "GtkWarning: could not open display"

Post by robertogluck »

Thanks for the tip. No bugs afrer all then.
However, please pardon my ignorance, but how do I install xdg-utils on a Mac ? I tried to look in the available ports, but I found nothing.
robertogluck
New User
New User
Posts: 6
Joined: Sat Nov 24, 2007 10:21 pm

Re: Can't start deluge "GtkWarning: could not open display"

Post by robertogluck »

kbr3813 wrote:Hi,

Would appreciate if anyone can help. Whenever I start deluge I get the below error message. Thanks

mac-computer:/etc root# deluge
/opt/local/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py:72: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
Traceback (most recent call last):
File "/opt/local/bin/deluge", line 112, in <module>
bus = dbus.SessionBus()
File "/opt/local/lib/python2.5/site-packages/dbus/_dbus.py", line 216, in __new__
mainloop=mainloop)
File "/opt/local/lib/python2.5/site-packages/dbus/_dbus.py", line 105, in __new__
bus = BusConnection.__new__(subclass, bus_type, mainloop=mainloop)
File "/opt/local/lib/python2.5/site-packages/dbus/bus.py", line 121, in __new__
bus = cls._new_for_bus(address_or_type, mainloop=mainloop)
dbus.exceptions.DBusException: org.freedesktop.DBus.Error.Spawn.ExecFailed: Failed to execute dbus-launch to autolaunch D-Bus session
I finally found out that the solution to the problem is to set the DISPLAY environment variable to :0.0, for example by adding the line :
export DISPLAY=:0.0
in the file /etc/bashrc or in .bash_profile in the home directory.

As for the xdg-tools, I think they are specifically linux tools, and I could not find a Mac version. However, if I make a shell file named xdg-open and accessible from deluge, and containing the line :
open "$1"
then it does more or less what I want (open the directory where the current torrent is being downloaded) when deluge calls xdg-open.
Post Reply