0

I need to send string to stdin and display it on the screen

/proc/$pid$/fd/0

But it works only in console-based progams(cat, nano, etc). How to send it to GUI application?

ish
  • 11
  • 3
  • 1
    Can you provide more specifics about what you are doing to write to the specified file, then more specifics about what you want sent to a GUI application (existing, new, REST call, etc etc etc). – JoeG May 22 '15 at 13:36
  • 2
    The same way. stdin doesn't care about if the program is GUI, text-mode, or no UI at all. I'm pretty sure this is a XY problem - explain what you want to achieve and there may be a different way altogether to handle it. – Sami Kuhmonen May 22 '15 at 13:39
  • 1
    Your GUI program probably doesn't read from its standard input. – chepner May 22 '15 at 13:45

1 Answers1

0

You will need identify the window in the system and inject them the keyboard events with a tool like "xdotool".

See this question as reference: X11: move an existing window via command line?

Community
  • 1
  • 1
pasaba por aqui
  • 3,446
  • 16
  • 40