Bug 202592 - options "-fg <color> -bg <color>" don't work
options "-fg <color> -bg <color>" don't work
Product: Fedora
Classification: Fedora
Component: xterm (Show other bugs)
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Miroslav Lichvar
Depends On:
  Show dependency treegraph
Reported: 2006-08-15 08:38 EDT by William W. Austin
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-10 04:36:18 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description William W. Austin 2006-08-15 08:38:56 EDT
Description of problem:
When attempting to invoke xterm setting fg and bg colors via the usual options,
    xterm -fg black -bg white
the colors come up reversed.  The foreground in the example shown will be white
and the background black.  Setting the +rv option usually fixes the problem (and
I am assuming a human error when the +rv option fails).

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. xterm -fg COLOR1 -bg COLOR2
2. xterm -fg COLOR1 -bg COLOR2 +rv
Actual results:
1. RESULT: xterm will appear with FOREGROUND of COLOR2 and BACKGROUND of COLOR1
- not what was requested.
2. RESULT: xterm will appear with FOREGROUND of COLOR1 and BACKGROUND of COLOR2
- this is the opposite of what was requested.
Expected results:

Additional info:
This occurs for a "new" user with NO .Xdefaults file present on a fresh install
of FC5, so I must assume that there is something in the installed Xdefault for
xterm which causes this (but I have been unable to find it).

This behavior changed back when I was running FC4 when the rpm
xterm-213-1.FC4.i386.rpm was released.  From looking at the code, I suspect that
the fix for bug #189161 broke these options altogether.

(I tried to search this one, but have been unable to find a dup of this problem.
 Apologies if it is a dup...)
Comment 1 Miroslav Lichvar 2006-08-18 09:07:53 EDT
I can't reproduce it. Looks like something is setting reverseVideo. What does
xrdb -query show? And rpm -V xterm, just to make sure default resources aren't
Comment 2 Thomas E. Dickey 2006-08-19 09:14:23 EDT
I had an unrelated report in this area last week, have a fix for
it in current changes toward #217.
Comment 3 William W. Austin 2006-08-23 00:19:35 EDT
(Sorry for the delay - unexpected trip)
rpm -V xterm shows: (nothing)
xrdb -query | egrep -i 'xterm|reverse' shows the following:
XTerm*backarrowKey:     true
XTerm*backarrowKeyIsErase:      true
XTerm*background:       white
XTerm*borderColor:      #7f007f
XTerm*c132:     true
XTerm*curses:   true
XTerm*enableScrollbar:  true
XTerm*font:     6x13
XTerm*fontBold: 6x13bold
XTerm*foreground:       black
XTerm*internalBorder:   3
XTerm*jumpscroll:       true
XTerm*logging:  false
XTerm*loginShell:       true
XTerm*marginBell:       true
XTerm*multiScroll:      true
XTerm*pointerColor:     red
XTerm*pointerShape:     top_left_arrow
XTerm*reverseVideo:     false
XTerm*reverseWrap:      false
XTerm*saveLines:        2048
XTerm*scrollBar:        true
XTerm*scrollInput:      true
XTerm*scrollKey:        true
XTerm*sunFunctionKeys:  false
XTerm*termName: vt102
XTerm*title:    34.mumb.atln.nrcrgais.dsl.att.net
XTerm*utmpInhibit:      true
XTerm.vt100.geometry:   110x35+10+10

Comment 4 Thomas E. Dickey 2006-08-23 05:51:48 EDT
xterm patch #217 has a fix which might apply to this case:

Patch #217 - 2006/8/20

* limit changes for reverse-video from patch #216 to cases where the
  reverse-video  command-line  option  is  used  (report  by  Zdenek
Comment 5 Miroslav Lichvar 2006-08-23 07:21:28 EDT
I still can't reproduce it. Can you try "xrdb -remove" before you start xterm?

The patch #217 might help in this case, the reverseVideo resource will be
ignored, but I'm not planning to include the patch at the moment. IMHO the
resource should be equivalent to the -rv option.
Comment 6 Thomas E. Dickey 2006-10-02 08:00:52 EDT
For the case I addressed, there were no xrdb settings for xterm.
It was all from the user's own X resources.
Comment 7 Miroslav Lichvar 2007-01-10 04:36:18 EST
xterm-223-1.fc5 has been pushed for fc5, which should resolve this issue.  If
these problems are still present in this version, then please make note of it in
this bug report.

Note You need to log in before you can comment on or make changes to this bug.