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 of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.