Webmin > Terminal : Issues with nano and font-color

Reproduce:

  1. Open Webmin,
  2. click on the Terminal Button (Alt+K)
  3. Open a file with nano
    You will see, that white font-color on white background make it impossible to read the menu-entries and titles, or if you mark anything in the file:

How can this be fixed?

I solved it by edit the /etc/nanorc and uncomment some of the default-values that are added as example:

## Paint the interface elements of nano.  These are examples; there are
## no colors by default, except for errorcolor and spotlightcolor.
 set titlecolor bold,white,blue
 set promptcolor lightwhite,grey
 set statuscolor bold,white,green
# set errorcolor bold,white,red
# set spotlightcolor black,lightyellow
 set selectedcolor lightwhite,magenta
# set stripecolor ,yellow
 set scrollercolor cyan
# set numbercolor cyan
 set keycolor cyan
# set functioncolor green

I wonder why this setting is needed, as I never had trouble with wrong colors in nano.
Is there a way to fix this out of the box for Webmin / Virtualmin Installations, or is it an OS-Depending issue for ubuntu?

I see it on Rocky9 as well

I see it on Rocky, too. I don’t know the right way to fix it, though. We’re using xterm.js, I don’t think we set custom colors or anything (I would hope), so this would seem to be an upstream issue, though that’s surprising, as nano is pretty popular, you’d think folks would notice. But, maybe I’m wrong…maybe we’re overriding some stuff, though I don’t see any indication of that when glancing over the source.

BTW: It’s not only nano, same behavior if you mark something in the terminal themself:

? does that happen when you use ctrl+v to paste and use ctrl+insert to paste?

I have used ctrl+insert and it works fine and no problem in nano either (Ubuntu 22/20)

and yes I am in Webmin -> Tools -> Terminal

I also see this issue. It seems that the issue is with the rendering add-on. Try going to Terminal configuration and disabling the Enable WebGL rendering addon option.

Yep, that’s it.
If I disable it, the font-color becomes black:

image

Thanks for this solution.

CTLR+V, I never use CTRL+INS

Sadly, it’s a clashing bug that we’ll need to address and fix!

Alright, got it! The issue originated from implementing alpha transparency for the theme dropdown terminal in a way that was incompatible with the Xterm.js canvas plugin.

This has been fixed now!

Thanks for the heads up!

5 Likes

This one has been on my radar for a while. Very happy this is fixed. :smile:

Wonder if this fixed the other issue I was having with terminal spitting out unformatted mess all over unless you type reset before using it I’ll have to give it a look and see if that fixes the problem with formatting on output.

I don’t see how that could be related.

1 Like

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.