Bash woes
Bash woes
- Subject: Bash woes
- From: Massimo Marino <email@hidden>
- Date: Thu, 26 Aug 2004 08:41:41 +0200
On Aug 26, 2004, at 7:01 AM, email@hidden wrote:
On Aug 25, 2004, at 3:00 PM, Wilson Cheung wrote:
For owners of newer Macs you will probably have /bin/bash as your
default shell and things will almost work for you but not quite. For
example you will be frustrated with how to set the PATH environment
variable other than inside /etc/x11/xinit/xinitrc.
Uhmm, part of $PATH is set in .bash_login, the rest in .bashrc, and
some more interactively. Having a local .xinitrc makes so that the
system one is disregarded - as it should - .
You will find
that creating ~/.xinitrc will tend to hang the xterm application and
crash X11.
Uhmm, nope, just runs along nicely - as it should - .
The environment.plist file won't work for you, the
.bash_profile file won't work for you, even though .bash_profile will
be read by the OS X Terminal application.
Uhmm, nope, just works. For example, the ~/.MacOSX/environment.plist
sets system-wide env variables like CVSROOT and CVS_RSH. This allows
Xcode to access the CVS repository on the Linux server.
.bash_login starts the ssh-agent, adds keys and .bash_logout kills the
agent through its PID set at login.
If you do buy Matlab, which runs with X11, you will find that shells
that Matlab spawns won't have the right PATH.
I do not do Matlab, but in general If you double-click an application -
say on the Dock - to have it the full environment either you use
~/.MacOSX/environment.plist or you run off the terminal with 'open -a
<application-name>'
Note that ~/.MacOSX/environment.plist is read ONLY once at login. If
you are logged and create that file or modify it you have to logoff and
login again... unless in the list someone knows of another trick.
If you build and install gnuplot you will find that it can't define
the X11 terminal type.
Dunno about this. Here people uses PAW++ or ROOT. No issues there.
HOWEVER, once you go into NetInfo Manager and change the default shell
of the current account to /bin/tcsh things will begin to change
dramatically.
They shouldn't. The only thing you should get is a different shell.
Notice that bash shell script might *seem* to work but actually don't.
In many cases it simply dies without warning but nothing is done. Have
you tried to look into Console logs when you run with bash?
Once you do this and reboot your Mac suddenly X11
recognizes .tcshrc.
This - and some 800 others Macs at the lab - do recognize .bashrc .
So any path you set inside .tcshrc gets set.
Suddenly Matlab which runs under X11 has the right PATH. Suddenly
gnuplot knows about the X11 terminal and can plot.
I now tend to think about some typo or wrong command making your bash
script dying silently, hence it never reaches the point where you try
to customize your environment.
If you go back and change to the /bin/bash shell again and reboot.
Things are broken once again.
See the above.
I suspect much of the shareware, freeware software out their has been
tested for tcsh but not so much for bash.
Bash is default shell with Panther and this last is out since few days
;-} True though that if you had some X11 <any>ware they were probably
targeting (t)csh and not even providing bash script. Not surprising
they do not work.
If you have those running during the login process they might pretty
well killing you although you should at least find trace of errors in
the logs using Console.
Wilson, by the kind of reply you are having in the list it should be
evident that the problem is not bash. You have something else giving
you troubles. Difficult to find the culprit without sitting in front of
your Mac and going through each step in the login process.
Cheers
_______________________________________________
x11-users mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/x11-users
Do not post admin requests to the list. They will be ignored.