Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pve-manager
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
pve-manager
Commits
e480871a
Commit
e480871a
authored
Dec 10, 2013
by
Dietmar Maurer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
set correct keymap for spiceterm
parent
dec02612
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
11 deletions
+20
-11
Nodes.pm
PVE/API2/Nodes.pm
+6
-1
OpenVZ.pm
PVE/API2/OpenVZ.pm
+14
-10
No files found.
PVE/API2/Nodes.pm
View file @
e480871a
...
...
@@ -856,7 +856,12 @@ __PACKAGE__->register_method ({
my
$cmd
=
['
/usr/bin/spiceterm
',
'
--port
',
$port
,
'
--addr
',
'
127.0.0.1
',
'
--timeout
',
$timeout
,
'
--authpath
',
$authpath
,
'
--permissions
',
'
Sys.Console
',
'
--
',
@$shcmd
];
'
--permissions
',
'
Sys.Console
'];
my
$dcconf
=
PVE::Cluster::
cfs_read_file
('
datacenter.cfg
');
push
@$cmd
,
'
--keymap
',
$dcconf
->
{
keyboard
}
if
$dcconf
->
{
keyboard
};
push
@$cmd
,
'
--
',
@$shcmd
;
my
$realcmd
=
sub
{
my
$upid
=
shift
;
...
...
PVE/API2/OpenVZ.pm
View file @
e480871a
...
...
@@ -965,18 +965,26 @@ __PACKAGE__->register_method ({
my
$remip
;
my
$shcmd
=
[
'
/usr/bin/dtach
',
'
-A
',
"
/var/run/dtach/vzctlconsole
$vmid
",
'
-r
',
'
winch
',
'
-z
',
'
/usr/sbin/vzctl
',
'
console
',
$vmid
];
my
$timeout
=
10
;
my
$cmd
=
['
/usr/bin/spiceterm
',
'
--port
',
$port
,
'
--addr
',
'
127.0.0.1
',
'
--timeout
',
$timeout
,
'
--authpath
',
$authpath
,
'
--permissions
',
'
VM.Console
'];
my
$dcconf
=
PVE::Cluster::
cfs_read_file
('
datacenter.cfg
');
push
@$cmd
,
'
--keymap
',
$dcconf
->
{
keyboard
}
if
$dcconf
->
{
keyboard
};
push
@$cmd
,
'
--
',
'
/usr/bin/dtach
',
'
-A
',
"
/var/run/dtach/vzctlconsole
$vmid
",
'
-r
',
'
winch
',
'
-z
',
'
/usr/sbin/vzctl
',
'
console
',
$vmid
;
my
$realcmd
=
sub
{
my
$upid
=
shift
;
syslog
('
info
',
"
starting openvz vnc proxy
$upid
\n
");
my
$timeout
=
10
;
eval
{
foreach
my
$k
(
keys
%
ENV
)
{
next
if
$k
eq
'
PATH
'
||
$k
eq
'
TERM
'
||
$k
eq
'
USER
'
||
$k
eq
'
HOME
';
...
...
@@ -985,10 +993,6 @@ __PACKAGE__->register_method ({
$ENV
{
PWD
}
=
'
/
';
$ENV
{
SPICE_TICKET
}
=
$ticket
;
my
$cmd
=
['
/usr/bin/spiceterm
',
'
--port
',
$port
,
'
--addr
',
'
127.0.0.1
',
'
--timeout
',
$timeout
,
'
--authpath
',
$authpath
,
'
--permissions
',
'
VM.Console
',
'
--
',
@$shcmd
];
run_command
(
$cmd
,
errmsg
=>
"
spiceterm failed
");
};
if
(
my
$err
=
$@
)
{
...
...
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