I'm trying to create a node script that will run on a keyboard command. I added a custom keyboard shortcut:

node /full/path/index.js

Also tried to create an executable bash script that will run the node command and it doesn't work.

bash commands run, but the node doesn't.

any ideas?

1 Answer 1


Manage to solve it - make the file a node js executable.


1) Add a node shabang to the node.js script, usually:

#!/bin/env node

2) Define custom shortcut command as the full path to the file, i.e:


3) Make file executable, using chmod:

sudo chmod +x /full/path/to/file/index.js

Hope it helps :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.