Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 404
  • Last Modified:

curses and telnet

I'd like to write a server application in UNIX that users can telnet into. Can I use curses for the UI without a dedicated application on the client side ? Thanks in advance.
0
womble
Asked:
womble
1 Solution
 
GunnarCommented:
Generally speaking, yes. At login, the Telnet client identifies itself as some kind of terminal (VT-102, for example) to the operating system at the host your server application is running on. The curses package can then use the command language of that terminal to control output. It will automatically adjust to the terminal type the client has identified itself as.

There is a pitfall, however: different Telnet clients have different capabilites, for example when it comes to color handling. There are functions in curses to check the capabilities of the client; be sure to use them if you are going to do more advanced things. Most Telnet clients identify themselves as VT-102 or ANSI, I believe.

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now