Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
client
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
1
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
2ef79576
authored
Mar 03, 2025
by
Szeberényi Imre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--notray-icon fix
parent
2251f4d6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
circle_client
+7
-6
No files found.
circle_client
View file @
2ef79576
...
@@ -26,11 +26,12 @@ loghandler.setFormatter(logformatter)
...
@@ -26,11 +26,12 @@ loghandler.setFormatter(logformatter)
logger
.
addHandler
(
loghandler
)
logger
.
addHandler
(
loghandler
)
def
remina_password
(
pw
):
def
remina_password
(
pw
):
args
=
[
"remmina"
,
"--encrypt-password"
,
"--no-tray-icon"
]
args
=
[
"remmina"
,
"--encrypt-password"
]
process
=
subprocess
.
run
(
args
,
input
=
pw
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
DEVNULL
,
encoding
=
"utf-8"
,
timeout
=
5
)
process
=
subprocess
.
run
(
args
,
input
=
pw
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
DEVNULL
,
encoding
=
"utf-8"
,
timeout
=
5
)
b
=
process
.
stdout
.
find
(
"Encrypted password:"
)
b
=
process
.
stdout
.
find
(
"Encrypted password:"
)
process
.
stdout
[
b
::]
.
split
()
if
b
>=
0
:
return
process
.
stdout
[
198
::]
.
split
()[
2
]
return
process
.
stdout
[
b
::]
.
split
()[
2
]
logger
.
error
(
"Cannot run remmina:
%
s"
%
process
.
stdout
)
def
connect
(
vm
):
def
connect
(
vm
):
"""
"""
...
@@ -56,7 +57,7 @@ def connect(vm):
...
@@ -56,7 +57,7 @@ def connect(vm):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
elif
vm
.
protocol
in
(
"NX"
,
"RDP"
):
password
=
remina_password
(
vm
.
password
)
password
=
remina_password
(
vm
.
password
)
if
vm
.
protocol
==
"RDP"
:
if
vm
.
protocol
==
"RDP"
:
command
=
(
"remmina
--no-tray-icon
"
command
=
(
"remmina"
" -c rdp://
%(user)
s:
%(password)
s@
%(host)
s:
%(port)
s"
%
{
" -c rdp://
%(user)
s:
%(password)
s@
%(host)
s:
%(port)
s"
%
{
'user'
:
vm
.
user
,
'user'
:
vm
.
user
,
'password'
:
password
,
'password'
:
password
,
...
@@ -64,7 +65,7 @@ def connect(vm):
...
@@ -64,7 +65,7 @@ def connect(vm):
'port'
:
vm
.
port
,
'port'
:
vm
.
port
,
})
})
else
:
else
:
command
=
(
"remmina
--no-tray-icon"
command
=
(
"remmina
"
" -c rdp://
%(user)
s:
%(password)
s@
%(host)
s:
%(port)
s"
%
{
" -c rdp://
%(user)
s:
%(password)
s@
%(host)
s:
%(port)
s"
%
{
'user'
:
vm
.
user
,
'user'
:
vm
.
user
,
'password'
:
password
,
'password'
:
password
,
...
@@ -72,7 +73,7 @@ def connect(vm):
...
@@ -72,7 +73,7 @@ def connect(vm):
'port'
:
vm
.
port
,
'port'
:
vm
.
port
,
})
})
logger
.
debug
(
"Running: s"
,
command
)
logger
.
debug
(
"Running: s"
,
command
)
subprocess
.
call
(
command
,
shell
=
True
)
subprocess
.
call
(
command
.
split
()
)
class
Struct
:
class
Struct
:
...
...
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