Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

need to run a shell command on key press #4

Closed
seshugagan opened this issue Jun 19, 2017 · 3 comments
Closed

need to run a shell command on key press #4

seshugagan opened this issue Jun 19, 2017 · 3 comments

Comments

@seshugagan
Copy link

seshugagan commented Jun 19, 2017

I need to run this command "sudo echo "pause" | telnet 127.0.0.1 9090" on a key press. I have included it in example.ini. It is giving an error "sudo: unable to resolve host max2play".

I can run that command
inputexec --action-commands=/usr/local/example.ini --source-file=/dev/input/by-path/platform-b0170000.i2c-platform-atc2603c-irkeypad.0-event-mouse --action-mode=run_sync

manually on the terminal it is working fine. Could you please help.

@vrs01
Copy link

vrs01 commented Jun 20, 2017

if it is working fine in the terminal, my suggestion is to put the command in a bash script and call the bash script with inputexec. Maybe that helps.

@seshugagan
Copy link
Author

Thank you

@rbarrois
Copy link
Owner

Indeed, this suggestion is the best way to go here - inputexec does not parse the command line and won't interpret pipes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants