Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I've been searching for a way to disable the bright (bold) colours in a TTY (colours 8 to 15). I'd like all bright colours to use their half-bright counterparts.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Find the terminfo database for your terminal type under /usr/share/terminfo — it should be a file named the same as the value of your TERM variable. Remember its pathname.

Decompile the database file into source using infocmp $TERM > FILE.ti. This can be done in your home directory, because infocmp will find the right database file based on the value of $TERM.

Edit FILE.ti and remove the entry bold=... from the comma-separate list of name=value pairs. Save the file, and recompile it using tic FILE.ti. This will replace FILE in the same directory.

Make a new directory under your home directory named .terminfo. Also make any subdirectories under ~/.terminfo necessary to match the subdirectories under /usr/share/terminfo where you found FILE. Now copy both FILE and FILE.ti into the subdirectory under ~/.terminfo that matches the subdirectory under /usr/share/terminfo where you found FILE. For example, if you have files named xterm and xterm.ti, you would copy them to directory ~/.terminfo/x because you found xterm in /usr/share/terminfo/x.

Next add this line to your ~/.bashrc startup script: export TERMINFO="$HOME/.terminfo", and close and re-open your terminal window.

This should disable the bold operation for that terminal type, and all colors should only appear in their dim form.

share|improve this answer
    
Actually, the tic FILE.ti command may have to be tic -o. FILE.ti, which forces it to write the compiled terminfo file into the current directory. Sorry about that omission. –  Fran Jun 7 '12 at 16:06
    
When all is said and done, you can verify where terminfo is getting your terminal's database from by running infocmp $TERM. Near the top of the output should be a line of the form: # Reconstructed via infocmp from file: /cygdrive/c/franl/.terminfo/r/rxvt. That filename is where terminfo is getting your terminal's database from. –  Fran Jun 7 '12 at 16:47
    
Thanks for this! Really appreciate it. Interestingly when I used tic FILE.ti it wrote it to the correct place ($HOME/.terminfo/l/linux). I didn't need to copy both FILE and FILE.ti to the subdir, just FILE. Also the changes were picked up without editing my .bashrc. –  Chris Kempson Jun 12 '12 at 11:44
    
Glad it worked. The behavior you describe may be because you already have a TERMINFO environment variable set to $HOME/.terminfo. It might be something the default shell startup scripts on your Linux distribution set up for you. –  Fran Jun 12 '12 at 14:45
    
I'm running Arch, checked TERMINFO but it contains nothing. Not a problem anyway, just something I found interesting. –  Chris Kempson Jun 13 '12 at 18:53

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.