On 5/16/06, Wayne Brehob <[EMAIL PROTECTED]> wrote:
> Matt,
>
> I'll reply on a few statements/questions:
>
> > It also seems that I have a .profile file with that test -r line in it,
> > but I thought I had to use .cshrc for Tiger?
> >
> You can use whatever shell you want.  I, personally, use 'tcsh'.
> If you're not sure what you're using, you can finger yourself
> (I promise -- I am NOT trying to be crude).
>
> myprompt% finger brehob
> Login: brehob                           Name: Wayne Brehob
> Directory: /Users/brehob                Shell: /bin/tcsh
> ...
>
> You can change your shell with the 'chsh' command if you'd like.
>
> If you use 'csh', it reads .cshrc.  If you use 'tcsh', it reads
> .tcshrc (or .cshrc if there is no .tcshrc).  'bash' uses .bashrc
> I believe, and 'sh' or 'ksh' will use .profile.
>
> > 1) Edit .cshrc to export DISPLAY=:0

Umm, no.  For csh-style shells you'd want this to be

setenv DISPLAY=:0

> > (will this be bad to do, in general)?
> >
> If you only login to your machine on the console, no.
> If you login from other locations, it will give you grief.
> I suggest putting it in your .xinitrc.

I don't know if this is really necessary, however--I'd always found
DISPLAY to be set automagically by starting X.

>
> > I'd still like to find:
> > 1) A "best practice" way to make Terminal $PATH == X11 $PATH at all times
> > (given the limited changes, this is happening right now, which is good
> > enough).
> >
> You'll see that below.  Here is my .xinitrc file:
>
>  #!/bin/sh
>  exec > .xnoise 2>&1
>  #
>  # Get PATH from .tcshrc or .cshrc.
>  #
>  eval `/bin/tcsh -c "echo PATH=\\$PATH"`; export PATH
>  #
>  # Set a DISPLAY if there is none.
>  #
>  if [ -z "$HOST" ]; then HOST=`hostname`; export HOST; fi
>  if [ -z "$DISPLAY" ]; then DISPLAY=${HOST}:0.0; export DISPLAY; fi
>  xrdb -merge .Xresources
>  exec quartz-wm
>

I'm curious why just having a

source /sw/bin/init.sh

doesn't produce the same effect (and set more environment variables
than just PATH).  Also, I've found that setting the environment in
~/.xinitrc only really works for those applications that get run in
that script, and if I run an xterm afterward without doing either of
the things I discuss below I get one that doesn't inherit my Fink
environment.

> As you can see, I'm forcing .xinitrc to use /bin/sh even though my login
> shell is /bin/tcsh, so I run a quick /bin/tcsh to get my PATH, then I
> export that to anything that runs after that in the .xinitrc.
>

You don't have to _force_ .xintrc to be processed by /bin/sh, by the
way, because .xinitrc is ALWAYS processed by /bin/sh, irrespective of
your login shell.

As I said before, you can always use the "login shell" option for
whichever X terminal you want, e.g. change the X11.app Terminal menu
item from

xterm

to

xterm -ls

The method I use. which  is to set my environment stuff in ~/.bashrc,
since that's the only Unix-style shell config file that X11.app
processes.  (Yeah, I know about ~/.MacOSX/environment.plist, but it's
my computer)

-- 
Alexander K. Hansen
Fink Documenter (for now)
Help keep AKH in Fink!  Go to
http://ldx3.psfc.mit.edu/~hansen/
and contribute to the Mini fund.


_______________________________________________
Fink-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fink-users

Reply via email to