Subject: Re: Remote Terminal with iPhone SDK

Re: Remote Terminal with iPhone SDK

From: Peter Stuge <peter_at_stuge.se>
Date: Mon, 28 Jun 2010 12:25:27 +0200

Hi,

Paresh Thakor wrote:
> I'm trying to create iPhone app looks similar to Terminal
..
> I think i might be doing something wrong from the beginning, might
> be. Can anyone suggest me any sort of idea, how to prepare terminal
> application using Libssh2..?

The libssh2 part is trivial to do, and it sounds like you have
finished that already.

Your challenge is to develop a proper terminal emulator, which allows
applications on the server to fully control the user's screen through
sending of special command bytes.

> And please also suggest that do i need to handle the command output
> manually? i.e. pasring data for colored output, etc..!

Yes, everything that is not simply adding one new character to the
screen requires a complete terminal emulator.

There are some portable codebases that you may be able to re-use.
PuTTY is one of them.

> Please leas me to the proper way.

You are using libssh2 correct already, as long as you call
libssh2_channel_request_pty() - but that is the easy part.

I would expect a terminal emulator to be a couple of thousand lines
of code. Maybe less for the simpler ones. Look around and see what
you can find.

//Peter
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2010-06-28