Finder has a menu item found under Go ("Go to Folder…") where you can type a full path.
The command+shift+G keyboard shortcut makes it handy to summon. This short cut works in the file open and save dialog as well.
If you are on 10.7 and not 10.8, the solution below works well:
I had the same problem with eclipse, but now I've added e.g. the following to my .bash_profile and then it worked.
launchctl setenv PATH $PATH
In case you want to leave the original path intact use
p=$(launchctl getenv PATH)
launchctl setenv PATH /my/new/...
Yes, create a .bash_profile file in your home directory containing
and then do one of the following to make the change active
execute . ~/.bash_profile
execute PATH="/usr/local/bin:$PATH" in the current shell
The simplest way is to restore from a backup e.g from Time Machine
However if the last backup is long enough ago that there is other changes you want to keep the you can edit .bash_profile
In a terminal you can use the full path to the editors ( /usr/bin/emacs /usr/bin/vi or /usr/bin/nano) to edit ~/.bash_profile
To answer you question to your 'new' problem, I've decided to write another answer - because it is easier to explain with samples.
One way to load the environment variables on startup of your tool (IDE) of choice is like it can be done with eclipse - I think there must be a similar structure in your tool (IDE) too.
How it can be done in eclipse - https://...
On OS X 10.10 Yosemite, I used this command:
sudo launchctl config user path <my path setting>
Be aware that his sets the launchtl PATH for all users. This worked well for my use case. Note that you'll be asked to reboot your machine for the effects to take hold.
Have you started a new login shell since adding the new file for ImageMagick? The setting of the path from paths.d entries is done in /etc/profile and /etc/csh.login, so you need to start a new shell for the new entries to take effect.
OS X uses path_helper to set the path based on the files in /etc/paths.d - you can always call it manually (assuming a ...
After many trials with different options I conclude:
Is there a unified way to set the PATH for applications launched by different means (like shell script, Finder and Spotlight)? Well, yes and no:
No: Setting PATH in shell start up scripts (e.g. .bashrc) works only for apps launched by shells.
No: Setting PATH for the current launchd process via launchctl ...
You can select the file and press Option + Command + C to copy the pathname to the clipboard.
You can also use Control + Option + right click in macOS Mojave (copy as pathname will replace copy file in get info modal). Little change but I just found it. Still works on networked drives too.
Your command replaces the entire path variable with your path, thereby removing folders such as /bin. You need to add your path to the existing path, not replace it:
Alternatively, so that you don't replace the tools found in folders that are in your existing path, you can add your new folder to the end of ...
which searches for binaries in the $PATH, a.k.a. command-line tools. User applications are not such tools and not available in the command line.
While Safari.app is an application, the Safari binary is not usually added to the $PATH because it is not a command line tool — if you just run Safari in Terminal your shell will inform you that the command cannot ...
On Mountain Lion all the /etc/paths and /etc/launchd.conf editing doesn't take any effect!
Apple's Developer Forums say:
"Change the Info.plist of the .app itself to contain an "LSEnvironment"
dictionary with the environment variables you want.
~/.MacOSX/environment.plist is no longer supported."
So I directly edited the app's Info.plist (right ...
Bring back a minimal PATH
Enter the following command to reset a minimal PATH:
Edit your ~/.bash_profile with your preffered text editor vi, emacs
Always prefer a relative PATH construct:
Before proceeding as too many beginners do by ...
The default content of /etc/paths until Mavericks (10.9) is:
The default content of /etc/paths since Yosemite (10.10) is:
You need to install the Xcode command-line developer tools. Open Xcode and go to Xcode → Preferences → Downloads, select the Components tab, and click the button next to “Command Line Tools”.
See Is the installation of Xcode from App Store enough for having the developer tools?.
Click on position indicated by the red arrow in the figure below:
This will allow you to choose which folder/path you need. You can also use the Command - Shift - G to open the dialog to explicitly paste / type in a path.
Enter a filename in the File Open dialog
Save file to hidden directory with standard OS X save dialog
To expand on the answer above (because the more appropriate related question is marked as a dupe and can't recieve new answers)...
I've added a function to my ~/.bash_profile to handle revealing a file or directory:
# Reveal a file or directory in Finder
# ..expects only one argument
# the argument is quoted to accommodate spaces in the ...
The Filesystem Hierarchy Standard is followed in Linux and other Unix based OSes, and OS X follows this too, to a large extent. The /private folder is where basically your OS X core resides and the /etc and /var folders are merely symbolic pointers to /private/etc and /private/var respectively. You can verify this by using readlink as readlink /etc.
You certainly don't need to reinstall - just remove the offending last line of the file and restart terminal to see the effects.
If you don't know how to edit the file from terminal, you can open the file in your system's default plain text editor:
Just delete the last line and save the file. (The >> tacks the output of the ...
All software in Mac OS X is installed in /Applications, which can be found in the Finder sidebar
Most Mac applications don't have to be installed, you just have to copy the applications in the Applications folder. Normally, all installed applications that are in the /Applications folder appear automatically in the Launchpad.
You can uninstall ...
In bash, there are two main ways to have spaces in path names:
Backslash escape the spaces
/path/to/folder\ with\ spaces/
Wrap with quote marks
"/path/to/folder with spaces and $variable/"
'/path/to/folder with spaces and a literal $/'
Double quote marks expand shell variables. Single quote marks do not.
I would like to know if there is a command that returns the executable within the application bundle
There is no such command, but I've written a shell script that does exactly that for any application bundle in the file system of your startup disk.
It uses several command line tools included in macOS and leverages Apple's documentation on Launch Services, ...
The command line version would be:
open -R /Library/Frameworks/Python.framework/Versions/
depending on you want to go inside the folder or reveal the folder in finder.
With Mountain Lion /etc/launchd.conf is where you should set the GUI applications Path. Remember it's not a script file; it only supports launchctl commands so you should write something like:
setenv PATH /new/path:/usr/bin:/bin:/usr/sbin:/sbin
Note also that it doesn't support shell environment variable substitutions (like $PATH) so you'll have to set ...
The error message you listed is the result of using one of
export *more or less anything which is not a syntactically correct variable name*
in one of your initialization files. To find the offending line you need to look into all the .profile, .bash_profile and anything sourced/...
The loginwindow process sets a user's environment. It sets the variables TMPDIR and PATH, consults Directory Services and sets SHELL HOME USER LOGNAME . PATH is set to /usr/bin:/bin:/usr/sbin:/sbin unless modified by launchd (in the more current versions of OS X). This is the PATH variable available to the user's processes unless modified by that particular ...