Commit 7f44caa1 by tarokkk

laborgui: Added desktop file

parent 9a77d029
[Desktop Entry]
Version=0.1
Name=Cloud GUI
Comment=Tool to use IK Cloud
Exec=cloud
Icon=/usr/share/icons/cloud-gui.jpg
Terminal=false
Type=Application
Categories=Utility;Application;
...@@ -60,6 +60,7 @@ class KeyGen: ...@@ -60,6 +60,7 @@ class KeyGen:
class Browser: class Browser:
version = "0.1" version = "0.1"
mounted = False
neptun = "" neptun = ""
host = "" host = ""
private_key_file = "" private_key_file = ""
...@@ -129,6 +130,10 @@ class Browser: ...@@ -129,6 +130,10 @@ class Browser:
connection = rdp.RDP(uri) connection = rdp.RDP(uri)
Process(target=connection.connect).start() Process(target=connection.connect).start()
return True return True
elif scheme == "cloudfile":
file_path = os.path.normpath(rest)
subprocess.call(["xdg-open","file://"+self.folder+file_path])
return True
else: else:
return False return False
except: except:
...@@ -182,6 +187,7 @@ class Browser: ...@@ -182,6 +187,7 @@ class Browser:
self.post_key(self.public_key_b64) self.post_key(self.public_key_b64)
### Parse values and do mounting ### ### Parse values and do mounting ###
elif uri.startswith("https://cloud.ik.bme.hu/?"): elif uri.startswith("https://cloud.ik.bme.hu/?"):
if self.mounted != True:
try: try:
uri, params = uri.split('?', 1) uri, params = uri.split('?', 1)
values = params.split('&') values = params.split('&')
...@@ -192,6 +198,7 @@ class Browser: ...@@ -192,6 +198,7 @@ class Browser:
self.mount_sshfs_folder() self.mount_sshfs_folder()
except Exception as e: except Exception as e:
print e print e
self.mounted = True
except: except:
pass pass
finally: finally:
......
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