def console(domain): if dialogbox.messagebox.execute(gui.res.string_vm_connect_desc % (domain["name"]), dialogbox.DialogBox.OKCANCEL()) != "ok": return False pygame.quit() if os.path.exists("/usr/bin/fbterm"): os.system("/usr/bin/openvt -wsl -- /usr/bin/fbterm -- /usr/sbin/wb xen_console_with_message %s" % domain["name"]) else: os.system("clear") os.system("/usr/bin/openvt -wsl -- /usr/sbin/xl console %s" % domain["name"]) wbui.restart() return True # not reached
def run_app(app): driver = pygame.display.get_driver() pygame.quit() s = system.getSystem() with s.temporaryMount(app["device"]) as tmpdir: with s.temporaryMount("/dev", "%s/dev" % (tmpdir), "bind"): with s.temporaryMount("/proc", "%s/proc" % (tmpdir), "bind"): cmdline = ("wb", "sandbox", "-r", tmpdir) if driver == "x11" else ("openvt", "-sw", "--", "wb", "sandbox", "-r", tmpdir) subprocess.Popen(cmdline, shell=False, close_fds=True).wait() wbui.restart()
def console(domain): if dialogbox.messagebox.execute( gui.res.string_vm_connect_desc % (domain["name"]), dialogbox.DialogBox.OKCANCEL()) != "ok": return False pygame.quit() if os.path.exists("/usr/bin/fbterm"): os.system( "/usr/bin/openvt -wsl -- /usr/bin/fbterm -- /usr/sbin/wb xen_console_with_message %s" % domain["name"]) else: os.system("clear") os.system("/usr/bin/openvt -wsl -- /usr/sbin/xl console %s" % domain["name"]) wbui.restart() return True # not reached