From bd9f9f6d424d65d0b18ec30a98e8bae1ab8fb3ac Mon Sep 17 00:00:00 2001 From: Jaime Melis Date: Wed, 18 May 2016 18:28:32 +0200 Subject: [PATCH] noVNC is smart about python2 --- src/sunstone/OpenNebulaVNC.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/sunstone/OpenNebulaVNC.rb b/src/sunstone/OpenNebulaVNC.rb index c1629f3700..e0c82c909a 100644 --- a/src/sunstone/OpenNebulaVNC.rb +++ b/src/sunstone/OpenNebulaVNC.rb @@ -148,7 +148,10 @@ class OpenNebulaVNC proxy_options << " -6" end - cmd ="python #{@proxy_path} #{proxy_options} #{@proxy_port}" + system("which python2 >/dev/null 2>&1") + python = $?.success? ? "python2" : "python" + + cmd ="#{python} #{@proxy_path} #{proxy_options} #{@proxy_port}" begin @logger.info { "Starting VNC proxy: #{cmd}" }