2

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

Eric O. Lebigot
  • 91,433
  • 48
  • 218
  • 260

1 Answers1

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:

Otherwise you would need to actually use an inter-process communication (IPC) method between the two scripts as opposed to controlling the terminals:

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
  • 1
    You 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