Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Ken Bloom
On Wed, Oct 26, 2011 at 10:39 PM, Ken Bloom wrote: > You would think that you could write to /dev/$PID/fd/0 and have that be > the input into bash, but you can't. ttys are wierd. > > Xterm uses the Unix 98 pseudo terminal interface to talk to its child > process using a /dev/pts/something device

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Ken Bloom
You would think that you could write to /dev/$PID/fd/0 and have that be the input into bash, but you can't. ttys are wierd. Xterm uses the Unix 98 pseudo terminal interface to talk to its child process using a /dev/pts/something device file. It calls open("/dev/ptmx") which is the single Unix 98 p

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Bill Broadley
I was wondering if I could get this down to just a few lines of code then realized that the shell should be able to handle this. Turns out it works okay. In terminal a: $ while /bin/true; do echo date; sleep 1; done | nc localhost In terminal b I run: ( nc -d -l & cat) | bash And

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Bill Broadley
On 10/26/2011 03:34 PM, Norm Matloff wrote: > > Here's what I'd like to do. I'm running code, in this case Python, in > xterm A (replace by your favorite terminal emulator), and want that code > to write to xterm B, just as if I had typed directly into xterm B. > > Say for example I want to run

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Bill Broadley
On 10/26/2011 04:20 PM, Bruce Wolk wrote: > As for question 1, backticks are what you want: > > echo `ls` > /dev/pts/8 Er, that's running a command in the original window and sending the output to the second window, which isn't what was asked for. Not to mention being rather confusing. The outp

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Harold Lee
You could do this at an X11 level, e.g. http://www.doctort.org/adam/nerd-notes/x11-fake-keypress-event.html This tool looks promising also, but I haven't tried it: http://www.semicomplete.com/projects/xdotool/ I think you'd need to use some Windows API to do this there. Harold On Wed, Oct 26,

Re: [vox-tech] [vox] Shopping for 17x22" flatbed scanner or bigger

2011-10-26 Thread Alex Mandel
I ended up finding what I was looking for by searching for Blueprint scanners. I found at least a couple of companies that make 24", 36" and 42" scanners. They're all sheetfed style some of which remain flat the whole time. If people are interested I'll go back to my notes and post some links. Th

Re: [vox-tech] writing to a shell instance

2011-10-26 Thread Bruce Wolk
On 10/26/2011 03:34 PM, Norm Matloff wrote: > > Here's what I'd like to do. I'm running code, in this case Python, in > xterm A (replace by your favorite terminal emulator), and want that code > to write to xterm B, just as if I had typed directly into xterm B. > > Say for example I want to run th

[vox-tech] writing to a shell instance

2011-10-26 Thread Norm Matloff
Here's what I'd like to do. I'm running code, in this case Python, in xterm A (replace by your favorite terminal emulator), and want that code to write to xterm B, just as if I had typed directly into xterm B. Say for example I want to run the ls command in xterm B, but do so via some action in