parameters: (self)
docstring: Start Xvfb and set an appropriate DISPLAY environment.  Linux only.
  
      Copied from tools/code_coverage/coverage_posix.py
docstring_summary: Start Xvfb and set an appropriate DISPLAY environment.  Linux only.
docstring_tokens: Start Xvfb and set an appropriate DISPLAY environment . Linux only .
function: def Start(self):
      """Start Xvfb and set an appropriate DISPLAY environment.  Linux only.
  
      Copied from tools/code_coverage/coverage_posix.py
      """
      if not _IsLinux():
        return
      proc = subprocess.Popen(['Xvfb', ':9', '-screen', '0', '1024x768x24',
                               '-ac'],
                              stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
      self._pid = proc.pid
      if not self._pid:
        raise Exception('Could not start Xvfb')
      os.environ['DISPLAY'] = ':9'
  
      # Now confirm, giving a chance for it to start if needed.
      for _ in range(10):
        proc = subprocess.Popen('xdpyinfo >/dev/null', shell=True)
        _, retcode = os.waitpid(proc.pid, 0)
        if retcode == 0:
          break
        time.sleep(0.25)
      if retcode != 0:
        raise Exception('Could not confirm Xvfb happiness')
function_tokens: def Start ( self ) : if not _IsLinux ( ) : return proc = subprocess . Popen ( [ 'Xvfb' , ':9' , '-screen' , '0' , '1024x768x24' , '-ac' ] , stdout = subprocess . PIPE , stderr = subprocess . STDOUT ) self . _pid = proc . pid if not self . _pid : raise Exception ( 'Could not start Xvfb' ) os . environ [ 'DISPLAY' ] = ':9' # Now confirm, giving a chance for it to start if needed. for _ in range ( 10 ) : proc = subprocess . Popen ( 'xdpyinfo >/dev/null' , shell = True ) _ , retcode = os . waitpid ( proc . pid , 0 ) if retcode == 0 : break time . sleep ( 0.25 ) if retcode != 0 : raise Exception ( 'Could not confirm Xvfb happiness' )