Reputation: 43
I need to emulate a key into a particular process running, i have no control about it's source code and Xserver isn't running, I believe the proc is using directfb to handle keyboard inputs.
Upvotes: 0
Views: 1608
Reputation: 77359
You should be able to open a virtual terminal (fire a 'man 7 pty' to read the docs).
You can also run the app inside a detached screen and use the 'stuff' command to send input to the virtual window. Try it on the command line:
Start the application:
$ screen -S sessioname -d -m /path/command
Send input:
$ screen -S sessioname -X stuff 'input line 1
input line 2
...
input line n
'
Upvotes: 1