def _launch(self):
        XulRuntime._app_count += 1

        self._check_compat()

        # Temp folder to store app files
        app_path = create_temp_app_dir('xul', str(XulRuntime._app_count))
        id = op.basename(app_path).split('_', 1)[1]

        # Set size and position
        size = self._kwargs.get('size', (640, 480))
        pos = self._kwargs.get('pos', None)
        windowfeatures = 'resizable,'
        windowfeatures += 'width=%i, height=%i' % (size[0], size[1])
        if pos:
            windowfeatures += ', top=%i, left=%i' % (pos[0], pos[1])

        # More preparing
        self._kwargs['title'] = self._kwargs.get('title', 'XUL runtime')

        # Create files for app
        self._create_xul_app(app_path, id, windowfeatures=windowfeatures,
                             **self._kwargs)

        # Get executable for xul runtime (may be None)
        xul_exe = self._get_xul_runtime()

        # Get the command to execute
        exe = None
        if xul_exe and op.isfile(op.realpath(xul_exe)):
            exe = self._get_app_exe(xul_exe, app_path)
        else:
            # See if we can use firefox command, Firefox may be
            # available even though we failed to find it.
            try:
                subprocess.check_output(['firefox', '--version'])
                exe = 'firefox'
            except Exception:
                pass

        # Final check
        if exe is None:
            raise RuntimeError('Could not find XUL runtime. '
                               'Please install firefox.')

        # Launch
        cmd = [exe, '-app', op.join(app_path, 'application.ini')]
        #cmd.append('-jsconsole')  # for debugging
        self._start_subprocess(cmd)
dataset/ETHPy150Open zoofIO/flexx/flexx/webruntime/xul.py/XulRuntime._launch/original