You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by Zhemzhitsky Sergey <Se...@sberbank-cib.ru> on 2014/05/22 19:19:22 UTC

Karaf colored output

Hi karaf gurus,

Is it somehow possible to disable karaf’s shell colored output?

It seems that karaf’s does not interpret TERM environment variable, because if I connect to karaf either like this “TERM=xterm-old ssh localhost -p 8101” or like this “ssh localhost -p 8101” the output is colored in both cases.
If I connect, to the linux with “TERM=xterm-old” the colored output is disabled.


Best Regards,
Sergey


_______________________________________________________
CONFIDENTIALITY NOTICE: This email and any files attached to it may be confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email. 


RE: Karaf colored output

Posted by Zhemzhitsky Sergey <Se...@sberbank-cib.ru>.
Hi Ryan, Guillaume

I'd like to use expect tool to automate some karaf tasks, so I'd like the karaf's output to be without ansi color codes and escape sequences to be able to match against "expect tool" expressions easier.

Best Regards,
Sergey

From: Ryan Moquin [mailto:fragility2.0@gmail.com]
Sent: Saturday, May 24, 2014 12:25 AM
To: user@karaf.apache.org
Subject: Re: Karaf colored output


I think that all the colored output is simply additional characters that are sent with the text to display and then it's simply translated.  The absence of those additional bytes shouldn't do anything except cause the text to be mono.  I use windows all the time and depending on what I use to connect to karaf, I either have extra garbage characters, text with no color or colored text... sshing results in no color either way, never hit a problem.

Ryan
On May 22, 2014 3:07 PM, "Guillaume Nodet" <gn...@apache.org>> wrote:
We'd need the terminfo database in order to do so I think.
From a technical pov, it would be easy enough to disable ansi support based on the TERM variable for SSH connections, though i'm not really sure how well karaf would behave.

2014-05-22 19:19 GMT+02:00 Zhemzhitsky Sergey <Se...@sberbank-cib.ru>>:
Hi karaf gurus,

Is it somehow possible to disable karaf’s shell colored output?

It seems that karaf’s does not interpret TERM environment variable, because if I connect to karaf either like this “TERM=xterm-old ssh localhost -p 8101” or like this “ssh localhost -p 8101” the output is colored in both cases.
If I connect, to the linux with “TERM=xterm-old” the colored output is disabled.


Best Regards,
Sergey


_______________________________________________________

CONFIDENTIALITY NOTICE: This email and any files attached to it may be confidential. If you are not the intended recipient you are notified that using, copying, distributing or taking any action in reliance on the contents of this information is strictly prohibited. If you have received this email in error please notify the sender and delete this email.




Re: Karaf colored output

Posted by Ryan Moquin <fr...@gmail.com>.
I think that all the colored output is simply additional characters that
are sent with the text to display and then it's simply translated.  The
absence of those additional bytes shouldn't do anything except cause the
text to be mono.  I use windows all the time and depending on what I use to
connect to karaf, I either have extra garbage characters, text with no
color or colored text... sshing results in no color either way, never hit a
problem.

Ryan
On May 22, 2014 3:07 PM, "Guillaume Nodet" <gn...@apache.org> wrote:

> We'd need the terminfo database in order to do so I think.
> From a technical pov, it would be easy enough to disable ansi support
> based on the TERM variable for SSH connections, though i'm not really sure
> how well karaf would behave.
>
>
> 2014-05-22 19:19 GMT+02:00 Zhemzhitsky Sergey <
> Sergey_Zhemzhitsky@sberbank-cib.ru>:
>
>>  Hi karaf gurus,
>>
>>
>>
>> Is it somehow possible to disable karaf’s shell colored output?
>>
>>
>>
>> It seems that karaf’s does not interpret TERM environment variable,
>> because if I connect to karaf either like this “TERM=xterm-old ssh
>> localhost -p 8101” or like this “ssh localhost -p 8101” the output is
>> colored in both cases.
>>
>> If I connect, to the linux with “TERM=xterm-old” the colored output is
>> disabled.
>>
>>
>>
>>
>>
>> Best Regards,
>>
>> Sergey
>>
>>
>>
>> _______________________________________________________
>>
>> CONFIDENTIALITY NOTICE: This email and any files attached to it may be
>> confidential. If you are not the intended recipient you are notified that
>> using, copying, distributing or taking any action in reliance on the
>> contents of this information is strictly prohibited. If you have received
>> this email in error please notify the sender and delete this email.
>>
>>
>>
>
>

Re: Karaf colored output

Posted by Guillaume Nodet <gn...@apache.org>.
We'd need the terminfo database in order to do so I think.
>From a technical pov, it would be easy enough to disable ansi support based
on the TERM variable for SSH connections, though i'm not really sure how
well karaf would behave.


2014-05-22 19:19 GMT+02:00 Zhemzhitsky Sergey <
Sergey_Zhemzhitsky@sberbank-cib.ru>:

>  Hi karaf gurus,
>
>
>
> Is it somehow possible to disable karaf’s shell colored output?
>
>
>
> It seems that karaf’s does not interpret TERM environment variable,
> because if I connect to karaf either like this “TERM=xterm-old ssh
> localhost -p 8101” or like this “ssh localhost -p 8101” the output is
> colored in both cases.
>
> If I connect, to the linux with “TERM=xterm-old” the colored output is
> disabled.
>
>
>
>
>
> Best Regards,
>
> Sergey
>
>
>
> _______________________________________________________
>
> CONFIDENTIALITY NOTICE: This email and any files attached to it may be
> confidential. If you are not the intended recipient you are notified that
> using, copying, distributing or taking any action in reliance on the
> contents of this information is strictly prohibited. If you have received
> this email in error please notify the sender and delete this email.
>
>
>

Re: Karaf colored output

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Sergey,

ok. Did you try to set a "dummy" TERM before launching Karaf:

export TERM=my-dummy-term
bin/karaf

?

Regards
JB

On 05/25/2014 10:36 AM, Zhemzhitsky Sergey wrote:
> Hi JB,
>
> I'd like automate some karaf tasks by means of using linux expect tool, so I'd like the karaf's output to be without ansi color codes and escape sequences to be able to match against "expect tool" expressions easier.
>
>
> Best Regards,
> Sergey
>
>
> -----Original Message-----
> From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net]
> Sent: Thursday, May 22, 2014 9:50 PM
> To: user@karaf.apache.org
> Subject: Re: Karaf colored output
>
> Hi Sergey,
>
> Not sure to follow you: do you want to disable color or you don't have color and you want it ?
>
> did you try rxvt or xterm (to enable color) ?
>
> to disable any "unknown" term should work.
>
> Regards
> JB
>
> On 05/22/2014 07:19 PM, Zhemzhitsky Sergey wrote:
>> Hi karaf gurus,
>>
>> Is it somehow possible to disable karaf’s shell colored output?
>>
>> It seems that karaf’s does not interpret TERM environment variable,
>> because if I connect to karaf either like this “TERM=xterm-old ssh
>> localhost -p 8101” or like this “ssh localhost -p 8101” the output is
>> colored in both cases.
>>
>> If I connect, to the linux with “TERM=xterm-old” the colored output is
>> disabled.
>>
>> Best Regards,
>>
>> Sergey
>>
>> _______________________________________________________
>>
>> CONFIDENTIALITY NOTICE: This email and any files attached to it may be
>> confidential. If you are not the intended recipient you are notified
>> that using, copying, distributing or taking any action in reliance on
>> the contents of this information is strictly prohibited. If you have
>> received this email in error please notify the sender and delete this
>> email.
>>
>
> --
> Jean-Baptiste Onofré
> jbonofre@apache.org
> http://blog.nanthrax.net
> Talend - http://www.talend.com
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

RE: Karaf colored output

Posted by Zhemzhitsky Sergey <Se...@sberbank-cib.ru>.
Hi JB,

I'd like automate some karaf tasks by means of using linux expect tool, so I'd like the karaf's output to be without ansi color codes and escape sequences to be able to match against "expect tool" expressions easier.


Best Regards,
Sergey


-----Original Message-----
From: Jean-Baptiste Onofré [mailto:jb@nanthrax.net] 
Sent: Thursday, May 22, 2014 9:50 PM
To: user@karaf.apache.org
Subject: Re: Karaf colored output

Hi Sergey,

Not sure to follow you: do you want to disable color or you don't have color and you want it ?

did you try rxvt or xterm (to enable color) ?

to disable any "unknown" term should work.

Regards
JB

On 05/22/2014 07:19 PM, Zhemzhitsky Sergey wrote:
> Hi karaf gurus,
>
> Is it somehow possible to disable karaf’s shell colored output?
>
> It seems that karaf’s does not interpret TERM environment variable, 
> because if I connect to karaf either like this “TERM=xterm-old ssh 
> localhost -p 8101” or like this “ssh localhost -p 8101” the output is 
> colored in both cases.
>
> If I connect, to the linux with “TERM=xterm-old” the colored output is 
> disabled.
>
> Best Regards,
>
> Sergey
>
> _______________________________________________________
>
> CONFIDENTIALITY NOTICE: This email and any files attached to it may be 
> confidential. If you are not the intended recipient you are notified 
> that using, copying, distributing or taking any action in reliance on 
> the contents of this information is strictly prohibited. If you have 
> received this email in error please notify the sender and delete this 
> email.
>

--
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com

Re: Karaf colored output

Posted by Jean-Baptiste Onofré <jb...@nanthrax.net>.
Hi Sergey,

Not sure to follow you: do you want to disable color or you don't have 
color and you want it ?

did you try rxvt or xterm (to enable color) ?

to disable any "unknown" term should work.

Regards
JB

On 05/22/2014 07:19 PM, Zhemzhitsky Sergey wrote:
> Hi karaf gurus,
>
> Is it somehow possible to disable karaf’s shell colored output?
>
> It seems that karaf’s does not interpret TERM environment variable,
> because if I connect to karaf either like this “TERM=xterm-old ssh
> localhost -p 8101” or like this “ssh localhost -p 8101” the output is
> colored in both cases.
>
> If I connect, to the linux with “TERM=xterm-old” the colored output is
> disabled.
>
> Best Regards,
>
> Sergey
>
> _______________________________________________________
>
> CONFIDENTIALITY NOTICE: This email and any files attached to it may be
> confidential. If you are not the intended recipient you are notified
> that using, copying, distributing or taking any action in reliance on
> the contents of this information is strictly prohibited. If you have
> received this email in error please notify the sender and delete this
> email.
>

-- 
Jean-Baptiste Onofré
jbonofre@apache.org
http://blog.nanthrax.net
Talend - http://www.talend.com