----------------------------------------------------------- HOWTO Configure XTerm Colors as PuTTY ----------------------------------------------------------- June 2022 Prerequisities: 1] XTerm ----------------------------------------------------------- The problem: ----------------------------------------------------------- 0] We want to display ANS graphics properly. Or at least in the same colors as PuTTY does. First let's have a look at the picture how does it look with the default XTerm colors: I guess this is not probably the correct way artists wanted to see this ANSI graphics as. ----------------------------------------------------------- HOWTO fix it: ----------------------------------------------------------- 0] Let's edit the ~/.Xresources file and add following lines: xterm*color0: rgb:0/0/0 xterm*color1: rgb:bb/0/0 xterm*color2: rgb:0/bb/0 xterm*color3: rgb:bb/bb/0 xterm*color4: rgb:0/0/bb xterm*color5: rgb:bb/0/bb xterm*color6: rgb:0/bb/bb xterm*color7: rgb:bb/bb/bb xterm*color8: rgb:bb/bb/bb xterm*color9: rgb:ff/55/55 xterm*color10: rgb:55/ff/55 xterm*color11: rgb:ff/ff/55 xterm*color12: rgb:55/55/ff xterm*color13: rgb:ff/55/ff xterm*color14: rgb:55/ff/ff xterm*color15: rgb:ff/ff/ff Explanation: We will specify the 16 colors same as it is in the default PuTTY colors configuration. We will specify the colors as red green blue (rgb) combination and we will write it down in hexadecimal numbers. 1] Now we will merge the configuration and re-run the X Terminal using: $ xrdb -merge ~/.Xresources $ xterm -fa vga & This is the result: That's the way how PuTTY would display the ANSI file. At least approximately. 2] But we can do a bit better. Closer to the look ANSI artists wanted too show it to us. We assume here the artists wanted to display it in the VGA colors. Let's edit the ~/.Xresources file once more and replace the 16 colors section with following: xterm*color0: rgb:00/00/00 xterm*color1: rgb:aa/00/00 xterm*color2: rgb:00/aa/00 xterm*color3: rgb:aa/55/00 xterm*color4: rgb:00/00/aa xterm*color5: rgb:aa/00/aa xterm*color6: rgb:00/aa/aa xterm*color7: rgb:aa/aa/aa xterm*color8: rgb:55/55/55 xterm*color9: rgb:ff/55/55 xterm*color10: rgb:55/ff/55 xterm*color11: rgb:ff/ff/55 xterm*color12: rgb:55/55/ff xterm*color13: rgb:ff/55/ff xterm*color14: rgb:55/ff/ff xterm*color15: rgb:ff/ff/ff Explanation of what we've done is almost the same as in the previous case. We told X Terminal to change the colors for basic 16 colors in hexadecimal by red green blue intensity values. As in previous step we will now merge the changes: $ xrdb -merge ~/.Xresources $ xterm -fa vga & Note: the -fa parameter tells xterm to use vga font ----------------------------------------------------------- Result: ----------------------------------------------------------- This is finally the ANSI image displayed in VGA colors in X Terminal: Till next time...