Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Open folders via Terminal's Dock icon UNIX
For the longest time, I've been able to drop folders onto Terminal.app's dock icon and have Terminal.app open a new window with the current working directory set to the folder I dropped on Terminal.app. This is mighty handy. Unfortunately, no one else I knew could ever do this on their machines. So I figured it must've been something I did back in 10.0 or something. Recently, I worked out how to make this work in 10.4 (and probably earlier versions) for anyone.

Open Terminal's Preferences window, and change "Execute the default login shell using /usr/bin/login" to "Execute this command (specify complete path):" and enter /bin/tcsh as the command (it also works with /bin/bash). Now simply drag and drop a directory to the Terminal.app icon in your Dock (you will probably have to press Command-Option while dragging in order to force the drop). Terminal will open a new window, with tcsh set to the directory that you dropped on Terminal. I'm guessing what's actually happening is the path of the directory is being passed to the shell. Anyway, its very handy.

[robg adds: If you do this, I believe your Terminal will no longer run your shell startup scripts ... but it does work as described. For most of the convenience without the lost functionality, I rely on this hint, and just keep the script in the Sidebar -- since you're dragging and dropping anyway, the Sidebar is usually a closer and easier target to hit, and your Terminal should work as normal when you just open a new window.]
    •    
  • Currently 2.50 / 5
  You rated: 3 / 5 (4 votes cast)
 
[6,237 views]  

Open folders via Terminal's Dock icon | 3 comments | Create New Account
Click here to return to the 'Open folders via Terminal's Dock icon' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Open folders via Terminal's Dock icon
Authored by: jesboat on May 23, '05 07:05:51PM

You should be able to get the shell to do its init scripts by launching it as a login shell, by sticking "-l" at the end of its command line (e.g use "/bin/bash -l").

Jesboat

---
--
With no walls or fences on the 'net, who needs Windows or Gates?



[ Reply to This | # ]
Open folders via Terminal's Dock icon
Authored by: nemoinis on May 24, '05 04:39:42PM

I like to use "Open Terminal Here", a free contextual menu item that launches Terminal and does a cd to the folder you've right-clicked on.
Have not tried it in Tiger, but it works well in all versions of Panther.



[ Reply to This | # ]
Open folders via Terminal's Dock icon
Authored by: wgscott on May 26, '05 12:00:23AM
Gary Kerbaugh wrote some nice "terminal-finder" and "iterm-finder" interaction scripts. I put them into or you can

[ Reply to This | # ]