0

On rxvt, and only on rxvt, then when I display text using the ncurses A_BOLD attribute then it's artificially coloured.

Edit: When colours are enabled. (Via ncurses start_color().)

enter image description here

Top is gnome-terminal, bottom is rxvt-unicode.

Does anyone know enough about the rxvt configuration to know whether I can stop this happening? It does seem to be correctly finding the bold font, so it doesn't need to emphasise the text by colour.

I do know there's a colorBD resource which is used to specify the colour of bold text; however this only seems to apply when drawing text in the foreground colour, which this isn't (it's actually off-white). (Also, I've tried setting it and nothing happens, so that code path isn't firing.)

I don't believe there's anything in my configuration, which is pretty basic:

URxvt*scrollTtyOutput: false
URxvt*scrollWithBuffer: true
URxvt*scrollTtyKeypress: true
URxvt*font: xft:Monoid Tight:pixelsize=12
URxvt*saveLines: 10000
URxvt*scrollBar_right: true

URxvt*background: #2B2B2B
URxvt*foreground: #DEDEDE

(Plus a palette setting, omitted for brevity.) I've checked with xrdb -query and the settings are being picked up and it's not showing anything. Plus I've checked /etc/X11/app-defaults/URxvt and everything's commented out.

So is this hard-coded behaviour?

Edit: As requested, I have remitted the palette settings here:

! black
URxvt*color0  : #2E3436
URxvt*color8  : #555753
! red
URxvt*color1  : #CC0000
URxvt*color9  : #EF2929
! green
URxvt*color2  : #4E9A06
URxvt*color10 : #8AE234
! yellow
URxvt*color3  : #C4A000
URxvt*color11 : #FCE94F
! blue
URxvt*color4  : #3465A4
URxvt*color12 : #729FCF
! magenta
URxvt*color5  : #75507B
URxvt*color13 : #AD7FA8
! cyan
URxvt*color6  : #06989A
URxvt*color14 : #34E2E2
! white
URxvt*color7  : #D3D7CF
URxvt*color15 : #EEEEEC

5
  • Fair enough. Done. Commented Nov 6, 2022 at 21:22
  • Maybe related: $ infocmp $TERM | grep bold - if that reveals anything else than bold=\E[1m (assuming ANSI; set bold ON), then it could be a clue.
    – Hannu
    Commented Nov 7, 2022 at 13:10
  • $ tput bold ; echo TEST ; tput sgr0 prints bold text, not red and bold (rxvt here)
    – Hannu
    Commented Nov 7, 2022 at 13:17
  • It seems this only happens once colours are enabled, via calling start_color(). Updated question. Commented Nov 7, 2022 at 15:45
  • ignorant question; does colorBD belong in that context, e.g. as a parameter to start_color()?
    – Hannu
    Commented Nov 7, 2022 at 18:14

1 Answer 1

0

The resource defining the color to display bold text in is colorBD (and colorIT for italic).

Check if it it set with

% xrdb -query | grep -i colorBD
URxvt.colorBD:  4

There is no way to delete a single resource definition dynamically other than to read the current xrdb values into a file:

xrdb -query > filename

Use an editor to edit the file, deleting the line containing URxvt.colorBD, save the file and load it overriding the existing resources:

xrdb -load filename

One can obviously override the value in your own ~/.Xresources I tested to do so with an empty value "URxvt.colorBD: " and also with a a dash: "URxvt.colorBD: -" to get the same functionality as when it not set at all, but that didn't work I just get some default pink color for bold. But you could override it with your default foreground color (... but that will change text in other colors if bold).

To permanently remove it, you might need to find where it's set when you x-session starts and remove it from there (normally one sets these things in ~/.Xresources or ~/.Xdefaults and there might be app defaults in e.g. /etc/X11/app-defaults/URxvt that you environment loads when X starts.

(The alternative is to override (xrdb -load) the entire resource db after each start with a file not containing the URxvt.colorBD resource ... but you'll might loose defaults from new applications, etc doing that so you would need to keep that file up to date in the same manner as described above.)

2
  • I do mention colorBD in the question. Commented Feb 8 at 23:11
  • so you do and you mention that you've tried to set it ... have you verified that it's not set?
    – fraxflax
    Commented Mar 1 at 12:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .