title: Problems with Startup script - Compute Engine
body: <p>I need to run a jar file when my <em>Ubuntu 16.04</em> instance on GCP is ON. So I add a custom metadata:</p>
  
  <p><a href="https://i.stack.imgur.com/LKySK.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LKySK.png" alt="enter image description here"></a></p>
  
  <p>but It's not working. </p>
  
  <p>For testings, I have tried to generate files every time I turn off and on the VM, and startup script compiles them successfully. </p>
  
  <p><strong>EDITED</strong>: If I run this command from shell, it runs succesfully and port 4444 is opened. </p>
  
  <p>Furthermore, the startup script ignores <code>xvfb</code> for the following example, but
  <em>fuego_vins.txt</em> and <em>fuego_vins_exit.txt</em> are deposited on /usr/bin:</p>
  
  <pre><code>#! /bin/bash
  sudo touch /usr/bin/fuego_vins.txt
  sudo apt-get update
  sudo xvfb-run -a java -Dwebdriver.chrome.driver=/usr/bin/chromedriver -jar selenium-server-standalone-3.13.0.jar -port 4444
  sudo touch /usr/bin/fuego_vins_exit.txt
  </code></pre>