'Run a new process (in most cases one that will open an X window) within
the xvfb instance.
:param cmd: The command to run.
:param block: If block is True this method blocks until the command
finishes, if not, the method returns immediately which
might lead to issues because of windows not being ready
yet inside the xvfb and checks being run on them.
:return: True if the process was run. Please note that the method will
return True for commands that do not exist, fail, etc.'

def run_x_process(self, cmd, block=False, display=DISPLAY):

    if (not self.is_running()):
        return False
    display_cmd = ('DISPLAY=%s    %s' % (display, cmd))
    if block:
        commands.getoutput(display_cmd)
    else:
        args = (display_cmd,)
        th = threading.Thread(target=commands.getoutput, args=args)
        th.daemon = True
        th.name = 'XvfbProcess'
        th.start()
    return True
