[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: mutt in gnome-terminal goes gray!



Eric d'Halibut wrote:
> I have a gnome-terminal profile configured with a black background.
> However, running mutt in it changes the background to gray, a much
> lower contrast situation. In all the other terminals I have tried
> (xterm, rxvt, urxvt), black stays black in mutt. (This
> background-goes-gray also happens with midnight commander, if anyone
> besides me is still running it!)

Many terminal programs such as mutt use the "alternate screen".  They
initialize the terminal and switch to the alternate screen when
redrawing the full text window.  Upon exit they switch back to the
primary screen.

This is a feature done because people want it.  They want to be able
to have commands typed on the command line on the display.  They start
the terminal program, which redraws everything, then exit and want to
return to seeing the previous commands on the screen.  (Those that
don't want it can always disable alternate screen switching.)

Without using the alternate screen the previous contents are lost.
You can try the difference by using 'less -X' as a temporary test of
what is happening.  Look at the difference in the screen after these
sets of commands.

  $ echo hello
  $ less ~/.bashrc
  ...after exit screen returns to show the echo hello command...
  $ echo hello
  $ less -X ~/.bashrc
  ...exit the contents of the file have consumed the screen and the
  previous contents of the display are lost...

This behavior is why this is happening with both mutt and mc.  Try
less.  Is it happening with less too?  I think it should be.

With this above behavior in mind it seems to me that gnome-terminal
has a different color for the alternate screen.  Which means that
there should be some way to configure it so that the alternate screen
also has the colors that you desire.  I don't use gnome-terminal and
so do not know about its configuration.  But perhaps the above
information will be enough for you to find the right configuration for
it.

Bob

Attachment: signature.asc
Description: Digital signature


Reply to: