![]() ![]() To run a shell script from within that window, simply give do script the path to the shell script: osascript -e 'tell app "Terminal" to do script " /path/to/script.sh"'Īgain, if you require focus after that, run the second activate command from above. If you additionally require focus on this new terminal window, run after that: osascript -e 'tell app "Terminal" to activate' The easiest and most portable way to launch a new Terminal.app window from within a shell is to run the following AppleScript command: osascript -e 'tell app "Terminal" to do script ""' Instead, it defines default applications for certain MIME types, URI schemes, or file types. ![]() It would rely on an alternatives system, which simply doesn't work that way on OS X. The x-terminal-emulator does not exist in OS X.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |