6

Some opencv code needs to show a GUI window when executing. Instead it shows Gtk-WARNING **: xxx: cannot open display:. It happened both on the web and in the desktop app. Is it possible to use something like x11 forwarding to enable this feature? Thanks.

Dave Mackey
  • 4,306
  • 21
  • 78
  • 136
smdbh
  • 71
  • 3

2 Answers2

3

Use x11 forwarding.

On the codespaces, ssh X11 forwarding is enabled by default. Just make sure to install xauth package, then connect to codespaces use gh cs ssh -- -X.

3

Goose's answer almost worked for me. I had to use gh cs ssh -- -XY.

Dave Mackey
  • 4,306
  • 21
  • 78
  • 136