如何在 github 代码空间中启用 gui 应用程序?

smd*_*dbh 6 x11 user-interface visual-studio-code codespaces

一些 opencv 代码在执行时需要显示 GUI 窗口。相反,它显示Gtk-WARNING **: xxx: cannot open display:. 它发生在网络和桌面应用程序中。是否可以使用 x11 转发之类的功能来启用此功能?谢谢。

小智 3

使用 x11 转发。

在代码空间上,默认启用 ssh X11 转发。只需确保安装xauth软件包,然后使用gh cs ssh -- -X.