public inbox for linuxppc-dev@ozlabs.org 
 help / color / mirror / Atom feed
From: "Omanakuttan" <omanakuttan@tataelxsi•co.in>
To: linuxppc-embedded@lists•linuxppc.org
Subject: ncurses problem in telnet/serial console.
Date: Tue, 08 Jul 2003 19:29:44 +0530	[thread overview]
Message-ID: <3F0ACE50.90908@tataelxsi.co.in> (raw)


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/

             reply	other threads:[~2003-07-08 13:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-08 13:59 Omanakuttan [this message]
2003-07-08 19:14 ` ncurses problem in telnet/serial console Kenneth Johansson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3F0ACE50.90908@tataelxsi.co.in \
    --to=omanakuttan@tataelxsi$(echo .)co.in \
    --cc=linuxppc-embedded@lists$(echo .)linuxppc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox