Re: ncurses

2010-06-05 Thread Thomas Dickey
On Sat, Jun 05, 2010 at 10:13:34AM -0700, Chip Camden wrote:
...
> Thanks for your response, but I solved the problem by specifying that
> mutt should use slang instead of ncurses.  That works better in a couple
> of ways, so I'll go with that.
> 
> I do, however, still have one small problem.  I can't seem to get mutt to
> see that my urxvt has 256 colors enabled.  infocmp shows "colors#256" for
> rxvt-256color, but if I do 'export TERM=rxvt-256color' then zsh complains
> "can't find terminal definition for rxvt-256color" (though it lets me set
> it anyway).  However, mutt still complains if I try to use any color
> above 8.  With TERM set to "rxvt" infocmp shows "colors#8" and tput
> colors shows "145".  I'm confused.  Obviously, not everyone is on the
> same page here.

There is more than one potential problem - here're a few:

ncurses' default configuration doesn't support 256 colors ("only" 16,
which was more than the standard 15 years ago).  It supports 256 colors
as a binary-incompatible extension of ncursesw, which could be provided
in a port.  With/without the extension, infocmp would show the 256.

zsh may be looking in the termcap interface, which iirc on FreeBSD is
using a separate database.

FreeBSD may still be using a tput that's not based on ncurses.
"145" is puzzling here, too.

-- 
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net


pgpdaow7em1bv.pgp
Description: PGP signature


Re: ncurses

2010-06-05 Thread Chip Camden
On Jun 04 2010 19:52, Thomas Dickey wrote:
> On Fri, Jun 04, 2010 at 08:02:34AM -0700, Chip Camden wrote:
> > Thanks to some help from Joel Dahl on the mutt-users list, I was able to
> > restore correct color support in my mutt installation.  But it raises a
> > question about ncurses.
> > 
> > It seems that building mutt with the devel/ncurses port installed creates
> > the problem I was experiencing: most colors do not show up in mutt, and
> 
> sounds familiar (layout differences, etc, depending on whether wide- or
> narrow characters are used).
> 
> > the line-drawing characters are borked.  Deinstalling devel/ncurses and
> > rebuilding mutt with the base version of ncurses solves the problem.
> > 
> > However, x11/rxvt-unicode depends on devel/ncurses, so any time urxvt
> > needs rebuilding we get devel/ncurses reinstalled.  Any subsequent rebuild
> > of mutt restores the original problem.
> > 
> > Is there any way to sort this out?
> 
> given a copy of the two build logs, I might be able to guess what's amiss.
> 
> (I don't have a current FreeBSD to test directly on...)
> 
> -- 
> Thomas E. Dickey
> http://invisible-island.net
> ftp://invisible-island.net

Thanks for your response, but I solved the problem by specifying that
mutt should use slang instead of ncurses.  That works better in a couple
of ways, so I'll go with that.

I do, however, still have one small problem.  I can't seem to get mutt to
see that my urxvt has 256 colors enabled.  infocmp shows "colors#256" for
rxvt-256color, but if I do 'export TERM=rxvt-256color' then zsh complains
"can't find terminal definition for rxvt-256color" (though it lets me set
it anyway).  However, mutt still complains if I try to use any color
above 8.  With TERM set to "rxvt" infocmp shows "colors#8" and tput
colors shows "145".  I'm confused.  Obviously, not everyone is on the
same page here.

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


[sterl...@camdensoftware.com: Re: ncurses]

2010-06-04 Thread Chip Camden
On Jun 04 2010 19:24, Roland Smith wrote:
> On Fri, Jun 04, 2010 at 10:12:12AM -0700, Chip Camden wrote:
> > 
> > Thanks for all the info, but i get the same results in mutt-devel as I do
> > in mutt.  WITH_MUTT_SLANG didn't seem to take either.
> > 
> > Is there a way to specify that mutt should use the system ncurses instead
> > of devel/ncurses?
> 
> Looking at the port's Makefile, it depends on the system ncurses library if
> neither WITH_SLANG nor WITH_NCURSES_PORT is set. But it could still link to
> the port's library if that is first in the link path.
> 
> If you build rxvt-unicode with the TERMINFO option switched OFF, urxvt-unicode
> does not depend on devel/ncurses. If you then de-install devel/ncurses and
> recompile mutt, it must use the system library.
> 
> But in my experience, using a wrong font, or setting the wrong LANG or LC_ALL
> in the environment is more likely to screw things up.
> 
> Roland
> -- 
> R.F.Smith   http://www.xs4all.nl/~rsmith/
> [plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
> pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)

Thank you -- I should have read the Makefile myself.  It was WITH_SLANG,
not WITH_MUTT_SLANG.  That solves the problem, and has the added benefit
of being able to use my default text color (SpringGreen) instead of
having to stick to the 8 normal colors.

I thought that might have also opened up urxvt's 256-color support, but
mutt still thinks I have only 8 colors.  At least I can default to my
urxvt settings for normal text, though.

Thanks again for your help!

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


Re: ncurses

2010-06-04 Thread Roland Smith
On Fri, Jun 04, 2010 at 08:02:34AM -0700, Chip Camden wrote:
> 
> It seems that building mutt with the devel/ncurses port installed creates
> the problem I was experiencing: most colors do not show up in mutt, and
> the line-drawing characters are borked.  Deinstalling devel/ncurses and
> rebuilding mutt with the base version of ncurses solves the problem.
> 
> However, x11/rxvt-unicode depends on devel/ncurses, so any time urxvt
> needs rebuilding we get devel/ncurses reinstalled.  Any subsequent rebuild
> of mutt restores the original problem.
> 
> Is there any way to sort this out?

You could build mutt with 'slang' support instead of ncurses. Put the
following in /etc/make.conf:

.if ${.CURDIR:M*/mail/mutt}
WITH_MUTT_SLANG=yes
.endif

OTOH, I'm using mutt-devel built with the system ncurses library
(libncursesw.so.8) in an rxvt-unicode terminal window without problems. I do
have 'LANG=en_US.UTF-8' and 'LC_ALL=en_US.UTF-8' set in my environment, 'set
charset="utf-8"' in my ~/.muttrc and am using the
'Rxvt*font: -misc-fixed-medium-r-normal--14-130-75-75-c-70-iso10646-1' font
set in ~/.Xresources. 

Roland
-- 
R.F.Smith   http://www.xs4all.nl/~rsmith/
[plain text _non-HTML_ PGP/GnuPG encrypted/signed email much appreciated]
pgp: 1A2B 477F 9970 BA3C 2914  B7CE 1277 EFB0 C321 A725 (KeyID: C321A725)


pgp8ZafMXUfaB.pgp
Description: PGP signature


Re: ncurses

2010-06-04 Thread Chip Camden
On Jun 04 2010 17:30, sghctoma wrote:
> not exactly a solution, rather a workaround, but you can build mutt
> with s-lang (WITH_MUTT_SLANG=YES) instead of ncurses.. it works for
> me..

Thanks for the tip.  I'm not sure if I'll go that route, but I'm copying
your response to the list for posterity's sake.

-- 
Sterling (Chip) Camden | camdensoftware.com | chipstips.com | chipsquips.com
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscr...@freebsd.org"


RE: Question re ncurses and the various ttys

2006-10-12 Thread Murray Taylor
 

> -Original Message-
> From: Raaf [mailto:[EMAIL PROTECTED] 
> Sent: Friday, 13 October 2006 7:36 AM
> To: freebsd-questions@freebsd.org
> Cc: Murray Taylor
> Subject: Re: Question re ncurses and the various ttys
> 
> > Hi all
> > 
> > I've been digging around in the various man pages and 
> havent yet found
> > the 
> > incantations I require.
> > 
> > Goal: to create a curses driven status screen that can run 
> without user
> > intervention.
> > 
> > I want to know if it is possible to _programatically_ switch to an
> > unused 
> > virtual tty,
> 
> Yes it is certainly possible, i have done this recently 
> myself and like
> you i couldn't find how to do it in any man page. Fortunately 
> i could find
> the answer in the xorg-server source code.
> 
> You just open one of the virtual terminals and issue the VT_ACTIVATE
> ioctl:
> 
> fd = open("/dev/ttyv9",O_RDONLY);
> ioctl(fd,VT_ACTIVATE,10);
> 
> > and then use this as the display page.
> > ( By unused I mean marked 'off' in /etc/ttys )
> 
> 
> Well, the above code only switches the active vt...
> 
> If you want your program output to go to a certain vt you 
> probably have
> to open the specific vt and replace the stdin and stdout file 
> descriptors
> of your program with the one of the one of the vt you just opened.
> 
> But there are probably some caveats to this method, so best 
> is to take a
> look at the getty source code and maybe add your program to /etc/ttys.
> 

Thank you - this is probably the incantation I need along with the 
curses newterm / setterm calls

cheers
mjt

 
---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

### This e-mail message has been scanned for Viruses by Bytecraft ###
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Question re ncurses and the various ttys

2006-10-12 Thread Raaf
> Hi all
> 
> I've been digging around in the various man pages and havent yet found
> the 
> incantations I require.
> 
> Goal: to create a curses driven status screen that can run without user
> intervention.
> 
> I want to know if it is possible to _programatically_ switch to an
> unused 
> virtual tty,

Yes it is certainly possible, i have done this recently myself and like
you i couldn't find how to do it in any man page. Fortunately i could find
the answer in the xorg-server source code.

You just open one of the virtual terminals and issue the VT_ACTIVATE
ioctl:

fd = open("/dev/ttyv9",O_RDONLY);
ioctl(fd,VT_ACTIVATE,10);

> and then use this as the display page.
> ( By unused I mean marked 'off' in /etc/ttys )


Well, the above code only switches the active vt...

If you want your program output to go to a certain vt you probably have
to open the specific vt and replace the stdin and stdout file descriptors
of your program with the one of the one of the vt you just opened.

But there are probably some caveats to this method, so best is to take a
look at the getty source code and maybe add your program to /etc/ttys.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Question re ncurses and the various ttys

2006-10-12 Thread Derek Ragona

You should be able to do this, provided the perms are set right on that device.

-Derek


At 10:24 PM 10/11/2006, Murray Taylor wrote:

Hi all

I've been digging around in the various man pages and havent yet found
the
incantations I require.

Goal: to create a curses driven status screen that can run without user
intervention.

I want to know if it is possible to _programatically_ switch to an
unused
virtual tty, and then use this as the display page.
( By unused I mean marked 'off' in /etc/ttys )

So if I set ttyv7 to off, can I launch a program (possibly from
a cold boot) that selects tty7 ( ie the now getty-less terminal ),
possibly sets the rows and cols like th ecommand line vidcontrol can,
and then continues executing a curses app ?

I can write the curses bit.

Can I execute vidcontrol(1) via a system(3) call and make it stick after
the
call returns or does it only affect the environment within the call.

Can I programtically do the same as Alt-F8 to preselect my screen?
Will the curses output go onto this selected screen or would it go
to the initial console screen? (Hmm maybe that is part of the answer,
in the form of "Does curses output only go to the current console?"

( ... am I even on the right track ?? )



Murray Taylor

Special Projects Engineer
Bytecraft Systems

--

"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
--Albert Einstein

---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material.

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

### This e-mail message has been scanned for Viruses by Bytecraft ###
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.
MailScanner thanks transtec Computers for their support.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Question re ncurses and the various ttys

2006-10-11 Thread perryh
> I want to know if it is possible to _programatically_ switch to
> an unused virtual tty, and then use this as the display page.
> ( By unused I mean marked 'off' in /etc/ttys )
>
> So if I set ttyv7 to off, can I launch a program (possibly from 
> a cold boot) that selects tty7 ( ie the now getty-less terminal ),
> possibly sets the rows and cols like th ecommand line vidcontrol
> can, and then continues executing a curses app ? 
...
> Can I programtically do the same as Alt-F8 to preselect my screen?

It must be possible, because it's what xdm (the X-windows login
screen) does.  Check out the ttyv8 line in /etc/ttys.  (xdm puts
the vt into a graphic mode rather than leaving it in text mode,
but the allocation and control issues are presumably similar.)
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Question re ncurses and the various ttys

2006-10-11 Thread Murray Taylor
Hi all

I've been digging around in the various man pages and havent yet found
the 
incantations I require.

Goal: to create a curses driven status screen that can run without user
intervention.

I want to know if it is possible to _programatically_ switch to an
unused 
virtual tty, and then use this as the display page.
( By unused I mean marked 'off' in /etc/ttys )

So if I set ttyv7 to off, can I launch a program (possibly from 
a cold boot) that selects tty7 ( ie the now getty-less terminal ),
possibly sets the rows and cols like th ecommand line vidcontrol can,
and then continues executing a curses app ? 

I can write the curses bit.

Can I execute vidcontrol(1) via a system(3) call and make it stick after
the
call returns or does it only affect the environment within the call.

Can I programtically do the same as Alt-F8 to preselect my screen?
Will the curses output go onto this selected screen or would it go
to the initial console screen? (Hmm maybe that is part of the answer,
in the form of "Does curses output only go to the current console?"

( ... am I even on the right track ?? )



Murray Taylor

Special Projects Engineer
Bytecraft Systems

--

"Any intelligent fool can make things bigger and more complex... It
takes a
touch of genius - and a lot of courage to move in the opposite
direction."
--Albert Einstein 

---
The information transmitted in this e-mail is for the exclusive
use of the intended addressee and may contain confidential
and/or privileged material. Any review, re-transmission,
dissemination or other use of it, or the taking of any action
in reliance upon this information by persons and/or entities
other than the intended recipient is prohibited. If you
received this in error, please inform the sender and/or
addressee immediately and delete the material. 

E-mails may not be secure, may contain computer viruses and
may be corrupted in transmission. Please carefully check this
e-mail (and any attachment) accordingly. No warranties are
given and no liability is accepted for any loss or damage
caused by such matters.
---

### This e-mail message has been scanned for Viruses by Bytecraft ###
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ncurses

2003-05-27 Thread Andreas Totlis
Hello,

* Katinka Mills <[EMAIL PROTECTED]> [030526 18:15]:
> This is for the console, I just want to change it for a program I am writing
> :o)

Look at:
http://invisible-island.net/ncurses/ncurses-intro.html#introduction
http://tldp.org/HOWTO/NCURSES-Programming-HOWTO/

hth
 Andreas -
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: ncurses based front-end for ports-collection?

2002-12-09 Thread John Bleichert
On Sat, 7 Dec 2002, Anselm Garbe wrote:
> Date: Sat, 7 Dec 2002 14:25:19 +0100
> From: Anselm Garbe <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: ncurses based front-end for ports-collection?
> 
> Hello *,
> 
>does anyone know, if there's a graphical front-end (ncurses based) for the 
>ports-collection? If not I'm looking forward to develop one.
> 
>Following requirements should be supplied:
> 
>- different views for installed/available/upgradeable ports
>- add/remove/upgrade/search function
>- cvsup update option
>- ports generator module
>- customizable for any option (make, download site, etc.)
> 
> Cheers,
>Anselm
> 
> -- 
> Anselm R. Garbe  ()  ascii ribbon campaign - against html mail 
>  www.ebrag.de/\- against microsoft attachments
> 

I don't think there's anything similar to this in the ports tree right 
now. I've been skirmishing with the idea of writing something similar in 
newt or ncurses.

Contact me off-list if you want to discuss it or if you want a tester.

JB

#  John Bleichert 
#  http://vonbek.dhs.org/latest.jpg


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message



Re: Ncurses Buildworld Failure

2002-09-27 Thread Giorgos Keramidas

On 2002-09-27 17:43, Greg Matheson <[EMAIL PROTECTED]> wrote:
> Here is my buildworld failure message
> I don't have a clue :)

Two questions:

1. What version of FreeBSD are you running?  The output of `uname -v'
   would be a fine way of answering.

2. What version of FreeBSD are you trying to build?

> building profiled ncurses library
> ranlib libncurses_p.a
> [  stuff that worked in this build bit removed   ]
> /usr/src/lib/libncurses/../../contrib/ncurses/ncurses/tinfo/alloc_entry.c -o 
>alloc_entry.So
> cc: Internal compiler error: program cc1 got fatal signal 11
> *** Error code 1
>
> Stop in /usr/src/lib/libncurses.

-- 
Famous last words: "What duck?" -- (Terry Pratchett, Soul Music)

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-questions" in the body of the message