Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Projets publics
Ravada-Mirror
Commits
6dc8fd65
Commit
6dc8fd65
authored
Jul 24, 2019
by
Francesc Guasch
Browse files
wip(screen): display x2go and spice screens
issue #1043
parent
b209481c
Changes
4
Hide whitespace changes
Inline
Side-by-side
lib/Ravada/Front/Domain.pm
View file @
6dc8fd65
...
@@ -231,6 +231,11 @@ sub _get_controller_screen_type($self, $type) {
...
@@ -231,6 +231,11 @@ sub _get_controller_screen_type($self, $type) {
$info
->
{
driver
}
=
$type
;
$info
->
{
driver
}
=
$type
;
$info
->
{
name
}
=
$info
->
{
driver
};
$info
->
{
name
}
=
$info
->
{
driver
};
$info
->
{
file_extension
}
=
$type
;
$info
->
{
file_extension
}
=
$type
;
my
$content_type
=
"
application/x-
$type
";
$content_type
=
"
application/x-x2goclient
"
if
$type
eq
'
x2go
';
$info
->
{
content_type
}
=
$content_type
;
lock_hash
(
%$info
);
lock_hash
(
%$info
);
return
(
$info
);
return
(
$info
);
...
...
lib/Ravada/Front/Domain/KVM.pm
View file @
6dc8fd65
...
@@ -123,6 +123,7 @@ sub _get_controller_screen_spice($self) {
...
@@ -123,6 +123,7 @@ sub _get_controller_screen_spice($self) {
,
ip
=>
$address
,
ip
=>
$address
,
display
=>
$display
,
display
=>
$display
,
tls_port
=>
$tls_port
,
tls_port
=>
$tls_port
,
content_type
=>
'
application/x-virt-viewer
'
,
file_extension
=>
'
vv
'
,
file_extension
=>
'
vv
'
);
);
...
...
rvd_front.pl
View file @
6dc8fd65
...
@@ -679,13 +679,28 @@ get '/machine/display/(:type)/(:id).(:ext)' => sub {
...
@@ -679,13 +679,28 @@ get '/machine/display/(:type)/(:id).(:ext)' => sub {
if
$USER
->
id
ne
$domain
->
id_owner
if
$USER
->
id
ne
$domain
->
id_owner
&&
!
$USER
->
is_admin
;
&&
!
$USER
->
is_admin
;
# $c->res->headers->content_type('application/'.$c->stash('type'));
# $c->res->headers->content_disposition(
# "inline;filename=".$domain->id.".".$c->stash('ext'));
# return $c->render(data => $domain->display_file($USER,$c->stash('type')));
# return $c->render(data => $domain->display_file($USER,$c->stash('type')));
my
$type
=
$c
->
stash
('
type
');
my
$type
=
$c
->
stash
('
type
');
return
$c
->
render
(
template
=>
'
templates/display/
'
.
$type
);
$type
=~
s/-tls$//
;
warn
$type
;
my
$info
=
$domain
->
info
(
$USER
);
my
(
$screen
)
=
grep
{
$_
->
{
driver
}
eq
$type
}
@
{
$info
->
{
hardware
}
->
{
screen
}};
# $c->res->headers->content_type('application/x-virt-viewer');
$c
->
res
->
headers
->
content_type
(
$screen
->
{
content_type
});
$c
->
res
->
headers
->
content_disposition
(
"
inline;filename=
"
.
$domain
->
id
.
"
.
"
.
$c
->
stash
('
ext
'));
my
$tls_port
;
$tls_port
=
$screen
->
{
tls_port
}
if
exists
$screen
->
{
tls_port
};
return
$c
->
render
(
template
=>
'
/display/
'
.
$type
,
format
=>
$c
->
stash
('
ext
')
,
ip
=>
$screen
->
{
ip
}
,
port
=>
$screen
->
{
port
}
,
tls_port
=>
$tls_port
,
name
=>
$domain
->
name
);
};
};
get
'
/machine/display/(:id).vv
'
=>
sub
{
get
'
/machine/display/(:id).vv
'
=>
sub
{
...
...
templates/display/x2go.txt.ep
deleted
100644 → 0
View file @
b209481c
[blablabla]
speed=3
pack=2m-jpeg
quality=8
fullscreen=true
multidisp=false
display=1
maxdim=false
width=800
height=600
dpi=96
setdpi=true
xinerama=false
clipboard=both
usekbd=true
type=auto
sshport=5952
sound=true
soundsystem=pulse
startsoundsystem=true
soundtunnel=true
name=mint
host=10.1.36.68
user=
rootless=false
published=false
command=XFCE
usesshproxy=false
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