[CSC 315] Running Linux/OpenGL under Windows
Andrew J. Pounds
pounds at sandbox.mercer.edu
Sat Sep 24 08:02:53 EDT 2022
I have not tested this on Windows (I will later this week) - but others
in the class have confirmed that this works on Windows to get an OpenGL
programming installation working.
Thanks to Nolan for working this out. Please address questions about it
to him.
-------- Forwarded Message --------
Subject: CSC315 Stuff Now Working In Windows/WSL
Date: Thu, 15 Sep 2022 13:18:57 -0400
From: Nolan Robichaux <nolan.robichaux at gmail.com>
To: pounds at sandbox.mercer.edu
Hey Dr. Pounds,
I got our coursework and stuff working on my laptop using Windows
Subsystem for Linux. WSL works seamlessly with Windows so it might be a
more appealing option than installing a Linux VM, at least for Windows
users.
Here’s what I did:
- Run PowerShell as administrator, type “wsl --install” (this will
install Ubuntu, there’s a way to install a different distro of your
choice but I haven’t looked that up)
- after restarting, open Ubuntu (search for it in the search bar at the
bottom) and do “sudo apt-get install freeglut3-dev” (you may need to do
“sudo apt update” before this step), then “sudo apt install gcc”, “sudo
apt install g++”, and “sudo apt install make”
- do the ssh key stuff from that handout we got in Ubuntu for cloning
projects from Anvil
- now we have a terminal interface set up, but we can’t run GUI programs
yet. Download VcXsrv for Windows
- These next steps you’ll need to do every time you start Ubuntu:
- start VcXsrv (it should show up as Xlaunch on your desktop)
- accept all the defaults, except when you get to “Additional
parameters” at the bottom of the 3rd page, add “-ac” to that box
- once that starts, go back to Ubuntu and paste this command: “export
DISPLAY=$(cat /etc/resolv.conf | grep nameserver | awk '{print $2}'):0”
- run your OpenGL program, wait a couple seconds, and your program
should open in a new window!
I hope this helps! Let me know if it does/doesn’t work for you. If it
does feel free to share it with the rest of the class.
Thanks, Nolan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://theochem.mercer.edu/pipermail/csc315/attachments/20220924/1c5fbc93/attachment.html>
More information about the csc315
mailing list