DTerm icon

How does DTerm determine the working directory when activated?

When DTerm is activated, it tries to automatically choose a good working directory based on the frontmost window.

DTerm uses these rules to determine its working directory:

Step 1

If the frontmost window belongs to the Finder, the working directory is set to the “target” directory of the window, if available. This is the directory displayed in the title bar of the window.

Step 2

Otherwise, if a list of selected items can be obtained from the frontmost application, the working directory is set to the directory which contains the first selected item.

Step 3

Otherwise, DTerm uses your home directory as its working directory. This generic DTerm window will appear at the top of the screen to distinguish it from DTerm windows which were able to derive their working directories from the frontmost window.

Related Topics

Inserting selected items into the command line

Why do I get a generic DTerm window?