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}" }