Linked Applications

mromey

Registered
Right now I have OSX set up to automatically open up a terminal when I log in. At our office, once upon a time we had a Unix guru come in and set up some stuff on our Unix box. He set up some commands/script/link to automatically open applications from a shell regardless of yuor location. For example, when I login on my OSX box it automatically locates me in my documents directory. I'd like to set up a link so that I could type for example "mov" and it would open movie player, regardless of my location. How do I do this? As well I tried moving to my application directory and tried opening an application form a terminal. For example I typed ./Stickies.app Why didn't this run the application? Is this becasue these apps are not Carbonized?


Mike Rormey
 

zpincus

Registered
Typing open -a appname will open an application named appname if it is in the Applications folder (I don't know if open can find apps in subfolders thereof.) Just typing ./Stickies.app doesn't work because "Stickies.app" is a folder that contains the application and its resources. (You could type: Stickies.app/Contents/MacOS/Stickies to open the executable from where it lives embedded in the .app folder.)

Open also works on files (open /path/to/file works just like double-clicking it).

As far as typing "mov" to open movieplayer, what you want is an alias. Make yourself a file called .tcshrc in your home folder (do this with pico) and in the file put the line
alias mov 'open -a MoviePlayer.app'
(or whatever command you figure to open the movie player with "open").
Now every time your shell starts up it will read the .tcshrc file and alias the command "open -a MoviePlayer.app" to "mov".

Hope this helps,

Zach

PS. What you should really do is to put MoviePlayer in the dock. This is way easier and achieves the same effect. No need to use the CLI when there are GUI tools to do the same.
 
Top