Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gelencsér Szabolcs
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
483d0f44
authored
Feb 10, 2013
by
tarokkk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
laborgui: Fixed rdesktop
parent
045b5b30
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
miscellaneous/laborclient/cloudgui/gui.py
+2
-3
miscellaneous/laborclient/cloudgui/rdp.py
+5
-2
No files found.
miscellaneous/laborclient/cloudgui/gui.py
View file @
483d0f44
...
@@ -135,8 +135,7 @@ class Browser:
...
@@ -135,8 +135,7 @@ class Browser:
try
:
try
:
scheme
,
rest
=
uri
.
split
(
":"
,
1
)
scheme
,
rest
=
uri
.
split
(
":"
,
1
)
if
scheme
==
"nx"
or
scheme
==
"rdp"
or
scheme
==
"sshterm"
:
if
scheme
==
"nx"
or
scheme
==
"rdp"
or
scheme
==
"sshterm"
:
connection
=
rdp
.
RDP
(
uri
)
subprocess
.
Popen
([
"/usr/local/bin/rdp"
,
uri
])
Process
(
target
=
connection
.
connect
)
.
start
()
return
True
return
True
elif
scheme
==
"cloudfile"
:
elif
scheme
==
"cloudfile"
:
file_path
=
os
.
path
.
normpath
(
rest
)
file_path
=
os
.
path
.
normpath
(
rest
)
...
@@ -153,7 +152,7 @@ class Browser:
...
@@ -153,7 +152,7 @@ class Browser:
try
:
try
:
os
.
makedirs
(
self
.
folder
)
os
.
makedirs
(
self
.
folder
)
except
:
except
:
p
rint
"Error"
p
ass
result
=
subprocess
.
call
([
'/usr/bin/sshfs'
,
'-o'
,
'IdentityFile='
+
self
.
private_key_file
+
',StrictHostKeyChecking=no'
,
neptun
+
"@"
+
host
+
":home"
,
self
.
folder
])
result
=
subprocess
.
call
([
'/usr/bin/sshfs'
,
'-o'
,
'IdentityFile='
+
self
.
private_key_file
+
',StrictHostKeyChecking=no'
,
neptun
+
"@"
+
host
+
":home"
,
self
.
folder
])
#print result
#print result
def
umount_sshfs_folder
(
self
):
def
umount_sshfs_folder
(
self
):
...
...
miscellaneous/laborclient/cloudgui/rdp.py
View file @
483d0f44
...
@@ -53,8 +53,11 @@ class RDP:
...
@@ -53,8 +53,11 @@ class RDP:
rdp_command
=
[
"rdesktop"
,
"-khu"
,
"-E"
,
"-P"
,
"-0"
,
"-f"
,
"-u"
,
self
.
username
,
"-p"
,
self
.
password
,
self
.
host
+
":"
+
self
.
port
]
rdp_command
=
[
"rdesktop"
,
"-khu"
,
"-E"
,
"-P"
,
"-0"
,
"-f"
,
"-u"
,
self
.
username
,
"-p"
,
self
.
password
,
self
.
host
+
":"
+
self
.
port
]
try
:
try
:
proc
=
subprocess
.
check_call
(
rdp_command
,
stdout
=
subprocess
.
PIPE
)
proc
=
subprocess
.
check_call
(
rdp_command
,
stdout
=
subprocess
.
PIPE
)
except
:
except
subprocess
.
CalledProcessError
as
e
:
self
.
dialog_box
(
"Unable to connect to host: "
+
self
.
host
+
" at port "
+
self
.
port
)
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
):
def
connect_nx
(
self
):
#Generate temproary config
#Generate temproary config
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment