Controlling Deluge from terminal

Post Reply
smashcrab

Controlling Deluge from terminal

Post by smashcrab »

Hey people!
I've recently started using deluge exclusively (love it) on pclinuxos2007, and I'm wondering if theres a way I can control it remotely via ssh?
I dont need much control, all I want to be able to do is be able to log in remotely to start deluge via ssh, and have it carry on downloading my torrents until I kill it. When I try to launch it this way at the moment, I get the following response:

[smashcrab@beast ~]$ deluge
/usr/lib/python2.4/site-packages/gtk-2.0/gtk/__init__.py:69: GtkWarning: could not open display
warnings.warn(str(e), _gtk.Warning)
no existing Deluge session
Starting new Deluge session...
deluge_core; using libtorrent 0.13.0.0. Compiled with NDEBUG.
Applying preferences
Capping download to 40960 bytes per second
Capping upload to -1 bytes per second
Pickling state...
Scanning plugin dir /usr/share/deluge/plugins
Initialising plugin TorrentPieces
Initialising plugin TorrentNotification
Initialising plugin EventLogging
Initialising plugin Locations
Initialising plugin DesiredRatio
Initialising plugin BlocklistImport
Initialising plugin SpeedLimiter
Initialising plugin ExtraStats
Initialising plugin TorrentFiles
Initialising plugin NetworkGraph
Initialising plugin TorrentPeers
Initialising plugin TorrentSearch
Initialising plugin TorrentCreator
Initialising plugin SimpleRSS
Initialising plugin NetworkHealth
/usr/lib/python2.4/site-packages/deluge/interface.py:62: Warning: invalid (NULL) pointer instance
self.wtree = gtk.glade.XML(common.get_glade_file("delugegtk.glade"), domain='deluge')
/usr/lib/python2.4/site-packages/deluge/interface.py:62: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
self.wtree = gtk.glade.XML(common.get_glade_file("delugegtk.glade"), domain='deluge')
/usr/lib/python2.4/site-packages/deluge/interface.py:62: GtkWarning: gtk_settings_get_for_screen: assertion `GDK_IS_SCREEN (screen)' failed
self.wtree = gtk.glade.XML(common.get_glade_file("delugegtk.glade"), domain='deluge')
/usr/lib/python2.4/site-packages/deluge/interface.py:62: Warning: g_object_get: assertion `G_IS_OBJECT (object)' failed
self.wtree = gtk.glade.XML(common.get_glade_file("delugegtk.glade"), domain='deluge')
/usr/lib/python2.4/site-packages/deluge/interface.py:62: Warning: value "TRUE" of type `gboolean' is invalid or out of range for property `visible' of type `gboolean'
self.wtree = gtk.glade.XML(common.get_glade_file("delugegtk.glade"), domain='deluge')
/usr/lib/python2.4/site-packages/deluge/interface.py:206: Warning: invalid (NULL) pointer instance
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: Warning: g_signal_connect_data: assertion `G_TYPE_CHECK_INSTANCE (instance)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: Screen for GtkWindow not set; you must always set
a screen for a GtkWindow before using the window
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_screen_get_default_colormap: assertion `GDK_IS_SCREEN (screen)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_colormap_get_visual: assertion `GDK_IS_COLORMAP (colormap)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_screen_get_root_window: assertion `GDK_IS_SCREEN (screen)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_window_new: assertion `GDK_IS_WINDOW (parent)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_screen_get_display: assertion `GDK_IS_SCREEN (screen)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_display_sync: assertion `GDK_IS_DISPLAY (display)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_drawable_get_display: assertion `GDK_IS_DRAWABLE (drawable)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: gdk_x11_get_xatom_by_name_for_display: assertion `GDK_IS_DISPLAY (display)' failed
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
/usr/lib/python2.4/site-packages/deluge/interface.py:206: GtkWarning: ../../../gdk/x11/gdkdrawable-x11.c:878 drawable is not a pixmap or window
self.tray_icon = gtk.status_icon_new_from_file(common.get_pixmap("deluge32.png"))
Segmentation fault

Now im a bit of a noob, but I'm pretty sure thats happening because I don't have an active x-window session for it to draw the interface on. This happens even when I'm logged into the machine locally (so theres a graphical interface available) and then start deluge remotely under the logged in username..

Is there some magic command I can use to force deluge to put its interface on the running x-window session instead of freaking out cos its launched via ssh?

I also realise that there are terminal-based torrent clients, but I'd like to be able to stick with deluge because I already have half-complete torrents in it. It would also be nice to come home, unlock my x-session and have deluge already there..

Hopefully theres a simple solution, thanks in advance for your attention :)
SmashcraB(.org)
smashcrab

Re: Controlling Deluge from terminal

Post by smashcrab »

Alright, never mind, I've figured it out already :oP
Heres how its done if anyone else was wondering the same thing it was just a case of typing an:
"export DISPLAY=:0 && deluge"

I also had to stop it autochecking for new releases (or it would pop up a message asking to upgrade on the remote box, and wouldn't download till it was closed)
Easy fixed .. However I will be checking out the webgui plugin (http://mvoncken.sohosted.com/deluge/) in the near future to avoid doing things this way.

Once again, thanks for the awesome program, and sorry for the useless posts
Post Reply