1

I try to open an app in OSX — let's say Notes for instance, I use two commands in terminal to switch to other user:

sudo -u user /Applications/Notes.app/Contents/MacOS/Notes

this opens Notes as user, I can type, click and use normally as user

If I use su

 su - user

then launch the app

/Applications/Notes.app/Contents/MacOS/Notes

It does launch the app, but the keyboard does not work; why is this? Can you pour some insight into this?

  • Possible duplicate of su vs sudo -s vs sudo -i vs sudo bash – muru Dec 26 '17 at 3:45
  • @muru, I thought so at first too, but I don't think the answer on that question explains why the keyboard wouldn't work with su. Maybe I missed it? – Jesse_b Dec 26 '17 at 3:46
  • @Jesse_b some macOS-specific environment variable that doesn't get carried over to login shells. Does it matter which? – muru Dec 26 '17 at 3:48
  • 1
    At any rate, help center says: "The Unix foundation underlying OS X (but generally not frontend application questions)" ... so dupe or off-topic. – muru Dec 26 '17 at 3:50
  • Justin, can you use su - user to open another application and see if the keyboard works with it? – Jesse_b Dec 26 '17 at 3:52

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.