Color terminal settings

Color terminal settings

Post by Luca Zanca » Thu, 14 Feb 2002 02:05:04



Dear Sirs,

I'm using an asyncronous terminal emulation program under Windows
(TunEmul by Esker) to connect to an AIX version 4.3.2.
I'm using the "hft" terminal definition (and this terminfo entry
supports colors).
In the ".profile" of my user I've set an entry "tput setf 4", but this
entry is not used upon login (I'd like to have a coloured prompt when I
connect to the server...)...
When I launch "smit", the color directive is correctly used and the menu
items change color...

How can I "activate" the tput directive in such a way that it is active
directly when I log into the system???

Thank you very much,
__________________________________________________

Luca Zancan
Logica S.r.l.

URL http://www.logicaonline.com
__________________________________________________

 
 
 

Color terminal settings

Post by Chris Co » Thu, 14 Feb 2002 04:20:53



> Dear Sirs,

> I'm using an asyncronous terminal emulation program under Windows
> (TunEmul by Esker) to connect to an AIX version 4.3.2.
> I'm using the "hft" terminal definition (and this terminfo entry
> supports colors).
> In the ".profile" of my user I've set an entry "tput setf 4", but this
> entry is not used upon login (I'd like to have a coloured prompt when I
> connect to the server...)...
> When I launch "smit", the color directive is correctly used and the menu
> items change color...

> How can I "activate" the tput directive in such a way that it is active
> directly when I log into the system???

The problem in the shell is that applications might reset the color
to a default value.

You could embed the string in your PS1 prompt (PS2, etc) in your
.profile.

PS1="`tput setf 4`$ "

 
 
 

Color terminal settings

Post by Luca Zanca » Thu, 14 Feb 2002 16:40:26


Thanks, Chris, for the hint,

but in reality I was trying to do a little more than setting the color of my
prompt...

What I'd like to achieve is to have every single character that I type of a
certain colour (let's say yellow) and the background of another colour (let's
say blue)...
Is this possible???
The strange thing is that putting two directives in .profile ("tput setf 3"
and "tput setb 2"), nothing happens until I enter in smitty: once I am in
smitty, the two directives are used and I have wonderful colors. From then on,
these colours remain in place, even when I go out of smitty.

Anyway, I've put PS1="`tput setf 4`test> " in my .profile, and now my prompt
is "test>", but still in white!

Thank you again for your help,

Luca



> > Dear Sirs,

> > I'm using an asyncronous terminal emulation program under Windows
> > (TunEmul by Esker) to connect to an AIX version 4.3.2.
> > I'm using the "hft" terminal definition (and this terminfo entry
> > supports colors).
> > In the ".profile" of my user I've set an entry "tput setf 4", but this
> > entry is not used upon login (I'd like to have a coloured prompt when I
> > connect to the server...)...
> > When I launch "smit", the color directive is correctly used and the menu
> > items change color...

> > How can I "activate" the tput directive in such a way that it is active
> > directly when I log into the system???

> The problem in the shell is that applications might reset the color
> to a default value.

> You could embed the string in your PS1 prompt (PS2, etc) in your
> .profile.

> PS1="`tput setf 4`$ "

--
__________________________________________________

Luca Zancan
Logica S.r.l.

URL http://www.logicaonline.com
__________________________________________________