Discussion:
ANSI Color with Xterm and SecureCRT
Mike Vanecek
2004-08-08 04:11:22 UTC
Permalink
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse it
to have black on white as the system default. I know about using geometry
when starting an xterm session in a local session with GNOME. However, I am
starting the session via ssh and SecureCRT and do not have the option to use
geometry (at least not that I can find). How can I tell the running xterm
session to change its fg/bg colors?

I did a google, but it was discussing color issues when starting xterm under
Xwindows which is not exactly how I am doing it. I have tried the various man
pages that might be relevant and various locates. Obviously, I have not done
the corrent one.

When I do a set I see:

TERM=xterm
SSH_TTY=/dev/pts/0

Will someone please help me.

Thanks.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Malcolm Kay
2004-08-08 05:23:53 UTC
Permalink
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
I did a google, but it was discussing color issues when starting xterm
under Xwindows which is not exactly how I am doing it. I have tried the
various man pages that might be relevant and various locates. Obviously, I
have not done the corrent one.
I have no experience of SecureCRT but I gather it simply logs into another
system via ssh protocol and provides a terminal optionally emulating xterm.
But note that this is an *emulation* within SecureCRT; you do not have a
running xterm so the xterm man pages are largely irrelevent.
To set things like geometry and colours you'll need to look to the
SecureCRT setup on the Windows machine and its documentation -- not to xterm
on RH9.
Post by Mike Vanecek
TERM=xterm
This does not mean that xterm is running; only that software using the emulated
terminal should assume that it is an xterm for the purpose of control. That is
for selecting terminfo data.

You may do better with PUTTY which comes for free.

Malcolm
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Steve Phillips
2004-08-08 08:17:58 UTC
Permalink
Post by Malcolm Kay
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Under the "emulation" section you need to ensure that the ansi colour
option is ticked, if you do this then it will override the appearence
options to set the foreground and background. (I have mine set to
monochrome under the appearence options). Setting the emulation to xterm
is ok, but you may find setting it to "Linux" is better unless you connect
to other systems that are not linux based (linux will emulate the linux
console and so you will probably find that things work a little better)
Post by Malcolm Kay
You may do better with PUTTY which comes for free.
PuTTY is very good but if they have purchased SecureCRT then they may find
that it has more advanced features (passthrough printing etc) that PuTTY
doesnt do.
--
Steve.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Mike Vanecek
2004-08-09 21:08:08 UTC
Permalink
Post by Steve Phillips
Post by Malcolm Kay
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Under the "emulation" section you need to ensure that the ansi
colour option is ticked, if you do this then it will override the
appearence options to set the foreground and background. (I have
mine set to monochrome under the appearence options). Setting the
emulation to xterm is ok, but you may find setting it to "Linux" is
better unless you connect to other systems that are not linux based
(linux will emulate the linux console and so you will probably find
that things work a little better)
I guess the problem is really with the ANSI definition under any terminal
emulation selection. It immediately defaults to black on white regardless of
the color scheme selected (the ANSI setting ignores windows, appearance,
color scheme). I have found that ANSI with Xterm seems to work best with the
apps that I am running. I just need a RH 9 command that sends a color
selection to use black on white as the default when in command mode. For
example, when one runs slrn under RH 9 it has a full range of color settings
including running its basic default windows as black on white. Or when I run
MC it allows me to set my colors while running MC. Shouldn't a command exist
that allows one to change the fg/bg while at the command prompt?
Post by Steve Phillips
Post by Malcolm Kay
You may do better with PUTTY which comes for free.
PuTTY is very good but if they have purchased SecureCRT then they
may find that it has more advanced features (passthrough printing
etc) that PuTTY doesnt do.
I use Putty some, but need some of the features that SecureCRT provides that
Putty does not.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Michael Scully
2004-08-09 22:56:03 UTC
Permalink
Mike:

For commercial Windows terminal emulators, I use Anzio Lite. It
does ssh now in the Lite product, and quantity 1 pricing is $40 with
discounts at 10 users and above. I like it much better than SecureCRT.
Look at www.anzio.com. I ended up as a reseller for them since I use it for
all my commercial installations. You can download a 30 day trial from their
website.

Scully


-----Original Message-----
From: redhat-list-***@redhat.com [mailto:redhat-list-***@redhat.com]
On Behalf Of Mike Vanecek
Sent: Monday, August 09, 2004 2:08 PM
To: General Red Hat Linux discussion list
Subject: Re: ANSI Color with Xterm and SecureCRT
Post by Steve Phillips
Post by Malcolm Kay
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Under the "emulation" section you need to ensure that the ansi
colour option is ticked, if you do this then it will override the
appearence options to set the foreground and background. (I have
mine set to monochrome under the appearence options). Setting the
emulation to xterm is ok, but you may find setting it to "Linux" is
better unless you connect to other systems that are not linux based
(linux will emulate the linux console and so you will probably find
that things work a little better)
I guess the problem is really with the ANSI definition under any terminal
emulation selection. It immediately defaults to black on white regardless of

the color scheme selected (the ANSI setting ignores windows, appearance,
color scheme). I have found that ANSI with Xterm seems to work best with the

apps that I am running. I just need a RH 9 command that sends a color
selection to use black on white as the default when in command mode. For
example, when one runs slrn under RH 9 it has a full range of color settings

including running its basic default windows as black on white. Or when I run

MC it allows me to set my colors while running MC. Shouldn't a command exist

that allows one to change the fg/bg while at the command prompt?
Post by Steve Phillips
Post by Malcolm Kay
You may do better with PUTTY which comes for free.
PuTTY is very good but if they have purchased SecureCRT then they
may find that it has more advanced features (passthrough printing
etc) that PuTTY doesnt do.
I use Putty some, but need some of the features that SecureCRT provides that

Putty does not.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Mike Vanecek
2004-08-11 00:43:45 UTC
Permalink
Post by Michael Scully
For commercial Windows terminal emulators, I use Anzio Lite. It
does ssh now in the Lite product, and quantity 1 pricing is $40 with
discounts at 10 users and above. I like it much better than SecureCRT.
Look at www.anzio.com. I ended up as a reseller for them since I
use it for all my commercial installations. You can download a 30
day trial from their website.
Scully
I already own SecureCRT but may be forced to look at other options such as
Anzio if I cannot find a workaround.

Surely some method exists to tell the current xterm terminal session to
change the foreground and background. Many applications have that capability.
What would I need to put in a script that would send the appropriate codes to
change the default fg and bg colors?
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Steve Phillips
2004-08-11 01:24:48 UTC
Permalink
Post by Mike Vanecek
I already own SecureCRT but may be forced to look at other options such as
Anzio if I cannot find a workaround.
Surely some method exists to tell the current xterm terminal session to
I think you are missing some key issues, this is _NOT_ an xterm session,
this is simply an emulation of an xterm session - this means that the way
the keyboard and display is handled is as per an xterm session, if you
press the "up" arrow then xyz string will be sent to the tty and the tty
will know how to interpret this. When a graphic depicting a corner of a
box is sent to your tty then your session will know how to display this on
your screen.

using systems such as setterm will allow you to change foreground and
background colours but what you are after is a way to override the ansi
sequences for certain screen attributes (foreground and background), this
is able to be setup by the xterm application, but you are not running the
application, you are running a seperate app that does not have these
facilities.
Post by Mike Vanecek
change the foreground and background. Many applications have that capability.
What would I need to put in a script that would send the appropriate codes to
change the default fg and bg colors?
Yes, many applications have this ability, if you set the codes up in the
application and they honor colour changes on ansi compliant terminals then
you will have your new colours. If you are looking for an application that
allows you to override certain aspects of teh display then either write to
vandyke and ask them to add this feature in or find a new application.
SecureCRT does not offer this functionality

You may be interested to know that PuTTY _does_ offer this however under
the "colour" options.
--
Steve.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Ed Greshko
2004-08-11 09:42:19 UTC
Permalink
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Sorry, I didn't save the original post....

Without restating that with SecureCRT you can't really be running an
xterm and thus can use the "features" that a real xterm will use....

Now, you want to change your colors. Here is where the "help" of
SecureCRT comes in handy....

Go to "Options-->Global Options-->Appearance-->ANSI Color". Under
"Normal colors" pick the left most box (black) and click on it. Pick
White. Then go back and click the right most box (grey/gray) and Pick
Black.

You are done....

Ed
--
"I think the problem, to be quite honest with you, is that you've never
actually known what the question is."

--The computer "Deep Thought" in "Hitchhiker's Guide to The Galaxy"
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Ed Greshko
2004-08-11 09:44:21 UTC
Permalink
Post by Ed Greshko
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Sorry, I didn't save the original post....
Without restating that with SecureCRT you can't really be running an
xterm and thus can use the "features" that a real xterm will use....
^
ooops CAN'T
Post by Ed Greshko
Now, you want to change your colors. Here is where the "help" of
SecureCRT comes in handy....
Go to "Options-->Global Options-->Appearance-->ANSI Color". Under
"Normal colors" pick the left most box (black) and click on it. Pick
White. Then go back and click the right most box (grey/gray) and Pick
Black.
You are done....
Ed
--
"I think the problem, to be quite honest with you, is that you've never
actually known what the question is."
--The computer "Deep Thought" in "Hitchhiker's Guide to The Galaxy"
--
"I think the problem, to be quite honest with you, is that you've never
actually known what the question is."

--The computer "Deep Thought" in "Hitchhiker's Guide to The Galaxy"
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Mike Vanecek
2004-08-11 19:40:17 UTC
Permalink
Post by Ed Greshko
Post by Mike Vanecek
I am using SecureCRT 4.1.17 to ssh2 into a RH 9 system. SecureCRT is
configured to connect using xterm terminal emulation with ansi color. The
default color selection is fg=white and bg=black. I would like to reverse
it to have black on white as the system default. I know about using
geometry when starting an xterm session in a local session with GNOME.
However, I am starting the session via ssh and SecureCRT and do not have
the option to use geometry (at least not that I can find). How can I tell
the running xterm session to change its fg/bg colors?
Sorry, I didn't save the original post....
Without restating that with SecureCRT you can't really be running an
xterm and thus can use the "features" that a real xterm will use....
Now, you want to change your colors. Here is where the "help" of
SecureCRT comes in handy....
Go to "Options-->Global Options-->Appearance-->ANSI Color". Under
"Normal colors" pick the left most box (black) and click on it. Pick
White. Then go back and click the right most box (grey/gray) and
Pick Black.
You are done....
Yes and no. It does indeed change the default display at the command line to
be black on white. However an application that sends a display code to
display white now displays black and one that sends a display code to display
black now displays white. Changing the color definition of white to black and
vice versa just mucks up the other applications since they expect black to be
black, not white.

Hence, what I need to know is how to send the codes from the xterm terminal
session to tell the display to use white as bg and black as fg as the default
system display scheme.

I have exchanged several emails with the SecureCRT folks as well. They have
not been able to suggest anything that works.
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Ed Greshko
2004-08-12 04:02:22 UTC
Permalink
Post by Mike Vanecek
Yes and no. It does indeed change the default display at the command line to
be black on white. However an application that sends a display code to
display white now displays black and one that sends a display code to display
black now displays white. Changing the color definition of white to black and
vice versa just mucks up the other applications since they expect black to be
black, not white.
Hence, what I need to know is how to send the codes from the xterm terminal
session to tell the display to use white as bg and black as fg as the default
system display scheme.
I have exchanged several emails with the SecureCRT folks as well. They have
not been able to suggest anything that works.
I think that is because it doesn't have everything to do with SecureCRT
but also in conjunction with the O/S side.

In order to do what you want I believe you will have to learn more about
"terminfo" and "tput" and other things for which I only have a passing
familiarity.

I believe you can try taking a stock vt100 terminfo and modify it for
your own use.

Even then, it may not work perfectly with SecureCRT or any other
terminal emulation software. I say this since I believe that the ANSI
color standard background color is defined as "black" and that in the
absence of any specific ANSI control characters being sent the emulation
SW will revert to the defaults specified in its configuration.

I think you can see this for yourself if you enter the command:

tput rev

Followed by any command, except for ls since ls uses the environment
variable LS_COLORS and then will reset the terminal to the state defined
in the terminfo database.

After "tput rev" typed you will get reverse video but only where the
system output.....

(If I had more time I would even explore using tcpdump to see what
exactly is being sent to the terminal....)

To reach Nirvana you may have to find terminal emulation sw that allows
you to compile your own terminfo settings and then create a matching set
on the OS side.....

In the case of ANSI colors...I think it is a case of..."You can please
some of the people all of the time....."

Good luck....

Ed
--
"I think the problem, to be quite honest with you, is that you've never
actually known what the question is."

--The computer "Deep Thought" in "Hitchhiker's Guide to The Galaxy"
--
redhat-list mailing list
unsubscribe mailto:redhat-list-***@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list
Loading...