Commit 343a8dff authored by Dietmar Maurer's avatar Dietmar Maurer

set correct locale environment when running spiceterm

parent 4ad6cd28
...@@ -167,12 +167,15 @@ sub run_spiceterm { ...@@ -167,12 +167,15 @@ sub run_spiceterm {
eval { eval {
foreach my $k (keys %ENV) { foreach my $k (keys %ENV) {
next if $k eq 'PATH' || $k eq 'TERM' || $k eq 'USER' || $k eq 'HOME'; next if $k eq 'PATH' || $k eq 'TERM' || $k eq 'USER' || $k eq 'HOME' || $k eq 'LANG' || $k eq 'LANGUAGE' ;
delete $ENV{$k}; delete $ENV{$k};
} }
$ENV{PWD} = '/'; $ENV{PWD} = '/';
$ENV{SPICE_TICKET} = $ticket; $ENV{SPICE_TICKET} = $ticket;
PVE::Tools::run_command($cmd, errmsg => "spiceterm failed");
# run_command sets LC_ALL, so we use system() instead
system(@$cmd) == 0 ||
die "spiceterm failed\n";
}; };
if (my $err = $@) { if (my $err = $@) {
syslog ('err', $err); syslog ('err', $err);
......
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 to comment