Tuesday, March 08, 2011

OpenBSD NC4200: My .profile for TERM type. xterm-256color / wsvt25.

OpenBSD have 256 color support in xterm, which is xterm-256color. For console, setting the TERM to wsvt25 is better. Color will work but weird stuff will happen is you use xterm term type for console, such as funny scrolling while ls-ing, tmux behaving weirdly and other stuff. But is I use wsvt25 as my term type, mp3blaster won't work correctly, vim color scheme (I use wombat scheme) will display white background instead of the dark background. So, I have to set my .profile to detect the original term type and change it to the color version.

In console, the original term type is vt220, so I'll use wsvt25 for color but mp3blaster won't work correctly. In X, the term is xterm so I'll use xterm-256color instead.

I open up .profile and put the lines below.

# This is to check the TERM and change accordingly.
if [[ $TERM = xterm ]];
 then export TERM="xterm-256color";
else
 export TERM="wsvt25";
fi


Then my console and xterm will have appropriate color enabled. Later then.

3 comments:

Unknown said...

Did you ever figure out a better solution for this?

I'm wondering what kind of term mp3blaster is expecting...

Unknown said...

I figured this out, to get color and F keys to work in mp3blaster and mcedit, etc.

Use xterm, but set the bits that the term sends from 7 (default) to 8 in your terminal program

I got it to work with Absolute Telnet, it may work with others (Putty, etc)

Absolute Telnet Client : Options: Properties... VT Options tab... then under "Absolute Telnet sends ... change from 7 bits to 8 bits)

choppergirl @ air - war . org

Karl said...

Thanks for the info Unknown(choppergirl I assume), I might try your suggestion and see about it. Thanks again.