bug-ncurses
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: screen and curses problem


From: Miroslaw Dach
Subject: Re: screen and curses problem
Date: Tue, 3 Jul 2007 14:06:08 +0200 (CEST)

Hi Thomas,

        Thanks a lot for your hint. I have set the NCURSES_TRACE variable 
to TRACE_MAXIMUM.

Next what I did, I have started my server:
export TERM=linux-m
./screen  -t MYSERVER -d -m myServer

The trace file looked like that:
------------------------------------------------------------------------
TRACING NCURSES version 5.4.20050122 (tracelevel=0x1fff)
called {tgetent()
+ called {setupterm("screen",1,0x7f9601e8)
your terminal name is screen
cannot open terminfo /root/.terminfo/s/screen (errno=2)
cannot open terminfo /usr/share/terminfo/s/screen (errno=2)
TERMPATH is /etc/termcap:/usr/share/misc/termcap
Adding termpath /etc/termcap
Looking for screen in /etc/termcap
cannot open terminfo /root/.terminfo/a/ansi-m (errno=2)
cannot open terminfo /usr/share/terminfo/a/ansi-m (errno=2)
_nc_free_termtype(klone+acs|alternate character set for ansi.sys displays)
_nc_free_termtype(3u264v301w302x263y371z372{373|374}375~376.031-030054021+^P0333p3)
_nc_free_termtype(04r304y363z362{343|330}234)
_nc_free_termtype(klone+sgr|attribute control for ansi.sys displays)
_nc_free_termtype(klone+color|color control for ansi.sys and ISO6429-compatible 
displays)
_nc_free_termtype(linux|linux console)
_nc_free_termtype(linux-m|Linux console no color)
_nc_free_termtype(xf|xterm-xfree86|XFree86 xterm)
_nc_free_termtype(xterm-debian|xterm with modifications to follow Debian 
keyboard policy)
_nc_free_termtype(xterm-redhat|xterm with modifications to follow Debian 
keyboard policy)
_nc_free_termtype(v0|xterm|X11 terminal emulator)
_nc_free_termtype(ansi|ansi/pc-term compatible with color)
+ + called {del_curterm(0x1006bb08)
_nc_free_termtype((null))
+ + return }0
+ return }-1
return }0
-----------------------------------------------------------------

Next I have tried to attache to the server:

screen -r 

trace file looked like that:
-----------------------------------------------------------------
called {tgetent()
+ called {setupterm("linux-m",1,0x7f95fd18)
your terminal name is linux-m
cannot open terminfo /root/.terminfo/l/linux-m (errno=2)
cannot open terminfo /usr/share/terminfo/l/linux-m (errno=2)
TERMPATH is /etc/termcap:/usr/share/misc/termcap
Adding termpath /etc/termcap
Looking for linux-m in /etc/termcap
cannot open terminfo /root/.terminfo/a/ansi-m (errno=2)
cannot open terminfo /usr/share/terminfo/a/ansi-m (errno=2)
_nc_free_termtype(klone+acs|alternate character set for ansi.sys displays)
_nc_free_termtype(3u264v301w302x263y371z372{373|374}375~376.031-030054021+^P0333p3)
_nc_free_termtype(04r304y363z362{343|330}234)
_nc_free_termtype(klone+sgr|attribute control for ansi.sys displays)
_nc_free_termtype(klone+color|color control for ansi.sys and 
ISO6429-compatible displays)
_nc_free_termtype(linux|linux console)
_nc_free_termtype(linux-m|Linux console no color)
_nc_free_termtype(xf|xterm-xfree86|XFree86 xterm)
_nc_free_termtype(xterm-debian|xterm with modifications to follow Debian 
keyboard policy)
_nc_free_termtype(xterm-redhat|xterm with modifications to follow Debian 
keyboard policy)
_nc_free_termtype(v0|xterm|X11 terminal emulator)
_nc_free_termtype(ansi|ansi/pc-term compatible with color)
+ + called {set_curterm(0x10074c80)
+ + return }(nil)
screen size: terminfo lines = 4080 columns = 4103
screen size: environment LINES = 0 COLUMNS = 0
screen size is 4080x4103
TABSIZE = 8
create :screen linux-m 4080x4103
+ return }0
+ called {baudrate()
+ return }0
return }1
called {tgetnum(li)
return }4080
called {tgetnum(co)
return }4103
called {tgetflag(hc)
return }0
called {tgetflag(os)
return }0
called {tgetflag(ns)
return }0
called {tgetstr(cm,0x7f95fd78)
found match : (null)
return }(null)
called {tgetstr(ho,0x7f95fd78)
found match : (null)
return }(null)
called {tgetstr(cr,0x7f95fd78)
found match : (null)
return }(null)
called {tgetstr(up,0x7f95fd78)
found match : (null)
return }(null)
called {tgetstr(UP,0x7f95fd78)
----------------------------------------------------------------------

The output on the screen was like that:

$> Remove dead screens with 'screen -wipe'.
$> Clear screen capability required.

I did:
$> screen -wipe
$> screen -r 

the output was:

$> Clear screen capability required

I have tried:

$> export TERM=vt100
$> screen -r

The output was:

$> Cannot find termcap entry for 'vt100'

I set back:

$> export TERM=linux-m
$> screen -r 

The output was:

$> Cannot find termcap entry for 'linux-m'

Studding the output I see that LINES and COLUMNS are not correctly set.
Does ncurses detect that automatically?

Best Regards

Mirek 








On Tue, 3 Jul 2007, Thomas Dickey wrote:

> On Tue, 3 Jul 2007, Miroslaw Dach wrote:
> 
> > Hi Thomas,
> >
> >>> Do you have any idea what could be wrong?
> >>
> >> no - the closest I recall in this area is a memory-leak in the tgetent()
> >> code.  But that should not cause a failure after only a few tries.
> >>
> >> You may be able to see more by configuring ncurses --with-trace, and
> >> tracing calls in the result.
> >>
> >
> > I have recompiled ncurses with option --with-trace but could you give me
> > some hints how to trace what is going on when using ncurses.
> 
> When it's active, it writes to the file "trace" in the current directory.
> 
> There are two ways to turn on the tracing: the $NCURSES_TRACE environment 
> variable, and the trace() function.  I usually use the environment 
> variable since it does not require modifying the application.  (But note 
> that setting it affects any subprocess, and tracing is intended for only 
> one process).
> 
> The environment variable is checked in newterm and initscr - I don't
> recall if tgetent's calling anything that checks it, so you may have
> to make screen call trace().
> 
> The values for NCURSES_TRACE are a bitmask defined in curses.h (and in the 
> curs_trace.3x manpage file).  Looking in curses.h, you'll see definitions 
> for TRACE_ORDINARY, etc.  screen doesn't use much of ncurses, so setting 
> it to TRACE_MAXIMUM won't give _too_ large a trace file.
> 
> 

-- 
=============================================================================
          Miroslaw Dach (address@hidden) - SLS/Controls Group 
                PSI - Paul Scherrer Institut CH-5232 Villigen
=============================================================================





reply via email to

[Prev in Thread] Current Thread [Next in Thread]