LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-30-2009, 02:36 PM   #1
Skaperen
Senior Member
 
Registered: May 2009
Location: center of singularity
Distribution: Xubuntu, Ubuntu, Slackware, Amazon Linux, OpenBSD, LFS (on Sparc_32 and i386)
Posts: 2,684
Blog Entries: 31

Rep: Reputation: 176Reputation: 176
pty handler program


I'd like to propose the following program, which I might write if nothing like this already exists. It would be similar to the "script" program in that it will allocate a new pty/tty pair and start a new session. But unlike the "script" program, it will provide a means to have BOTH the normal terminal session going AND a script or input source to provide input. It could be used, for example, to pre-start programs inside the pty session, and at the end, let the controlling tty it was started in fully interact with it (something that can't happen if it was started with input piped from the script).

My design would allow running a control script right from the beginning, or at any later time. The control script can see output from the session, filter that output for the controlling tty to see, provide input, maybe even filter the controlling tty input, too. When the script ends, the session can remain for regular interaction. Also, an environment variable will be set in the session to allow programs inside the session to provide similar controls, such as feeding input. That environment variable might be a local port number to connect to, with an access key or encryption key, to provide input and/or control commands.

I have several uses for this. Many of those uses could be done using other tools, but not all the uses would hit the same tools. But by doing it all in a program like this, I see a great many of my uses all solved in a single project, even if it isn't the most elegant (but I see solving many problems with one solution as being its own kind of elegant).

Thoughts? Know of such a program? Want to write it? Want me to?
 
Old 01-29-2010, 10:22 AM   #2
SethsdadtheLinuxer
Member
 
Registered: Jun 2007
Posts: 152

Rep: Reputation: 37
you should definitely write it - if it's good, contribute it. if not, you learned something.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vpn poptop - CTRL: PTY read or GRE write failed (pty,gre)=(5,6) dezeque Linux - Networking 9 08-26-2016 10:39 AM
SIGSEGV handler (segmentation fauld handler) myp Programming 8 03-08-2011 02:17 PM
Copying program for linux? like copy handler... randknu Ubuntu 3 02-10-2008 02:23 AM
<0>Kernel panic: Aiee, killing interrupt handler! In interrupt handler - not syncing mrb Linux - Newbie 2 01-09-2005 09:47 AM
Exiting program w/ pthreads from sig handler LogicG8 Programming 1 07-29-2004 05:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration