Eu não tenho OS X
para testar isso, mas encontrei essa resposta na rede ( fonte ):
Because of the way
open
works [...] programs started withopen
wouldn't have root privileges. The system isn't designed to do that.[...] However combining
open
andsudo
[...] results insudo
runningopen
as root, butopen
still opens the application as the original user!
Evitar open
deve funcionar:
sudo -b /Applications/TextEdit.app/Contents/MacOS/TextEdit .bash_profile