vncserver: use IP when printing browser url

KASM-1609_select_de_to_run
Dmitry Maksyoma 4 years ago
parent 1bda8ab452
commit e3a41bc055

@ -1096,6 +1096,7 @@ sub DefineFilePathsAndStuff {
"# alwaysshared\n"); "# alwaysshared\n");
chop($host = `uname -n`); chop($host = `uname -n`);
chop($hostIP = `hostname -i`);
&DetectFontPath(); &DetectFontPath();
} }
@ -1204,11 +1205,11 @@ sub IsAllInterfaces {
} }
sub DeduceBrowserHost { sub DeduceBrowserHost {
my $browserHost = $host; my $browserHost;
my $interface = $opt{"-interface"} || $default_opts{interface}; my $interface = $opt{"-interface"} || $default_opts{interface};
if (IsAllInterfaces($interface)) { if (IsAllInterfaces($interface)) {
$browserHost = $host; $browserHost = $hostIP;
} else { } else {
$browserHost = $interface; $browserHost = $interface;
} }

Loading…
Cancel
Save