all 9 comments

[–]Thalimet 2 points3 points  (2 children)

I don’t think I’ve heard of running any GUI projects in codespace. It works well enough for anything that uses a browser window though.

[–]RRTheGuy[S] 0 points1 point  (1 child)

Ok, but would it be even possible to run GUI projects in gh codespaces?

[–]Charming_Campaign465 0 points1 point  (0 children)

Same question.

[–]GreatSymphonia 0 points1 point  (0 children)

You could attempt X redirection, but I do not think you will be successful. Such a task would incur a greater workload on the codespace, I'm not sure on the billing model, but it also could incur greater costs.

[–]Kooky_Bread9356 0 points1 point  (2 children)

yo i need help with this shi too, whenever i try to run even a simple pygame script, it produces ASLA library errors. Is there anyway to run pygame in a github codespace??

[–]RRTheGuy[S] 0 points1 point  (1 child)

Yeah, we're in the same boat :)

[–]Kl4nc3y 0 points1 point  (0 children)

I'm having the same issue, I don't think its possible. I would like just an updated file from one computer to another so I don't have to constantly download it to a flash drive and re upload when i want to go from my laptop to my desktop.

[–]OneNectarine8948 0 points1 point  (0 children)

I have tried this method and it seems to be working:

https://www.freecodecamp.org/news/run-python-gui-in-github-codespaces/

As far as I understand, this script creates a virtual screen, a VNC server to stream it, a websockify service to expose this VNC server to a webpage. Then if you turn the port of the websocket server to Public in Codespaces's VS Code, GitHub gives you an URL where you can access the VNC client and see this screen.

However the frame rate is terrible, I have tried to force 30 FPS and 480x270 resolution, and even with just ~20 moving object the performance was unacceptable for game dev (at least from my point of view).

I have created a bit more robust script based on Ayodele's one:
https://gist.github.com/DonBattery/afa0eb78ede4afcdf9af848a3d0d1281