oguzy / shellinabox

Automatically exported from code.google.com/p/shellinabox
Other
0 stars 0 forks source link

ANSI color programs only look right under Black_on_White #255

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Launch a color ncurses program when CSS is set to Black_on_White
2. Notice colors look like proper Term colors.
3. Switch color to White_on_Black
4. Notice how black and white are incorrect.
5. Compare results with standard terminal program

What is the expected output? What do you see instead?
I expect that regardless if the console is set to White_on_Black, or 
Black_on_White that ANSI colors are properly disabled regardless.

What version of the product are you using? On what operating system?
2.10 on Debian64, package from Downloads tab.

Please provide any additional information below.
I attempted to tweak the CSS style sheets myself, as ncurses apps run a bit 
differently.  This appears to be the CSS attrib causing this fuss:
#vt100 .ansi0

I attempted to add this line, but it didn't work:
#vt100 #scrollable .ansi0   { color:            #ffffff; }
And updated the other file to:
#vt100 .ansi0               { color:            #000000; }

Unfortunately the browser uses the first style first, I can use the Firefox 
style inspector to correct it, by unchecking the appropriate box.

The issue is very noticable when a full screen ANSI app has a bright background 
set, and since ansi0 is also a bright color, the text is unreadable.  Only way 
to resolve is to change style.  I personally prefer a White_on_Black terminal, 
and that's the standard on most Linux distributions.

Original issue reported on code.google.com by kveron...@gmail.com on 30 Jan 2014 at 8:27

GoogleCodeExporter commented 8 years ago
I found a solution by going through how the DOM and CSS styles are applied, 
here is a new selectable CSS file, I like to call Green_on_Black(I like it, 
don't judge):
#vt100 #scrollable                   { color:            #00ff00;
                                       background-color: #000000; }
#vt100 #scrollable.inverted          { color:            #000000;
                                       background-color: #00ff00; }
#vt100 #scrollable #console .ansi0   { color:            #00ff00; }

When using this, you will need to alter the Color_Terminal.css and change this 
line:
#vt100 .ansi0               { color:            #000000; }
It may not be required, but I am adding it here just in case.

Anyways, this new CSS file variant will make the ANSI programs render with 
proper colors when launched, while keeping a nice low-contrast shell.

Original comment by kveron...@gmail.com on 30 Jan 2014 at 8:44

GoogleCodeExporter commented 8 years ago
It doesn't appear to resolve the issue with "Nano", which also doesn't render 
correctly under White_on_Black.  There is definitely an issue with rendering 
ncurses/ANSI enabled programs when not using Black_On_White.

Other example programs are those made with the Newt toolkit, just run their 
examples while using any style but the default Black_On_White.

Original comment by kveron...@gmail.com on 30 Jan 2014 at 9:00

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
I ask for your life now bcoz I want product program  call me 09053349601

Original comment by evaiba...@gmail.com on 4 Dec 2014 at 10:36