Automated login, but run in a telnet console? possible?

Hi,

I have developed an embedded Linux system (app) which does its job well. My app is executed from inittab (using a script) so it automaticly starts, and it outputs some debug info to /dev/tty1 using the "printf" command. (Note, I do not have tty1 listed in my inittab, so that console is not used by getty at the moment)

So, locally, I can see my app's output (status) on tty1, and I can login using tty2/tty3 to do some stuff if needed.

Here comes the tricky part:

When doing remote fixing/monitoring, I login using telnet, so I am on the telnet console (pts/1). I have no way of seeing the app's output messages on tty1.

My question: Is it possible, using automatic login, to let Linux login to the 1st telnet console (pts/1) so my output messages are visible there, and so after I login with telnet, can I see my app's status then?

(I am afraid, that pts/1 is created dynamically (on telnet login) so this idea of mine probably won't work ...)

***********

Maybe I am really stupid and this is all garbage I just typed. If so, could anyone point me to a solution (a simple one) where I can log in with telnet and see the output of some app (or my app).

Many regards,

Bonny

Reply to
Bonny Gijzen
Loading thread data ...

Check out the GNU screen program, it may be able to do what you want.

formatting link

Mark

used

and

in

Reply to
Mark

Hi Mark,

Thanks for your reply. Yes, I know this Screen program, but that last time I looked at it (or some equivalent?) it took way too much resources for my embedded system.

Look, I could also write the output of my app to some file in ramdrive or perhaps create a HMTL page with my output, which could remotely be read using httpd ....

But I thought by simply automate login and select some console (telnet prefered) would be the most easy and least resources solution

Pls prove me wrong :)

--

Many regards,

Bonny

starts,

the

to

this

log

Reply to
Bonny Gijzen

some

You could just write a simple "telnet server" and have it communicate with your app via pipes and with a telnet client via tcp. The server can be pretty stupid - just accept a connection and direct everything it received on socket to the app stdin via pipe and similarly in the other direction for app output.

Regards Darryl.

--
Outgoing mail is certified Virus Free by AVG.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.525 / Virus Database: 322 - Release Date: 10/10/2003
Reply to
Darryl Green

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.