Unix Technical Forum

256 colours available in OpenBSD via a terminfo entry?

This is a discussion on 256 colours available in OpenBSD via a terminfo entry? within the comp.unix.bsd.openbsd.misc forums, part of the OpenBSD category; --> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7 boxes only 8 colours are available, despite ...


Go Back   Unix Technical Forum > Unix Operating Systems > OpenBSD > comp.unix.bsd.openbsd.misc

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-16-2008, 06:44 AM
Christopher Bootland
 
Posts: n/a
Default 256 colours available in OpenBSD via a terminfo entry?

PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
boxes only 8 colours are available, despite TERM being set to xterm-256color
etc.

I am using the command string:
infocmp terminal-name | grep color
to query the terminfo database, but all queried color modes all report 8
bits of colour

The termcap color terminal entries list a range of available colors, but the
corresponding terminfo entries only seem to have 8 colors.

Is there any way to get 256 colors via terminfo? Or is this a hard
limitation?

TIA
Chris


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-16-2008, 06:44 AM
Shane Almeida
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?

On Mon, 6 Jun 2005 20:16:57 +1000, Christopher Bootland wrote:
> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
> boxes only 8 colours are available, despite TERM being set to xterm-256color
> etc.


I've used 256 colors with PuTTY, OpenBSD 3.6, and elinks. All I had to do
was set TERM=xterm-256color, configure elinks, and it just worked. What
application are you trying to use?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-16-2008, 06:44 AM
Christopher Bootland
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?

"Shane Almeida" <almeida.spam.is.evil@spam.is.evil.mindless.com> wrote in
message news:Ge6dnVnJ-pbCpjnfRVn-2g@comcast.com...
> On Mon, 6 Jun 2005 20:16:57 +1000, Christopher Bootland wrote:
>> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
>> boxes only 8 colours are available, despite TERM being set to
>> xterm-256color
>> etc.

>
> I've used 256 colors with PuTTY, OpenBSD 3.6, and elinks. All I had to do
> was set TERM=xterm-256color, configure elinks, and it just worked. What
> application are you trying to use?


Nothing in particular, I was just experimenting as a side venture from
grokking LDAP. Are you sure that you got 256 colours? All the colour
terminal modes I checked displayed 8 colours, not the 16, 88, or 256 that
they are supposed to (according to their termcap entries).

Chris


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 02-16-2008, 06:44 AM
Shane Almeida
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?

On Tue, 7 Jun 2005 00:30:02 +1000, Christopher Bootland wrote:
> "Shane Almeida" <almeida.spam.is.evil@spam.is.evil.mindless.com> wrote in
> message news:Ge6dnVnJ-pbCpjnfRVn-2g@comcast.com...
>> On Mon, 6 Jun 2005 20:16:57 +1000, Christopher Bootland wrote:
>>> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
>>> boxes only 8 colours are available, despite TERM being set to
>>> xterm-256color
>>> etc.

>>
>> I've used 256 colors with PuTTY, OpenBSD 3.6, and elinks. All I had to do
>> was set TERM=xterm-256color, configure elinks, and it just worked. What
>> application are you trying to use?

>
> Nothing in particular, I was just experimenting as a side venture from
> grokking LDAP. Are you sure that you got 256 colours? All the colour
> terminal modes I checked displayed 8 colours, not the 16, 88, or 256 that
> they are supposed to (according to their termcap entries).


I just built elinks 0.10.5 on OpenBSD-current. All the colors at this
page look fine: http://www.w3schools.com/html/html_colors.asp. I'm
connecting with PuTTY 0.58 and I did *not* set TERM=xterm-256color. With
3.6, I think I had to set TERM, but that's not the case now apparently.

That seems like a good test to me, but if you want to see the output from
some commands, let me know what you want (and how to get it) and I'll send
you that information.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #5 (permalink)  
Old 02-16-2008, 06:44 AM
Christopher Bootland
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?


"Shane Almeida" <almeida.spam.is.evil@spam.is.evil.mindless.com> wrote in
message

> I just built elinks 0.10.5 on OpenBSD-current. All the colors at this
> page look fine: http://www.w3schools.com/html/html_colors.asp. I'm
> connecting with PuTTY 0.58 and I did *not* set TERM=xterm-256color. With
> 3.6, I think I had to set TERM, but that's not the case now apparently.


Thanks Shane, I've now confirmed that I really do get 256 colours (using
elinks & PuTTY).

> That seems like a good test to me, but if you want to see the output from
> some commands, let me know what you want (and how to get it) and I'll send
> you that information.


However, the command

infocmp | grep colors

returns the strings:

xterm-256color|xterm with 256 colors,
colors#8, cols#80, it#8, lines#24, ncv#32, pairs#64,

Perhaps colors#8 means 8bit (2^8=256) colour rather than 8 colours? The
description of the capability from the man page states that the 'colors'
capability is "maximum number of colors on the screen", which can be read
either way. Oh well, I don't have the time or inclination to delve into the
code so that will have to do.

Thanks again for your help, Shane.

Chris


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #6 (permalink)  
Old 02-16-2008, 06:44 AM
Thomas Dickey
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?

Christopher Bootland <bootland@cyberone.com.au> wrote:
> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
> boxes only 8 colours are available, despite TERM being set to xterm-256color
> etc.


> I am using the command string:
> infocmp terminal-name | grep color
> to query the terminfo database, but all queried color modes all report 8
> bits of colour


> The termcap color terminal entries list a range of available colors, but the
> corresponding terminfo entries only seem to have 8 colors.


> Is there any way to get 256 colors via terminfo? Or is this a hard
> limitation?


yes - it's not a problem with terminfo. I seem to recall that there was some
unresolved issue when making a corresponding termcap entry (this is a while
ago). But that works. Bear in mind that OpenBSD's ncurses is not current.

ncurses (unless you're using the configure option to extend colors from current
ncurses) doesn't support more than 8 bits for color.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #7 (permalink)  
Old 02-16-2008, 06:44 AM
Thomas Dickey
 
Posts: n/a
Default Re: 256 colours available in OpenBSD via a terminfo entry?

Shane Almeida <almeida.spam.is.evil@spam.is.evil.mindless.com> wrote:
> On Mon, 6 Jun 2005 20:16:57 +1000, Christopher Bootland wrote:
>> PuTTY 0.58 can handle 256 colours but when connecting to OpenBSD 3.5/3.7
>> boxes only 8 colours are available, despite TERM being set to xterm-256color
>> etc.


> I've used 256 colors with PuTTY, OpenBSD 3.6, and elinks. All I had to do
> was set TERM=xterm-256color, configure elinks, and it just worked. What
> application are you trying to use?


elinks (and kindred) don't use terminfo - they hardcode terminal behavior
within the application.

--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 08:48 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com