I've only tested this on Tiger, but I'd be surprised if it didn't also work on Leopard. And as I discovered after a bit of experimentation, you do need to use an absolute path to the binary. Emacs doesn't recognize this parameter, but other apps probably do. Installed RCDefaultApp and set the default telephone app there but the phone-icon in contacts application is still greyed-out. For example, my script for Emacs.app looks like this:Įxec /Applications/Emacs.app/Contents/MacOS/emacs-bin -geometry 177x47 at the end may or may not really be necessary, but I put it in to be on the safe side - the OS apparently passes a parameter starting with -psn that I'm guessing is the position at which to place the app's window (remembered from the last time it was run). I have to set the default telephone app on 10 iMacs and don't want to register 10 iCloud-accounts just to do the facetime login and being able to open the preferences there. To cause this executable to be run with specific arguments, simply rename the existing executable to something else (I've used something like appname-bin) and replace it with a shell script that exec`s the renamed binary with whatever arguments you please (followed by chmod 755 or similar to make the script executable). It turns out there's a very easy way to do this.Īs many already know, what appear as applications on OS X are in fact directories, containing the actual executable in their Contents » MacOS subdirectory. Recently I've been wanting a way to pass command-line arguments to GUI apps by default, in my case a -geometry parameter to Emacs.app to make it start up in something approximating full-screen mode.
0 Comments
Leave a Reply. |