-
Notifications
You must be signed in to change notification settings - Fork 252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for the new Windows Terminal? #612
Comments
If you run your application in WSL, then it is essentially a Linux
application running under some specific "Linux-flavour".
…On Sat, Sep 7, 2024 at 6:38 AM gonza2323 ***@***.***> wrote:
Hi,
I understand that the library doesn't support the old cmd.exe terminal.
But can it work with the new Windows Terminal? From what I could gather, it
supports ANSI escape sequences, and I run lanterna apps just fine with it
when using WSL.
—
Reply to this email directly, view it on GitHub
<#612>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIDBMQG7T2LG5I74N5RVW3ZVJ7MFAVCNFSM6AAAAABNZVUN4WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGUYTCNBWGM4TEMI>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
The ANSI escape codes are one thing, but we still rely on stty to some extent for modifying things like echo and special characters. Not sure if there's a way to do that with the window terminal without using native library integration. |
Ah ok, I understand, thank you, The current native integration is for the old console, right? |
Yes, it's using JNI and calls the standard system calls (GetConsoleMode, SetConsoleMode, etc). |
Laterna sort of works with Windows Terminal for my app. The UI is just not properly resized so a lot of content is invisible. So one cannot use it but perhaps some applications with fixed layout can actually work in Windows Terminal. In WSL, my app works OK as it does on linux. |
WSL *is* Linux - as far as relevant for lanterna.
The difference between a cmd.exe (that knows ansi-colors)
and a WSL terminal is: access to the features of "stty":
with WSL, you can just call stty, whereas for plain cmd.exe
you need some native API, thus the special native Terminal-
implementation.
…On Wed, Jan 1, 2025 at 3:11 PM MartyIX ***@***.***> wrote:
But can it work with the new Windows Terminal? From what I could gather,
it supports ANSI escape sequences, and I can run lanterna apps just fine
with it when using WSL.
Laterna sort of works with Windows Terminal for my app. The UI is just not
properly resized so a lot of content is invisible. So one cannot use it but
perhaps some applications with fixed layout can actually work in Windows
Terminal.
In WSL, my app works OK as it does on linux.
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIDBMVYGEZ3M5VAPJ3RQ5D2IPZSJAVCNFSM6AAAAABNZVUN4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRXGAZDKMRRHE>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
Yes, I'm aware of that1. I just wanted to make it clear what an alternative is. Still it's not like WSL is always 100 per cent convenient for non-trivial apps like mine2 but generally it's great and extremely useful.
Thank you for the explanation. My understanding of this topic is very superficial. Still I think people would love support for the new Windows Terminal. But honestly I have no idea about the scope of work we are talking about here. Footnotes |
point is, that you *absolutely need* the "stty"-stuff for lanterna...
otherwise you couldn't react to single keystrokes.
You certainly can read a full line from terminal and then output
your response lines without stty, but then you wouldn't need
lanterna in the first place.
Regarding WSL: I once tried it, but all attempts for WSL 2 failed with
vague errors, only WSL 1 finally
…On Thu, Jan 2, 2025 at 6:29 PM MartyIX ***@***.***> wrote:
WSL *is* Linux - as far as relevant for lanterna.
Yes, I'm aware of that1
<#m_7042856396955717002_user-content-fn-1-afcf0862243ca85489ea8f4d31ad4888>
.
I just wanted to make it clear what an alternative is. Still it's not like
WSL is always 100 per cent convenient for non-trivial apps like mine2
<#m_7042856396955717002_user-content-fn-2-afcf0862243ca85489ea8f4d31ad4888>
but generally it's great and extremely useful.
The difference between a cmd.exe (that knows ansi-colors) and a WSL
terminal is: access to the features of "stty": with WSL, you can just call
stty, whereas for plain cmd.exe you need some native API, thus the special
native Terminal- implementation.
Thank you for the explanation. My understanding of this topic is very
superficial. Still I think people would love support for the new Windows
Terminal. But honestly I have no idea about the scope of work we are
talking about here.
Footnotes
1.
If you talk about WSL 2 which is now default I believe. One still can
run WSL 1 and there it's more complicated I guess. ↩
<#m_7042856396955717002_user-content-fnref-1-afcf0862243ca85489ea8f4d31ad4888>
2.
Convenience level is 80% exactly. ;) ↩
<#m_7042856396955717002_user-content-fnref-2-afcf0862243ca85489ea8f4d31ad4888>
—
Reply to this email directly, view it on GitHub
<#612 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABIDBMSMLP322P3SPHCIK632IVZQBAVCNFSM6AAAAABNZVUN4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYGEZDEMZXGY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
sorry, previous message got sent prematurely (Ctrl+Enter pressed, instead
of Shift-Enter)
Regarding WSL: I once tried it, but all attempts for WSL 2 failed with
vague errors,
only WSL 1 could finally be installed. -> I don't know anything about wsl
2.
…On Thu, Jan 2, 2025 at 6:46 PM Andreas Leitgeb ***@***.***> wrote:
point is, that you *absolutely need* the "stty"-stuff for lanterna...
otherwise you couldn't react to single keystrokes.
You certainly can read a full line from terminal and then output
your response lines without stty, but then you wouldn't need
lanterna in the first place.
Regarding WSL: I once tried it, but all attempts for WSL 2 failed with
vague errors, only WSL 1 finally
On Thu, Jan 2, 2025 at 6:29 PM MartyIX ***@***.***> wrote:
> WSL *is* Linux - as far as relevant for lanterna.
>
> Yes, I'm aware of that1
> <#m_-1592740605906912170_m_7042856396955717002_user-content-fn-1-afcf0862243ca85489ea8f4d31ad4888>
> .
>
> I just wanted to make it clear what an alternative is. Still it's not
> like WSL is always 100 per cent convenient for non-trivial apps like mine
> 2
> <#m_-1592740605906912170_m_7042856396955717002_user-content-fn-2-afcf0862243ca85489ea8f4d31ad4888>
> but generally it's great and extremely useful.
>
> The difference between a cmd.exe (that knows ansi-colors) and a WSL
> terminal is: access to the features of "stty": with WSL, you can just call
> stty, whereas for plain cmd.exe you need some native API, thus the special
> native Terminal- implementation.
>
> Thank you for the explanation. My understanding of this topic is very
> superficial. Still I think people would love support for the new Windows
> Terminal. But honestly I have no idea about the scope of work we are
> talking about here.
> Footnotes
>
> 1.
>
> If you talk about WSL 2 which is now default I believe. One still can
> run WSL 1 and there it's more complicated I guess. ↩
> <#m_-1592740605906912170_m_7042856396955717002_user-content-fnref-1-afcf0862243ca85489ea8f4d31ad4888>
> 2.
>
> Convenience level is 80% exactly. ;) ↩
> <#m_-1592740605906912170_m_7042856396955717002_user-content-fnref-2-afcf0862243ca85489ea8f4d31ad4888>
>
> —
> Reply to this email directly, view it on GitHub
> <#612 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/ABIDBMSMLP322P3SPHCIK632IVZQBAVCNFSM6AAAAABNZVUN4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDKNRYGEZDEMZXGY>
> .
> You are receiving this because you commented.Message ID:
> ***@***.***>
>
|
One can think of WSL 1 as "mapping linux to Windows API" whereas WSL 2 can run a full blown linux distro more like "side by side" with Windows and having access to the machine resources. So WSL 1 can run only certain linux applications, whereas WSL 2 can run all applications1. https://learn.microsoft.com/en-us/windows/wsl/compare-versions#comparing-wsl-1-and-wsl-2 WSL 2 is the modern version, WSL 1 is the precedessor (I guess in maintenance mode). Footnotes
|
Hi,
I understand that the library doesn't support the old cmd.exe terminal. But can it work with the new Windows Terminal? From what I could gather, it supports ANSI escape sequences, and I can run lanterna apps just fine with it when using WSL.
The text was updated successfully, but these errors were encountered: