title: Protractor Chrome with XVFB on OSX
body: <p>I want to run the Protractor E2E Test for my Angular Application on a Bamboo Linux Build Server using XFVB to run Chrome resp. Chromium headless, exactly like in this gist: <a href="https://gist.github.com/nwinkler/f0928740e7ae0e7477dd" rel="nofollow">https://gist.github.com/nwinkler/f0928740e7ae0e7477dd</a>. </p>
  
  <p>But first I wanted to check if it works on the OSX machine I'm developing on. </p>
  
  <p>Question: Is this even possible on OSX and if yes, what am I doing wrong?</p>
  
  <p>In my Gruntfile I have:</p>
  
  <pre><code>grunt.loadNpmTasks('grunt-shell-spawn');
  grunt.loadNpmTasks('grunt-env');
  grunt.loadNpmTasks('grunt-protractor-runner');
  </code></pre>
  
  <p>And:</p>
  
  <pre><code>protractor: {
          options: {
              configFile: "test/protractor.conf.js",
              keepAlive: false
          },
          run: {}
      },
  
      shell: {
          xvfb: {
              command: 'Xvfb :50 -ac -screen 0 1600x1200x24',
              options: {
                  async: true
              }
          }
      },
      env: {
          xvfb: {
              DISPLAY: ':50'
          }
      }
  </code></pre>
  
  <p>And finally:</p>
  
  <pre><code>grunt.registerTask('protractor-xvfb', [
          'clean:server',
          'wiredep',
          'includeSource',
          'concurrent:server',
          'autoprefixer:server',
          'connect:e2e',
          'shell:xvfb',
          'env:xvfb',
          'protractor:run',
          'shell:xvfb:kill'
      ]);
  </code></pre>
  
  <p>(Do not mind the tasks up to shell:xvfb, they work)</p>
  
  <p>And in my protractor.conf.js:</p>
  
  <pre><code>exports.config = {
  framework: 'jasmine2',
  seleniumServerJar: '../node_modules/protractor/selenium/selenium-server-standalone-2.45.0.jar',
  seleniumPort: 4444,
  chromeDriver: '../node_modules/protractor/selenium/chromedriver',
  troubleshoot: false,
  basePath: '../',
  specs: ['protractor/***/**/*.js'],
  baseUrl: 'http://localhost:9000',
  capabilities: {
      browserName: 'chrome'
  }};
  </code></pre>
  
  <p>What this does at the moment is:</p>
  
  <ol>
  <li>Serve the application on localhost:9000</li>
  <li>Start xvfb asychnronuously in the background</li>
  <li>Successfully start a standalone Selenium Server on localhost:4444:wd/hub</li>
  <li>Open a Chrome window and successfully run the test. </li>
  <li>As soon as the test is finished kill the xfvb process. </li>
  </ol>
  
  <p>But I can't see any indices that Selenium actually connects to the xvfb framebuffer.</p>