Bug 202592 - options "-fg <color> -bg <color>" don't work
Summary: options "-fg <color> -bg <color>" don't work
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: xterm
Version: 5
Hardware: i686
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Miroslav Lichvar
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-15 12:38 UTC by William W. Austin
Modified: 2007-11-30 22:11 UTC (History)
1 user (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2007-01-10 09:36:18 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description William W. Austin 2006-08-15 12:38:56 UTC
Description of problem:
When attempting to invoke xterm setting fg and bg colors via the usual options,
c.f.:
    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):
xterm-213-1.FC5


How reproducible:
EVERY TIME



Steps to Reproduce:
1. xterm -fg COLOR1 -bg COLOR2
2. xterm -fg COLOR1 -bg COLOR2 +rv
4. 
  
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 13:07:53 UTC
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
modified.

Comment 2 Thomas E. Dickey 2006-08-19 13:14:23 UTC
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 04:19:35 UTC
(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 09:51:48 UTC
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
  Sekera).

Comment 5 Miroslav Lichvar 2006-08-23 11:21:28 UTC
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 12:00:52 UTC
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 09:36:18 UTC
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.