* ncurses problem in telnet/serial console.
@ 2003-07-08 13:59 Omanakuttan
2003-07-08 19:14 ` Kenneth Johansson
0 siblings, 1 reply; 2+ messages in thread
From: Omanakuttan @ 2003-07-08 13:59 UTC (permalink / raw)
To: linuxppc-embedded
Hi,
We have developed a Brouter on mpc8260 running linux with ncurses CUI
for administrative tasks. ncurses
Requirement is that when the user telnet to the router or connect to the
serial port, the CUI should come up, and the usual telnet login prompt
should not come up.
libncurses.so.5 is the libray we use.
What I did is to modify the /etc/xinetd.d/telnet to our program. Our
telnet file now look like
[root@pandatel12 ~]# cat /mnt/bet_rd/etc/xinetd.d/telnet
# description: The telnet server serves telnet sessions; it uses \
# unencrypted username/password pairs for authentication.
service telnet
{
flags = REUSE
socket_type = stream
wait = no
user = root
#server = /usr/sbin/in.telnetd
server = /bin/mdi
log_on_failure += USERID
disable = no
}
[root@pandatel12 ~]#
When we telnet to the port 23, the error we get it
[root@pandatel12 ~]# telnet 10.1.28.44
Trying 10.1.28.44...
Connected to 10.1.28.44 (10.1.28.44).
Escape character is '^]'.
Error opening terminal: vt100.
Connection closed by foreign host.
[root@pandatel12 ~]#
The code is
[root@pandatel12 ~/test]# cat ncursestest.c
#include <ncurses.h>
int main()
{
initscr(); /* Start curses mode */
printw("Hello World !!!"); /* Print Hello World */
refresh(); /* Print it on to the real screen */
getch(); /* Wait for user input */
getch(); /* Wait for user input */
getch(); /* Wait for user input */
endwin(); /* End curses mode */
return 0;
}
[root@pandatel12 ~/test]# gcc -o mdi -lncurses ncursestest.c
[root@pandatel12 ~/test]#
At the same time, if I login to the board (after changing telnet entry
to in.telnetd) and run the application, it works fine.
TERMINFO settings are in /etc/profile.
[root@pandatel12 ~]# cat /mnt/bet_rd/etc/profile
#!/bin/sh
export TERMINFO=/etc/terminfo
What can be the resaon for this error?
For serial I modified the /etc/inittab, but getting the same error. If I
can solve the first one, this can also be solved in similar lines I believe.
Thanks for your time,
Om.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: ncurses problem in telnet/serial console.
2003-07-08 13:59 ncurses problem in telnet/serial console Omanakuttan
@ 2003-07-08 19:14 ` Kenneth Johansson
0 siblings, 0 replies; 2+ messages in thread
From: Kenneth Johansson @ 2003-07-08 19:14 UTC (permalink / raw)
To: Omanakuttan; +Cc: linuxppc-embedded@lists.linuxppc.org
On Tue, 2003-07-08 at 15:59, Omanakuttan wrote:
> [root@pandatel12 ~]#
> When we telnet to the port 23, the error we get it
>
> [root@pandatel12 ~]# telnet 10.1.28.44
> Trying 10.1.28.44...
> Connected to 10.1.28.44 (10.1.28.44).
> Escape character is '^]'.
> Error opening terminal: vt100.
> Connection closed by foreign host.
> [root@pandatel12 ~]#
You do not have support for vt100 can it be more obvious.
Start your program with
"TERM=kljdf /bin/mdi"
and see what happens.
--
Ericsson AB Tel: +46 8 719 70 20
Tellusborgsvägen 90 Fax: +46 8 719 29 45
126 25 Stockholm ken@switchboard.ericsson.se
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-07-08 19:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-07-08 13:59 ncurses problem in telnet/serial console Omanakuttan
2003-07-08 19:14 ` Kenneth Johansson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).