summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Estienne <sebastien.estienne@gmail.com>2006-03-27 16:10:25 +0000
committerSebastien Estienne <sebastien.estienne@gmail.com>2006-03-27 16:10:25 +0000
commitcc7c428801b8cd385ae4669bfabe7966d107fbe0 (patch)
tree0dcffb0132485d5361319ac20acfbeebbfc8f6b1
parent56a64f6c3b4bb43e88f6199ffa1614dbb9b0242f (diff)
adding xvncviewer plugin
git-svn-id: file:///home/lennart/svn/public/service-discovery-applet/trunk@101 3be567f1-68ff-0310-b24a-ad7cc433fd2f
-rw-r--r--plugins/Makefile.am1
-rw-r--r--plugins/xvncviewer.py33
2 files changed, 34 insertions, 0 deletions
diff --git a/plugins/Makefile.am b/plugins/Makefile.am
index 1780573..d0b4e7b 100644
--- a/plugins/Makefile.am
+++ b/plugins/Makefile.am
@@ -3,6 +3,7 @@ pluginsdir = $(PLUGINSDIR)
plugins_DATA = \
gconfterminal.py \
nautilus.py \
+ xvncviewer.py \
ekiga.py
diff --git a/plugins/xvncviewer.py b/plugins/xvncviewer.py
new file mode 100644
index 0000000..0a8c696
--- /dev/null
+++ b/plugins/xvncviewer.py
@@ -0,0 +1,33 @@
+# -*- coding: UTF-8 -*-
+# -*- python -*-
+# Copyright (C) 2006 by Sebastien Estienne
+#
+# This file may be distributed and/or modified under the terms of
+# the GNU General Public License version 2 as published by
+# the Free Software Foundation.
+# This file is distributed without any warranty; without even the implied
+# warranty of merchantability or fitness for a particular purpose.
+# See "COPYING" in the source distribution for more information.
+#
+# $id$
+#
+
+from sdapplet.pluginutils import *
+import subprocess
+
+class plugin_xvncviewer:
+ def __init__(self):
+ self.service_type = ["_rfb._tcp"]
+ self.author = "Sebastien Estienne"
+ self.description = "Start a VNC connections with xvncviewer"
+
+ def connect(self, use_host_names, name, stype, hostname, address, port, txts):
+ if use_host_names == True:
+ address = hostname
+ print "connecting using xvncviewer"
+ cmdline = ["xvncviewer", "-xrm", "*passwordDialog:true", hostname, "&"]
+ print cmdline
+ pid = subprocess.Popen(cmdline, shell=True, close_fds=True).pid
+
+def load():
+ return plugin_xvncviewer()