diff options
-rw-r--r-- | plugins/Makefile.am | 2 | ||||
-rw-r--r-- | plugins/gconfterminal.py (renamed from plugins/gnometerminal.py) | 21 |
2 files changed, 13 insertions, 10 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am index 37902fb..772cd8b 100644 --- a/plugins/Makefile.am +++ b/plugins/Makefile.am @@ -1,7 +1,7 @@ pluginsdir = $(PLUGINSDIR) plugins_DATA = \ - gnometerminal.py \ + gconfterminal.py \ nautilus.py diff --git a/plugins/gnometerminal.py b/plugins/gconfterminal.py index 306173f..54d8961 100644 --- a/plugins/gnometerminal.py +++ b/plugins/gconfterminal.py @@ -25,6 +25,7 @@ try: import os import pwd import subprocess + import gconf import gnome except ImportError, e: error_msg(_("A required python module is missing!\n%s") % (e)) @@ -96,9 +97,14 @@ class plugin_gnometerminal: return store def connect(self, use_host_names, name, stype, hostname, address, port, txts): + try: + terminal = gconf.client_get_default().get_string ("/desktop/gnome/applications/terminal/exec") + terminal = terminal + " " + gconf.client_get_default().get_string ("/desktop/gnome/applications/terminal/exec_arg") + except: + terminal = "gnome-terminal -x" if use_host_names == True: address = hostname - print "connecting using gnometerminal" + print "connecting using %s" % (terminal) if txts.has_key("u"): username = self.SshLogin(name, txts["u"]) else: @@ -106,21 +112,18 @@ class plugin_gnometerminal: if stype == "_ssh._tcp": - scheme = "ssh" + scheme = "ssh -X" else: scheme = "sftp" if username == None: return elif username != "": - sshline = "%s -X -p %i %s@%s" % (scheme, port, username, address) + sshline = "%s -p %i %s@%s" % (scheme, port, username, address) else: - sshline = "%s -X -p %i %s " % (scheme, port, address) + sshline = "%s -p %i %s " % (scheme, port, address) - cmdline = [] - cmdline.append("gnome-terminal") - cmdline.append("--tab") - cmdline.append("-t %s" % name) - cmdline.append("-e %s" % sshline) + cmdline = terminal.split(" ") + cmdline.extend(sshline.split(" ")) print cmdline pid = subprocess.Popen(cmdline).pid |