Closed lxscaut closed 1 year ago
What echo $TERM
outputs?
> echo $TERM
xterm-256color
Do you are using a docker image?
Do you are using a docker image?
no. a real native bare metal linux installation
Lol you answered with other user name, you both are the same person?
hi,
Lol you answered with other user name, you both are the same person?
no. first, my colleague created the issue for me. but as i anyhow also have a github account, i can answer your questions myself.
Understood. I already get rid from the COLOR_PAIRS
error, but now I'm getting the error Could not load the key stdscr
. I think it's related with locale configuration. Do you know how to set it with a command line? Or if it's other issue that you know what, please let me know. Thanks.
Understood. I already get rid from the
COLOR_PAIRS
error, but now I'm getting the errorCould not load the key stdscr
. I think it's related with locale configuration. Do you know how to set it with a command line?
on my system the LANG environment variable is set to "de_AT.UTF-8". https://www.tecmint.com/set-system-locales-in-linux/
Or if it's other issue that you know what, please let me know. Thanks.
the "stdscr" seems to be some kind of standard variable. but i don't know anything about it.
Yes they are variables:
stdscr = read_static_ptr ("stdscr");
curscr_ptr = get_ptr ("curscr");
lines_ptr = get_ptr ("LINES");
cols_ptr = get_ptr ("COLS");
None of this instructions returns a valid handle and only returns empty's IntPtr
. I think the ncurses installed isn't the correct versions:
S | Name | Summary | Type
---+-------------------------------+------------------------------------------------------------------+--------
| busybox-ncurses-utils | Busybox applets replacing ncurses-utils | package
i+ | libncurses5 | Terminal control library | package
| libncurses5-32bit | Terminal control library | package
i | libncurses6 | Terminal control library | package
i+ | libncurses6-32bit | Terminal control library | package
| libyui-ncurses-devel | Libyui - Header fles for the NCurses (text based) user interface | package
| libyui-ncurses-pkg-devel | Libyui-ncurses-pkg header files | package
i+ | libyui-ncurses-pkg16 | Libyui - yast2 package selector widget for the NCurses UI | package
| libyui-ncurses-rest-api-devel | Libyui - Header files for the NCurses REST API plugin | package
| libyui-ncurses-rest-api16 | Libyui - REST API plugin for the Ncurses frontend | package
| libyui-ncurses-tools | Libyui - tools for the NCurses (text based) user interface | package
i | libyui-ncurses16 | Libyui - NCurses (text based) user interface | package
i+ | ncurses-devel | Development files for the ncurses6 terminal control library | package
| ncurses-devel-32bit | Development files for the ncurses6 terminal control library | package
| ncurses-devel-static | Static libraries for the ncurses6 terminal control library | package
| ncurses-examples | Tools using the new curses libraries | package
i | ncurses-utils | Tools using the new curses libraries | package
i+ | ncurses5-devel | Development files for the ncurses5 terminal control library | package
| ncurses5-devel-32bit | Development files for the ncurses5 terminal control library | package
| ncurses5-devel-static | Static libraries for the ncurses5 terminal control library | package
How did you install ncurses?
these are the ncurses packages i have installed:
libyui-ncurses-pkg16-4.6.0-1.1.x86_64
libncurses5-6.4.20230617-15.1.x86_64
ncurses5-devel-6.4.20230617-15.1.x86_64
libncurses5-32bit-6.4.20230617-15.1.x86_64
libncurses6-32bit-6.4.20230617-15.1.x86_64
libyui-ncurses16-4.6.0-1.1.x86_64
ncurses-utils-6.4.20230617-15.1.x86_64
ncurses-devel-6.4.20230617-15.1.x86_64
libncurses6-6.4.20230617-15.1.x86_64
seems to be about the same as yours.
but you can search for more ncurses packages here: https://software.opensuse.org/search?baseproject=ALL&q=ncurses
I think is missing the libncursesw6 or libncursesw5 for wider chars, but I can't install. Can you check that please.
I think is missing the libncursesw6 or libncursesw5 for wider chars, but I can't install. Can you check that please.
the package libncurses5 includes the file /usr/lib64/libncursesw.so.5 and package libncurses6 includes /usr/lib64/libncursesw.so.6.
the package ncurses-term and the packages libncursesw6 or libncursesw5 are only available for debian: https://software.opensuse.org/package/libncursesw5 https://software.opensuse.org/package/libncursesw6 https://software.opensuse.org/package/ncurses-term
and the available package https://software.opensuse.org/package/ncurses is only a source ("src") package.
@rainerklier the workaround is install the libncurses5 (sudo zypper install libncurses5
) and using the fix in this PR https://github.com/gui-cs/Terminal.Gui/pull/2749, which will force using this version.
@rainerklier the workaround is install the libncurses5 and using the fix in this PR, which will force using this version.
@BDisp Cool! Thanks.
libncurses5 i already have installed.
i am looking forward installing this new version.
what do i have to do to install this new version once the PR has been merged into release?
Install-Module Microsoft.PowerShell.ConsoleGuiTools
?
Update-Module Microsoft.PowerShell.ConsoleGuiTools
?
You welcome. Even if you already have installed libncurses5 it doesn't work without the fix. I hope @tig understand the inconvenience that OpenSuse users are facing and can publish this fix as quickly as possible. I'm not very familiar with PowerShell and maybe someone else can answer what's the right declaration.
Even if you already have installed libncurses5 it doesn't work without the fix.
yes, i know. that's why i am looking forward to receive your fix.... ;-)
I hope @tig understand the inconvenience that OpenSuse users are facing and can publish this fix as quickly as possible. I'm not very familiar with PowerShell and maybe someone else can answer what's the right declaration.
thanks. i am waiting for info when your PR is merged and how i can install it.
@rainerklier the Terminal.Gui v1.13.1
with the fix was published https://www.nuget.org/packages/Terminal.Gui.
@rainerklier the
Terminal.Gui v1.13.1
with the fix was published https://www.nuget.org/packages/Terminal.Gui.
ok. thanks. i immediatelly tried to use it, but i failed. what i did is the following:
Get-Process | Out-ConsoleGridView
Out-ConsoleGridView: Curses failed to initialize, the exception is: Could not load file or assembly 'Microsoft.DotNet.PlatformAbstractions, Version=3.1.6.0, Culture=neutral, PublicKeyToken=adb9793829ddae60'. The system cannot find the file specified.
Out-ConsoleGridView: Method not found: 'System.Rune System.Rune.op_Implicit(Int32)'
and it seems that the dependency to Microsoft.DotNet.PlatformAbstractions is new. with the old Terminal.Gui.dll this was not the case. do i have to wait for a new package of Microsoft.PowerShell.ConsoleGuiTools to fix all of this? (https://www.powershellgallery.com/packages/Microsoft.PowerShell.ConsoleGuiTools)
The Microsoft.DotNet.PlatformAbstractions
is needed to check the OperatingSystem
is "opensuse". The System.Rune
belong to the NStack.Core
nuget package (https://www.nuget.org/packages/NStack.Core), which perhaps isn't installed.
Edit:
Maybe @tig need to create a new PR here to update the Terminal.Gui
nuget package in the ConsoleGuiTools
.
The
Microsoft.DotNet.PlatformAbstractions
is needed to check theOperatingSystem
is "opensuse". TheSystem.Rune
belong to theNStack.Core
nuget package (https://www.nuget.org/packages/NStack.Core), which perhaps isn't installed.
after also copying file lib/netstandard2.0/NStack.dll from packlage nstack.core.1.0.7.nupkg to ~/.local/share/powershell/Modules/Microsoft.PowerShell.ConsoleGuiTools/0.7.2 it seems to work now!
:-D
thanks a lot! this is great!
Maybe @tig need to create a new PR here to update the
Terminal.Gui
nuget package in theConsoleGuiTools
.
of course, this would be a much nicer approach......
Prerequisites
Steps to reproduce
When running Out-ConsoleGridview on OpenSUSE Tumbleweed (latest version) I get the following error:
Out-ConsoleGridView: Curses failed to initialize, the exception is: The native method "COLOR_PAIRS" does not exist
Checking the symbols of libncursesw.so.6 reveals the following issue:
> nm -D /lib64/libncursesw.so.6 | grep COLOR 000000000000f3e0 T COLOR_PAIR 000000000000d740 T _nc_COLOR_PAIRS 000000000000d760 T _nc_COLORS
With ncurses5 on OpenSUSE it would work as on most other Linux distros:
> nm -D /lib64/libncursesw.so.5 | grep COLOR 000000000000eeb0 T COLOR_PAIR 0000000000034034 B COLOR_PAIRS 0000000000034030 B COLORS
However OpenSUSE relies on ncurses6 and I cannot get pwsh running with libncursesw.so.5 and so Out-ConsoleGridView doesn't work on this Linux distribution.
Already updated ncurses to the latest available package version:
ncurses-utils-6.4.20230617-15.1.x86_64 ncurses-devel-6.4.20230617-15.1.x86_64 libncurses6-6.4.20230617-15.1.x86_64
A few potential fixes such as trying to load _nc_COLOR_PAIRS if available instead of COLOR_PAIRS or others are described here: https://github.com/gui-cs/Terminal.Gui/issues/415
I hope you can help us here, as a change in this package is more likely than getting an update from the OpenSUSE distro.
Thanks and best regards, Alex
Expected behavior
Actual behavior
Error details
Environment data
Version
0.7.2
Visuals
No response