|
#1
| |||
| |||
| terminal shortcuts is there a way of creating shortcuts for directories and applications so that when, say you want to open Safari.app you dont have to goto ~/Applications and then open Safari.app. It would be nice if I could open a shell and type safari - and there it pops up! I work with Linux in a big company and I can open any application by just typing it in, I dont have to be in the correct directory... Sorry for the newbee question. And I have tried searching for it... E. |
|
#2
| ||||
| ||||
| To open Safari from cli directly you have type: /Applications/Safari.app/Contents/MacOS/Safari You could add the path to safari by adding the following to your .bash_profile : PATH=${PATH}:/Applications/Safari.app/Contents/MacOS/Safari , but then you will start a new instance of Safari on each invocation. Better to add: alias safari="open -a Safari" to .bashrc
__________________ G4 500 MP 1024 MB RAM LaCie Electron 22" Display OS X 10.3.9 iMacDV MacMini iSight iPod + iPod Mini Sony PC100E FireWire Cam Static IP via a FreeBSD server/gateway a lot of other Mac's running Macos 7.5 to 9.1 and NetBSD. A Few Wintel's on the side (I only use them when I get paid by the hour) |
|
#3
| |||
| |||
| so doing "Better to add: alias safari="open -a Safari" to .bashrc" means I can open safari from a shell by just typing "open -a Safari"? Could you explain how I would do this? and does it refere to other apps too? Is this quite a tricky thing to do with terminal? I would have though it was quite straight forward to set up alias commands to open things... |
|
#4
| ||||
| ||||
| You probably don't have a file called ".bashrc" in your home directory, check with "ls -a" in terminal, files beginning with "." are invisible in the Finder. .bashrc is a simple textfile in you home directory, you can create it with any text editor, just be sure to save it as "text only". After you create and save ".bashrc" it is read avery time you open a new terminal window. Then you only have to type "safari" to open Safari, but you could open Safari from the terminal with "open -a Safari" directly without messing with any files at all. The alias entry in ". bashrc" just replaces "safari" with "open -a Safari" to save some typing effort. Try "man open" in a terminal to learn more.
__________________ G4 500 MP 1024 MB RAM LaCie Electron 22" Display OS X 10.3.9 iMacDV MacMini iSight iPod + iPod Mini Sony PC100E FireWire Cam Static IP via a FreeBSD server/gateway a lot of other Mac's running Macos 7.5 to 9.1 and NetBSD. A Few Wintel's on the side (I only use them when I get paid by the hour) |
|
#5
| ||||
| ||||
| Well, a nice free program that will allow you to launch and manipulate files without having to type a full path is Quicksilver. All you do is activate it with a hotkey (command-space for example) and start typing in safari and it will pop up with the option to launch. Of course, there are many more things you can do with Quicksilver, but it makes launching programs easier and keeps your dock neat. ![]()
__________________ OS 10.4.10 PowerBook: G4 1.5Ghz 80Gb 1.5GB Ram Ati-9700 (128Ram) Superdrive ![]() iPod Video 5th gen, black 30GB ![]() AirPort Express with AirTunes |