Bash send string to stdin of process

309 Views Asked by At

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?

1

There are 1 best solutions below

0
pasaba por aqui On

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?