vncserver: use IP when printing browser url

This commit is contained in:
Dmitry Maksyoma
2021-10-09 18:59:53 +13:00
parent 1bda8ab452
commit e3a41bc055

View File

@@ -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;
} }