From: Bruce S. <Bru...@nc...> - 2005-06-18 13:26:10
|
Thanks for the explanation, Martin. Also, I found the following Fink FAQ about the matter, with the key comment at the end that there's more to this than just adding /sw/bin to the application search path. Q5.15: I get "command not found" errors when I run Fink or anything that I installed with Fink. A: If this always happens, then you may have inadvertently modified (or failed to modify) your startup scripts. Run the /sw/bin/pathsetup.sh script in a terminal window. This program will attempt to detect your default shell and add a command to load Fink's shell initialization script into your shell's configuration. You'll then need to open a new terminal session so that your environment settings are loaded. Note: Some older versions fink called this script pathsetup.command instead of pathsetup.sh. Alternately, you can run the pathsetup.app application on the Fink binary distribution disk image. On the other hand, if you only have problems in the Apple X11 terminal, this probably means that you need to create a .xinitrc file and add the line . /sw/bin/init.sh near the beginning (i.e. before any programs get run). Restart X11 (if running) after you do this. These /sw/bin/init.* scripts do much more than just add /sw/bin to your PATH. Many packages will not work correctly without these additional actions. ----------------- Martin Costabel wrote: > Bruce Sherwood wrote: > >> I did a clean install of Mac OSX 10.4, installed X11 (found by >> scrolling down to "Optional Installs" on the installer DVD), installed >> Fink, and installed VPython, all as per instructions which have been >> updated at vpython.org. Many thanks to Martin Costabel for getting a >> version of Visual into the packages for the 10.4 version of Fink. >> >> One minor thing went wrong: Fink creates a statment in my .profile >> file which should effectively add /sw/bin to the application search >> path. However, it doesn't work: I have to execute /sw/bin/vpython >> rather than simply executing vpython. I tried putting other >> path-setting statements in .profile to no avail. I suspect that >> somehow my .profile is not being processed when I start up X11. A >> colleage also had this problem. Is there a Unix expert who can advise >> us on this? Thanks. > > > If there were a FAQ for Apple's X11, this would be one of the most FAQs :-) > > X11.app, since it is not started from a shell but from the Finder, does > not inherit any environment from shell startup scripts. You have to make > sure yourself that the environment is loaded at the point where you > start your command; how to do it depends on how you start your vpython > command. There are lots of different possibilities, depending on whether > you run your command on the command line from an xterm, from ~/.xinitrc > or the Applications menu and in case you start it from an xterm, whether > you started your xterm from ~/.xinitrc or from the Applications menu. > > Three of the most popular ways to get over this hurdle are: > > 1. Don't use xterm. Set DISPLAY=:0 in your Terminal.app window and run > vpython from there. The shell running inside Terminal.app windows has a > decent environment. Or use "open-x11 vpython". This has the additional > advantage of starting X11.app if it is not running. > 2. Start your xterm not as "xterm" but as "xterm -ls". > 3. Start your xterm from ~/.xinitrc, but have a line > "source /sw/bin/init.sh" as first line of ~/.xinitrc. > |