Environment of shell commands #251
-
It took me some time to figure out what was going on here, so just posting this in case it's helpful or worth mentioning somewhere in the docs. I was trying to work out why the following wouldn't inject any keys:
I'm on a mac M3, and the homebrew install ended up putting this binary here:
But the shell commands are run with a different environment:
So
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Thanks for reporting! I think launchd should launch keymapper from the installation directory.
|
Beta Was this translation helpful? Give feedback.
-
I tested this, and it requires giving a relative path to the binary, e.g. this now works
I had a play with adding a this to the plist:
And this seemed to work for me - it looks like it sets path to my normal user path plus the keymapper dir, which means i can run keymapperctl (and some other utils) without specifying a path. |
Beta Was this translation helpful? Give feedback.
I tested this, and it requires giving a relative path to the binary, e.g. this now works
I had a play with adding a this to the plist:
And this seemed to work for me - it looks like it sets path to my normal user path plus the keymapper dir, which means i can run keymapperctl (and some other utils) without specifying a path.
(I don't know what I'm doing tho, first time I've tinkered with a launchd config)