From e3a41bc055a05c42ff44fec9b5bc39e5a97f5177 Mon Sep 17 00:00:00 2001 From: Dmitry Maksyoma Date: Sat, 9 Oct 2021 18:59:53 +1300 Subject: [PATCH] vncserver: use IP when printing browser url --- unix/vncserver | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/unix/vncserver b/unix/vncserver index 67b1604..a5bb1ab 100755 --- a/unix/vncserver +++ b/unix/vncserver @@ -1096,6 +1096,7 @@ sub DefineFilePathsAndStuff { "# alwaysshared\n"); chop($host = `uname -n`); + chop($hostIP = `hostname -i`); &DetectFontPath(); } @@ -1204,11 +1205,11 @@ sub IsAllInterfaces { } sub DeduceBrowserHost { - my $browserHost = $host; + my $browserHost; my $interface = $opt{"-interface"} || $default_opts{interface}; if (IsAllInterfaces($interface)) { - $browserHost = $host; + $browserHost = $hostIP; } else { $browserHost = $interface; }