Page 1 of 1
How to attach console on Linux Ubuntu?
Posted: Mon Feb 01, 2021 9:30 pm
by GVovkiv
Linux Ubuntu
So, i know, on Windows you can use conf.lua or --console, but how to do something like this on Ubuntu?
Re: How to attach console on Linux Ubuntu?
Posted: Mon Feb 01, 2021 10:12 pm
by pgimeno
Just run it from a terminal.
Re: How to attach console on Linux Ubuntu?
Posted: Tue Feb 02, 2021 8:13 pm
by Teo434
GVovkiv wrote: ↑Mon Feb 01, 2021 9:30 pm
Linux Ubuntu
So, i know, on Windows you can use conf.lua or --console, but how to do something like this on 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
or
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!
Re: How to attach console on Linux Ubuntu?
Posted: Wed Feb 03, 2021 7:06 am
by GVovkiv
Teo434 wrote: ↑Tue Feb 02, 2021 8:13 pm
GVovkiv wrote: ↑Mon Feb 01, 2021 9:30 pm
Linux Ubuntu
So, i know, on Windows you can use conf.lua or --console, but how to do something like this on 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
or
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!
Thanks for the detailed answer, it was helpful!
Re: How to attach console on Linux Ubuntu?
Posted: Wed Aug 02, 2023 2:28 am
by CodeRed
what if im using the appimage version will the love command still work?
Re: How to attach console on Linux Ubuntu?
Posted: Sun Sep 10, 2023 4:09 pm
by Pinko
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)
Re: How to attach console on Linux Ubuntu?
Posted: Sun Sep 10, 2023 5:21 pm
by GVovkiv
Pinko wrote: ↑Sun Sep 10, 2023 4:09 pm
...
I mean, thanks, but you kinda late for almost 3 years
Re: How to attach console on Linux Ubuntu?
Posted: Sun Sep 10, 2023 8:04 pm
by Pinko
GVovkiv wrote: ↑Sun Sep 10, 2023 5:21 pm
Pinko wrote: ↑Sun Sep 10, 2023 4:09 pm
...
I mean, thanks, but you kinda late for almost 3 years
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