I have a program run from the command line in OSX that I want to be able to pop up messages occasionally by running something like this:
osascript -e "display dialog \"Message\""
This works fine if I never change users. If I su other_user
and run the program on the command line, it continues to work. But if I su - other_user
, it no longer works, saying error retrieving current process
.
How can I get display dialog
to run even after changing users with su -l
?