Problems with PROTERMCAP colors and Progress Editor on Linux/PuTTy/CHUI enviornment.

sseney

New Member
Hi all,

We're trying to migrate from an unsupported PROTERMCAP entry and an older Terminal emulation program to a PROTERMCAP entry that is supported by progress (we've picked ansi/ansic - as that best fits all our current needs) and will be moving to PuTTy terminal emulation.

The problem we currently have is that sometimes the colors (which we have defined in the PROTERMCAP entry) do goofy things. For instance, we run our application code, and upon returning to the Progress Editor, the background color (which is blue) is now 2 shades of blue (darker where there is writting on the screen IE "run login", light blue for the rest). And even sometimes when calling a color code 18 - as defined in our protermcap it's black/white (:COLOR 18 BLACK/WHITE=\E[30m\E[47m:\E[37m\E[40m:\) the background upon return to the editor is now BLACK except for where there is text - then it's blue.

Is the last "E[40m" the issue - in order to make sure that the background is blue upon return do we need to change this to 44m?

This is only an issue with our developement staff - as all our END USERS never get to the operating system or the progress editor.

HELP if anyone can, please.

TIA.
 
Re: Problems with PROTERMCAP colors and Progress Editor on Linux/PuTTy/CHUI enviornme

I use the following colors in my PROTERMCAP for PuTTY (these should work for anything in the vt100 family that supports color -- xterm, ansic, sco etc):

Code:
        :COLOR 5 BLACK=\E[30m:\E[0m:\
        :COLOR 6 RED=\E[31m:\E[0m:\
        :COLOR 7 GREEN=\E[32m:\E[0m:\
        :COLOR 8 YELLOW=\E[33m:\E[0m:\
        :COLOR 9 BLUE=\E[34m:\E[0m:\
        :COLOR 10 MAGENTA=\E[35m:\E[0m:\
        :COLOR 11 CYAN=\E[36m:\E[0m:\
        :COLOR 12 WHITE=\E[5;37m:\E[0m:\
        :COLOR 13 GRAY=\E[5;5;47m:\E[0m:\
        :COLOR 14 CUSTOM1=\E[5;43m:\E[0m:\
        :COLOR 15 CUSTOM2=\E[5;45m:\E[0m:\

The colors above are the color name on the default background. The colors below are foreground/background pairs:

Code:
        :COLOR 20 BLACK/WHITE=\E[30;5;47m:\E[m:\
        :COLOR 21 RED/WHITE=\E[31;5;47m:\E[m:\
        :COLOR 22 GREEN/WHITE=\E[32;5;47m:\E[m:\
        :COLOR 23 YELLOW/WHITE=\E[33;5;47m:\E[m:\
        :COLOR 24 BLUE/WHITE=\E[34;5;47m:\E[m:\
        :COLOR 25 MAGENTA/WHITE=\E[35;5;47m:\E[m:\
        :COLOR 26 CYAN/WHITE=\E[36;5;47m:\E[m:\
        :COLOR 27 WHITE/WHITE=\E[5;37;5;47m:\E[m:\
        :COLOR 30 BLACK/BLACK=\E[30;40m:\E[m:\
        :COLOR 31 RED/BLACK=\E[31;40m:\E[m:\
        :COLOR 32 GREEN/BLACK=\E[32;40m:\E[m:\
        :COLOR 33 YELLOW/BLACK=\E[33;40m:\E[m:\
        :COLOR 34 BLUE/BLACK=\E[34;40m:\E[m:\
        :COLOR 35 MAGENTA/BLACK=\E[35;40m:\E[m:\
        :COLOR 36 CYAN/BLACK=\E[36;40m:\E[m:\
        :COLOR 37 WHITE/BLACK=\E[5;37;40m:\E[m:\
        :COLOR 40 BLACK/BLUE=\E[30;44m:\E[m:\
        :COLOR 41 RED/BLUE=\E[31;44m:\E[m:\
        :COLOR 42 GREEN/BLUE=\E[32;44m:\E[m:\
        :COLOR 43 YELLOW/BLUE=\E[33;44m:\E[m:\
        :COLOR 44 BLUE/BLUE=\E[34;44m:\E[m:\
        :COLOR 45 MAGENTA/BLUE=\E[35;44m:\E[m:\
        :COLOR 46 CYAN/BLUE=\E[36;44m:\E[m:\
        :COLOR 47 WHITE/BLUE=\E[5;37;44m:\E[m:\
        :COLOR 50 BLACK/GREEN=\E[30;42m:\E[m:\
        :COLOR 51 RED/GREEN=\E[31;42m:\E[m:\
        :COLOR 52 GREEN/GREEN=\E[32;42m:\E[m:\
        :COLOR 53 YELLOW/GREEN=\E[33;42m:\E[m:\
        :COLOR 54 BLUE/GREEN=\E[34;42m:\E[m:\
        :COLOR 55 MAGENTA/GREEN=\E[35;42m:\E[m:\
        :COLOR 56 CYAN/GREEN=\E[36;42m:\E[m:\
        :COLOR 57 WHITE/GREEN=\E[5;37;42m:\E[m:\
        :COLOR 60 BLACK/RED=\E[30;41m:\E[m:\
        :COLOR 61 RED/RED=\E[31;41m:\E[m:\
        :COLOR 62 GREEN/RED=\E[32;41m:\E[m:\
        :COLOR 63 YELLOW/RED=\E[33;41m:\E[m:\
        :COLOR 64 BLUE/RED=\E[34;41m:\E[m:\
        :COLOR 65 MAGENTA/RED=\E[35;41m:\E[m:\
        :COLOR 66 CYAN/RED=\E[36;41m:\E[m:\
        :COLOR 67 WHITE/RED=\E[5;37;41m:\E[m:\
        :COLOR 70 BLACK/YELLOW=\E[30;43m:\E[m:\
        :COLOR 71 RED/YELLOW=\E[31;43m:\E[m:\
        :COLOR 72 GREEN/YELLOW=\E[32;43m:\E[m:\
        :COLOR 73 YELLOW/YELLOW=\E[33;43m:\E[m:\
        :COLOR 74 BLUE/YELLOW=\E[34;43m:\E[m:\
        :COLOR 75 MAGENTA/YELLOW=\E[35;43m:\E[m:\
        :COLOR 76 CYAN/YELLOW=\E[36;43m:\E[m:\
        :COLOR 77 WHITE/YELLOW=\E[5;37;43m:\E[m:\
        :COLOR 80 BLACK/GRAY=\E[30;47;5m:\E[m:\
        :COLOR 81 RED/GRAY=\E[31;47;5m:\E[m:\
        :COLOR 82 GREEN/GRAY=\E[32;47;5m:\E[m:\
        :COLOR 83 YELLOW/GRAY=\E[33;47;5m:\E[m:\
        :COLOR 84 BLUE/GRAY=\E[34;47;5m:\E[m:\
        :COLOR 85 MAGENTA/GRAY=\E[35;47;5m:\E[m:\
        :COLOR 86 CYAN/GRAY=\E[36;47;5m:\E[m:\
        :COLOR 87 WHITE/GRAY=\E[5;37;47;5m:\E[m:\
        :COLOR 90 BLACK/CUSTOM1=\E[30;43;5m:\E[m:\
        :COLOR 91 RED/CUSTOM1=\E[31;43;5m:\E[m:\
        :COLOR 92 GREEN/CUSTOM1=\E[32;43;5m:\E[m:\
        :COLOR 93 YELLOW/CUSTOM1=\E[33;43;5m:\E[m:\
        :COLOR 94 BLUE/CUSTOM1=\E[34;43;5m:\E[m:\
        :COLOR 95 MAGENTA/CUSTOM1=\E[35;43;5m:\E[m:\
        :COLOR 96 CYAN/CUSTOM1=\E[36;43;5m:\E[m:\
        :COLOR 97 WHITE/CUSTOM1=\E[5;37;43;5m:\E[m:\

The terminal initialization strings ("is" and "Si") as well as the terminate string ("te") and, occasionally some of the others, might also futz around with colors and attributes. You have to go through that stuff with a fine-tooth comb sometimes.
 
Re: Problems with PROTERMCAP colors and Progress Editor on Linux/PuTTy/CHUI enviornme

Thanks, Tom for your help...but I've got a followup question.

This is from our protermcap entry for color 5
:COLOR 5 BLACK=\E[37m\E[40m:\E[37m\E[44m:\

I took the protermcap that progress sends with OE 10 and this was the original COLOR 5 for ansic.

I noticed your's is very different...trying to understand why the big difference?

Another problem that I've not been able to figure out yet either - and I'm sure it's something to do with protermcap & PuTTy
is when we exit the progress editor and return to the OS we get some stray quoted data. I've attached a screen print saved
in Word (.doc) doc so that you might better see what I mean by "stray" data.

This happens when I used the standard installed protermcap as well as our modified one for ansi or xterm. If you can provide some
insite on this issue, that would be helpful. This "issue" is just an annoyance and will not affect any of our "end users" it justs affects
our programmers.

Thanks again for your time.

Protermcap is not my specialty, but I'm the one with the most experience in our department for taking on this task. Any and all help
is GREATLY appreciated.
 

Attachments

Re: Problems with PROTERMCAP colors and Progress Editor on Linux/PuTTy/CHUI enviornme

I don't do this every day but, offhand and as I remember, the OE protermcap attribute that you are showing is explicitly setting both the foreground and background colors and making assumptions about what the defaults should be.

I use a lot of different terminal windows and I set the default background differently to help distinguish which server is which. Thus I do not like protermcap entries that assume anything about the background color -- nor do I like it when they change it. So a long time ago I created what I posted above.

I also make sure that the initialization and termination strings are empty. I get very annoyed when my 132 column by 48 row window gets reset to 80 x 24 :mad:

As for the stray characters -- I have no idea. It looks like application code tossing up its lunch. But it could also be a mangled protermcap entry. Double check to make sure that every line except the last one in each terminal ends with "\" -- and no spaces or anything after the "\".
 
Back
Top