Linux Ubuntu
So, i know, on Windows you can use conf.lua or --console, but how to do something like this on Ubuntu?
How to attach console on Linux Ubuntu?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to attach console on Linux Ubuntu?
Just run it from a terminal.
Re: How to attach console on Linux Ubuntu?
There's unfortunately no way to do this. However, there are 2 solutions to still see the console!
1. Running from the terminal.
You can open a terminal in the folder avobe where main.lua is stored, and then do either:
Code: Select all
love (folder where main.lua is stored) --console
Code: Select all
love2d (folder where main.lua is stored) --console
This runs love2d as normal, but the terminal acts as a console like if you were on windows.
QUICK NOTE: I forgot if it was -console or --console, and the code was formatted to look like a comment aswell, don't get confused!
2. Sublime Text 3
Sublime Text (and probably other IDE's aswell) have a built-in console. I know that Sublime Text at least, works fine.
Using an IDE that supports terminal does not require you to have console enabled in conf.lua
https://love2d.org/wiki/Sublime_Text
However, if you're using Sublime Text, it won't print in real time. To fix this, you can add the following code at the top of main.lua or conf.lua:
Code: Select all
io.stdout:setvbuf("no")
Re: How to attach console on Linux Ubuntu?
Thanks for the detailed answer, it was helpful!Teo434 wrote: ↑Tue Feb 02, 2021 8:13 pmThere's unfortunately no way to do this. However, there are 2 solutions to still see the console!
1. Running from the terminal.
You can open a terminal in the folder avobe where main.lua is stored, and then do either:orCode: Select all
love (folder where main.lua is stored) --console
.Code: Select all
love2d (folder where main.lua is stored) --console
This runs love2d as normal, but the terminal acts as a console like if you were on windows.
QUICK NOTE: I forgot if it was -console or --console, and the code was formatted to look like a comment aswell, don't get confused!
2. Sublime Text 3
Sublime Text (and probably other IDE's aswell) have a built-in console. I know that Sublime Text at least, works fine.
Using an IDE that supports terminal does not require you to have console enabled in conf.lua
https://love2d.org/wiki/Sublime_Text
However, if you're using Sublime Text, it won't print in real time. To fix this, you can add the following code at the top of main.lua or conf.lua:Hope that helped!Code: Select all
io.stdout:setvbuf("no")
Re: How to attach console on Linux Ubuntu?
what if im using the appimage version will the love command still work?
Re: How to attach console on Linux Ubuntu?
open a terminal in Linux. Love2D has to be installed on your computer already.
Either type in love (and enter) to see no game screen or
type in:
to see your installed version of love2D
in my terminal:
LOVE 11.5 (Mysterious Mysteries)
then go to the folder, where main.lua is stored:
cd /home/mike/code/mikesprogram
in this folder you start the program with love onespace and onedot (enter)
Either type in love (and enter) to see no game screen or
type in:
Code: Select all
love --version
in my terminal:
LOVE 11.5 (Mysterious Mysteries)
then go to the folder, where main.lua is stored:
cd /home/mike/code/mikesprogram
in this folder you start the program with
Code: Select all
love .
Author of the vape knigge. I have thought of you! is much better than "i have waited for you".
Re: How to attach console on Linux Ubuntu?
Yeah, i am always happy, when i can help someone. Maybe someone else could read this, too? Someone coming from windows to linux may have a little struggle with linux at first.
I love you all
Pinko
Author of the vape knigge. I have thought of you! is much better than "i have waited for you".
Who is online
Users browsing this forum: No registered users and 6 guests