blob: 0a8c696c6bdba4aad465f23f9f2bc9bc6b799379 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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()
|