Commit 483d0f44 by tarokkk

laborgui: Fixed rdesktop

parent 045b5b30
......@@ -135,8 +135,7 @@ class Browser:
try:
scheme, rest = uri.split(":", 1)
if scheme == "nx" or scheme == "rdp" or scheme == "sshterm":
connection = rdp.RDP(uri)
Process(target=connection.connect).start()
subprocess.Popen(["/usr/local/bin/rdp",uri])
return True
elif scheme == "cloudfile":
file_path = os.path.normpath(rest)
......@@ -153,7 +152,7 @@ class Browser:
try:
os.makedirs(self.folder)
except:
print "Error"
pass
result = subprocess.call(['/usr/bin/sshfs', '-o', 'IdentityFile='+self.private_key_file+',StrictHostKeyChecking=no', neptun+"@"+host+":home", self.folder])
#print result
def umount_sshfs_folder(self):
......
......@@ -53,8 +53,11 @@ class RDP:
rdp_command = ["rdesktop", "-khu", "-E", "-P", "-0", "-f", "-u", self.username, "-p", self.password, self.host+":"+self.port]
try:
proc = subprocess.check_call(rdp_command, stdout = subprocess.PIPE)
except:
self.dialog_box("Unable to connect to host: "+self.host+" at port "+self.port)
except subprocess.CalledProcessError as e:
if e.returncode != 1:
print e
print e.returncode
self.dialog_box("Unable to connect to host: "+self.host+" at port "+self.port)
def connect_nx(self):
#Generate temproary config
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment