Running Love on Linux in 2022
Posted: Mon Jun 06, 2022 7:41 pm
This may be something already covered, but not only am I new here on the forum, but also new to Love...yes, a total Noob...
When I found Love2D, I said, "I must have this on my development box", which is a Linux machine (Mint 20.3 Una-cinnamon). I wanted to use VS Code as my IDE as well. As I started the installs, everything went great. In my terminal I ran:
sudo add-apt-repository ppa:bartbes/love-stable then sudo apt update, and finally sudo apt install love
When complete, I created a folder on my desktop and added my main.lua file. Opened VS Code, installed all the Love2D extensions and opened my new folder with the lua file. I went to run my new love file to be met with errors stating that no executable could be found. I tried updating the path in VS Code and ran many different commands, all with the same result.
I went digging through the internet trying to find something that stated how to run Love files on Linux. I got nothing...Sadly, there is little information (that I could find) out there on how to do this. I even saw on a forum, stacktrace I think, where someone just gave up and went to Windows to run Love. After some time with hope fading, I wound up falling on a YouTube video where someone was developing a game on Linux with Sublime, and I happened to catch how they executed the file. A full day of searching and here is the result:
Open a terminal
cd into the folder where your love/lua files are
type: love .
--yes there is a space between e and .
press enter
I cant say for certain on other distros, but this is how it operates on Linux Mint. Sadly, you cannot use the ctrl+l feature like in Windows in VS Code, but I've simply opened the terminal in VS Code, and when I'm ready to check my game, I just run the love . command there, which opens just fine.
For anyone that struggled with running Love2D on Linux, I hope this finds you well.
Regards,
-PGDuck
When I found Love2D, I said, "I must have this on my development box", which is a Linux machine (Mint 20.3 Una-cinnamon). I wanted to use VS Code as my IDE as well. As I started the installs, everything went great. In my terminal I ran:
sudo add-apt-repository ppa:bartbes/love-stable then sudo apt update, and finally sudo apt install love
When complete, I created a folder on my desktop and added my main.lua file. Opened VS Code, installed all the Love2D extensions and opened my new folder with the lua file. I went to run my new love file to be met with errors stating that no executable could be found. I tried updating the path in VS Code and ran many different commands, all with the same result.
I went digging through the internet trying to find something that stated how to run Love files on Linux. I got nothing...Sadly, there is little information (that I could find) out there on how to do this. I even saw on a forum, stacktrace I think, where someone just gave up and went to Windows to run Love. After some time with hope fading, I wound up falling on a YouTube video where someone was developing a game on Linux with Sublime, and I happened to catch how they executed the file. A full day of searching and here is the result:
Open a terminal
cd into the folder where your love/lua files are
type: love .
--yes there is a space between e and .
press enter
I cant say for certain on other distros, but this is how it operates on Linux Mint. Sadly, you cannot use the ctrl+l feature like in Windows in VS Code, but I've simply opened the terminal in VS Code, and when I'm ready to check my game, I just run the love . command there, which opens just fine.
For anyone that struggled with running Love2D on Linux, I hope this finds you well.
Regards,
-PGDuck