Why xterm fails to set foreground or background color in Red Hat Enterprise Linux 7 ?

Solution Verified - Updated -

Issue

  • The command xterm -fg or xterm -bg do not work on RHEL7 unless both -bg and -fg options are defined.
  • Running the command xterm -fg xx will change the color of the scroll bar but does not change the foreground text color.
# /usr/bin/xterm -fg red
Warning: Color name "WINDOW_BACKGROUND" is not defined
xterm: unable to allocate fg/bg colors
#
  • Running the command xterm -bg xx will change the color of the scroll bar but does not change the background color.
# xterm -bg green
xterm: unable to allocate fg/bg colors
Warning: Color name "WINDOW_FOREGROUND" is not defined
#
  • Specifying both, foreground and background colors works correctly.
# xterm -bg green -fg red

Environment

  • Red Hat Enterprise Linux 7
  • xterm-295-3.el7.x86_64

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content