So I have a Python app that starts different xterm windows and in one window after the operation is finished it asks the user "Do you want to use these settings? y/n". How can I send y to that xterm window, so that the user doesn't needs to type anything. Thanks
Asked
Active
Viewed 1,105 times
1 Answers
2
If you are on linux (kde) and you just want to control the xterms by sending commands between them, you could try using dcop:
- http://www.linuxjournal.com/content/start-and-control-konsole-dcop
- http://www.riverbankcomputing.co.uk/static/Docs/PyKDE3/dcopext.html
Otherwise you would need to actually use an inter-process communication (IPC) method between the two scripts as opposed to controlling the terminals:
- http://docs.python.org/library/xmlrpclib.html
- http://docs.python.org/library/ipc.html
- Some other IPC or RPC library
- Simply listen on a basic socket and wait for ANYTHING. And then from the other app open a socket and write SOMETHING to signal.
Or at a very very basic level, you could have one script wait on file output from the other. So once your first xterm finishes, it could write a file that the other script sees.
These are all varying difficulties of solutions.

jdi
- 90,542
- 19
- 167
- 203
-
1You may consider include this link: http://www.linuxjournal.com/content/start-and-control-konsole-dbus about controlling konsole through dbus (from the same author of dcop tutorial) – FabienAndre Apr 20 '12 at 15:23