From: Martin C. <cos...@wa...> - 2005-06-17 23:48:19
|
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. -- Martin |