On Tue, 16 May 2006, Alexander K. Hansen wrote: > 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 > Good point. That was from the E-mail I forwarded, but didn't think to check the syntax.
> > > (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. > Also a good point. I, personally, am sort of a control freak, so I make sure it's set how I want in several places, but you probably don't have to set it in your .xinitrc. One thing I didn't point out, though, is that if you're using csh or tcsh the .login file is a good place to set it. I use something like this: if ($?DISPLAY == 0) then if ($?REMOTEHOST) then setenv DISPLAY ${REMOTEHOST}:0 else setenv DISPLAY :0 endif endif > > > > > 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. > I set other things in my path that are not automatically there. If the Fink paths are all you add to the standard paths, Alexander's suggestion would work the same, but if you have other things, getting the PATH from your "usual" environment can be helpful. Also, that might be ". /sw/bin/init.sh" for some shells, or do all bourne shell variants understand "source" now? Wayne ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Wayne Brehob [EMAIL PROTECTED] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ _______________________________________________ Fink-users mailing list Fink-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/fink-users