I opened an x11 file in cocalc docker and ran a pygame python file in the x11 terminal. However, it keeps saying "pygame.error: No available video device." I know that the reason this error might have occurred is because the pygame file does not know where to display the graphics, and I also know that the $DISPLAY variable is related to where to display. However, I don't know what to set $DISPLAY to, or if I am even supposed to do this. How can I show pygame graphics on cocalc and make sure the pygame file finds the x11 display?
Asked
Active
Viewed 60 times
1
-
1Does this answer your question? [Can you run GUI applications in a Docker container?](https://stackoverflow.com/questions/16296753/can-you-run-gui-applications-in-a-docker-container) – jordanvrtanoski Mar 17 '21 at 06:05
-
1You need to have X11 session, either locally, or trough an SSH tunnel. The qustion I have linked is explaining how to do both things. Try it firs and if it doesn't work, explain what you are doing and provide minimum reproducible example as part of your question – jordanvrtanoski Mar 17 '21 at 06:07
-
I can't use "docker" commands because I don't own the docker. The cocalc docker is owned by my college and I can only access the python files I make within the docker, and the x11 file I make, including the terminal within the x11 file. – Rohan Mar 17 '21 at 12:29