Communication between two programs on unix

Geoff Gerrietts geoff at gerrietts.net
Wed Jan 22 19:50:11 CET 2003


Quoting morden (morden at shadows.net):
> 
> I want the communication to work over cu session because some of our
> customers live in stone age and don't have Internet connection.
> So I want to run gui locally and eventually throw out Motif and move
> all the gui into Tkinter. For now I'm just moving modal dialogs
> into Tkinter.
> The reason to dump Motif is because the lib we use on top of it (Zinc 
> 4.0) seems pretty buggy and Tk is pretty stable compared to it.
> 

I'm still not quite able to make sense of how you expect or desire the
final product to work.

I've got that you want to use a variety of different "links":
cross-memory, via popen; cross-serial line, via cu; cross-internet,
via ssh.

I'm not sure what data you're really looking to have the programs
exchange. It sounds to me like what you'd like to do is present the
motif application as it stands, but on occassion, override its
behaviors with dialogs you've created.

This is going to be nontrivial. I can't speak definitively for what
must happen to make this work, but there's no simple file-like,
character-mode interface for an X program. Or, rather, there's a
file-like interface, but the data transfered on that connection is
going to consist of X server instructions. Your "client program", the
tkinter jobbie, would need to fake the motif program into believing it
was an X server (I think nontrivial), and the tk program must know
enough to know when its being asked to draw a modal dialog (maybe
easy, maybe not).

I have no idea about the feasibility of doing this via cu. I also
don't know if you can hijack ssh's X forwarding facility to accomplish
this for you -- maybe, but I honestly don't know. I think you might
need to go with an ssh-tunnel solution.

Am I on the right track here? Or do you really want to exchange only
that information that, if started from an xterm, your two programs
would print to the terminal, rather than display in a GUI?

Thanks,
--G.

-- 
Geoff Gerrietts             "Me and my homies, we tag O.D.."
<geoff at gerrietts net>        --Unknown grafitti artist at a party





More information about the Python-list mailing list