in reply to Term::Visual colors

First thought: edit the module to not do it?

I am no expert on this, but I was screwing around installing ncurses awhile back, and one of the tips I came across is that you can start xterm with a user defined terminfo type like " xterm -tn xterm-color ". Now in /usr/share/terminfo/x there are a bunch of definitions for xterm, maybe try a few of them. I think there is a way to define your own too, with the program 'tic'.

Once you find the right one, you can define it and add it to your .Xresources file like:

You can tell *xterm* to do that by adding #ifdef *COLOR* *XTerm**termName: *xterm*-*color* #endif to your .Xresources file (or whatever file is being fed to xrdb to set resources). If you're not using anything, then echo '*XTerm**termName: *xterm*-*color*' | xrdb in .xinitrc - before you start any xterms - will do the job, except that will also set it in the unlikely event that you are on an X server that doesn't support *color*.
I'm in over my head here, so I suggest you do a groups.google search yourself for "terminfo linux".

I'm not really a human, but I play one on earth. flash japh

Replies are listed 'Best First'.
Re^2: Term::Visual colors
by nornagon (Acolyte) on Jan 01, 2005 at 05:05 UTC
    I've looked through the module to try to find the way it sets colors, but it seems to use Curses's abstraction layer. Which, from perldoc Curses, I gather doesn't support a "normal" color. Printing "\033[0m" doesn't help, either. It just appears as a literal =[
      Okay, I hacked up Term::Visual a bit and came up with a patch one can apply to Term/Visual.pm:
      @@ -148,6 +148,7 @@ $kernel->alias_set( $alias ); $console = POE::Wheel::Curses->new( InputEvent => 'private_input'); + use_default_colors(); my $old_mouse_events = 0; mousemask(0, $old_mouse_events); @@ -1354,6 +1355,7 @@ re => COLOR_RED, red => COLOR_RED, wh => COLOR_WHITE, white => COLOR_WHITE, ye => COLOR_YELLOW, yellow => COLOR_YELLOW, + de => -1, default => -1, ); my %attribute_table =
      Works a charm now ^_^ you just have to set colors as 'de' or 'default'.