主文件支持调用qemu chroot

This commit is contained in:
2022-12-02 22:13:42 +08:00
parent fb0ff07ad6
commit 9fdc3a998c
3 changed files with 73 additions and 24 deletions

View File

@@ -23,5 +23,4 @@ if __name__ == "__main__":
if not os.path.ismount(f"{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/proc"):
print("文件暂未挂载,开始挂载")
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY bash '{programPath}/Mount.sh' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}' '{userName}' {commandList}"))
#print(f"pkexec chroot '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/' {commandList}")
sys.exit(os.system(f"pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY chroot '--userspec={userName}:{userName}' '{homePath}/.deepin-wine-runner-ubuntu-images/{sys.argv[1]}/' env DISPLAY=:0.0 {commandList}"))