You are not logged in.
I am learning how to use ncurses, and I have noticed that for some reason, in gnome-terminal (on arch) ncurses window borders are not being displayed properly. It seems to work fine in xterm.
https://ptpb.pw/03b6.png
https://ptpb.pw/jW2C.png
Not sure what could be causing this, and I haven't had any luck googling. Any ideas?
Last edited by erovborabva (2017-09-27 20:05:05)
Offline
Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code
Are you setting $TERM anywhere?
Offline
Read the Code of Conduct and only post thumbnails http://wiki.archlinux.org/index.php/Cod … s_and_code
Are you setting $TERM anywhere?
Sorry, fixed links. My $TERM is set to screen.xterm-256color
Offline
$TERM is set to screen.xterm-256color
What on earth is that? That is not a valid setting. But the key is you shouldn't be setting TERM at all.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
erovborabva wrote:$TERM is set to screen.xterm-256color
What on earth is that? That is not a valid setting. But the key is you shouldn't be setting TERM at all.
Ah, changing $TERM to "gnome" fixed it. Thanks!
Offline
Trilby wrote:erovborabva wrote:$TERM is set to screen.xterm-256color
What on earth is that? That is not a valid setting. But the key is you shouldn't be setting TERM at all.
Ah, changing $TERM to "gnome" fixed it. Thanks!
headesk
No, it didn't "fix" anything. It just shifted the brokeness one space to the right.
Offline
erovborabva wrote:Trilby wrote:What on earth is that? That is not a valid setting. But the key is you shouldn't be setting TERM at all.
Ah, changing $TERM to "gnome" fixed it. Thanks!
headesk
No, it didn't "fix" anything. It just shifted the brokeness one space to the right.
Please explain? Not sure what you mean by that. I did try setting the $TERM variable to empty, but that seems to break things.
Offline
But the key is you shouldn't be setting TERM at all.
Not setting TERM is not the same as setting it to an empty string. Just remove any and all lines in any shell config or simlar file where you have anything like "TERM=...".
You can configure your terminal to use a different TERM setting, but Gnome Terminal's default should be good. But just the same, configuring the terminal is different than setting what should be a read-only variable from within the shell.
Last edited by Trilby (2017-09-27 20:18:47)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Trilby wrote:But the key is you shouldn't be setting TERM at all.
Not setting TERM is not the same as setting it to an empty string. Just remove any and all lines in any shell config or simlar file where you have anything like "TERM=...".
You can configure your terminal to use a different TERM setting, but Gnome Terminal's default should be good. But just the same, configuring the terminal is different than setting what should be a read-only variable from within the shell.
I thought I had it set to the default previously. I have never modified the TERM variable in any of my config files, so unless some other program is setting the value I am not sure where I would remove it from.
Offline
Well as my problem is gone for now I will leave this as solved. I have not found any other config file setting TERM. If someone else has a better solution please feel free to share. Thanks for the help.
Offline
https://wiki.archlinux.org/index.php/GN … 256_colors ?
See the out-of-date notion.
Offline
Uh, that's horrible. Sorry erovborabva, if you're using screen that would explain that very odd setting. It is still the cause of the problem, but it may not be your fault (unless we can hold it against you that you use screen instead of tmux )
I just installed screen and tried it out with no config, it set TERM just to "screen" not to "screen.$TERM" (there was an existing TERM setting from urxvt).
EDIT: I can replicate the below, but when TERM is urxvt's default (rxvt-unicode-256color), screen just sets it to "screen".
Last edited by Trilby (2017-09-27 23:04:36)
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
~/.Xresources
URxvt*termName: xterm-256color
% echo $TERM
xterm-256color
% screen
% echo $TERM
screen.xterm-256color
% exit
% echo $TERM
xterm-256color
*shrug*
Offline
Uh, that's horrible. Sorry erovborabva, if you're using screen that would explain that very odd setting. It is still the cause of the problem, but it may not be your fault (unless we can hold it against you that you use screen instead of tmux )
I just installed screen and tried it out with no config, it set TERM just to "screen" not to "screen.$TERM" (there was an existing TERM setting from urxvt).
Yeah I was using screen at the time. Without screen it still defaults to xterm-256color and ncurses is still broken. Oh well, as a temporary fix, 'gnome' seems to work.
Offline
Smells like a bug in gnome-terminal or ncurses. How does gnome-256color behave?
Offline
Smells like a bug in gnome-terminal or ncurses. How does gnome-256color behave?
gnome-256color seems to work fine as well.
Offline
It actually looks to be a bug in ncurses with ncurses-6.0+20170527-1 working correctly in the instances I use it for (bmon and wavemon). Anything after that seems to cause the visual corruption(s). The $TERM variable has also not been changed. I'll see about looking further into it tomorrow.
Offline