The macosxhints Forums

The macosxhints Forums (http://hintsforums.macworld.com/index.php)
-   UNIX - Newcomers (http://hintsforums.macworld.com/forumdisplay.php?f=15)
-   -   Vim Question? (http://hintsforums.macworld.com/showthread.php?t=25789)

yellow 07-15-2004 07:40 PM

1) Something is wrong, the fink hierarchy is not in your path. Open a new terminal window and do "echo $PATH" again. You should see /sw/bin & /sw/sbin in it.

2) Having . (current working directory) as part of your path is not a good idea. I can be used to exploit and compromise your UNIX box.

vancenase 07-15-2004 07:43 PM

fvs ... are you using TCSH? if you are using BASH, adding those lines to the .tcshrc will not help (might go in .bashrc?)

yellow 07-15-2004 07:45 PM

Quote:

Originally Posted by fvs
Thu:15 % echo $PATH
/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
Thu:15 %

Looks to me like tcsh, though he did declare his own prompt, so I be getting fooled. But he did mention he was using Jaguar.
If so, like vancenase said, that source source /sw/bin/init.csh needs to go into your .bashrc.

sao 07-15-2004 10:40 PM

Quote:

fvs wrote:
hu:15 % echo $PATH
/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
You could have avoided such a 'long' exercise if you would have posted the result of 'echo $PATH' as yellow asked you to do in his first post, or read and follow the info at the link I suggested to set your PATH environment variable following Fink guidelines.

Anyhow, run in Terminal.app and post the result of:

sw_vers
fink -V
echo $SHELL
echo $0

Then, check to see if you have in the /sw/bin directory "pathsetup.command" or "pathsetup.sh" . If you have the first one, run from Terminal.app:

open /sw/bin/pathsetup.command

If you have the second one, run from Terminal.app:

/sw/bin/pathsetup.sh

When done, run in Terminal.app and post the result of:

echo $PATH

fvs 07-16-2004 06:44 AM

Sao, Here are results

clear infocmp xgettext
dpkg infotocap xxd
dpkg-architecture init.csh zcat
dpkg-buildpackage init.sh zcmp
dpkg-checkbuilddeps md5sum zdiff
dpkg-deb msgcmp zforce
dpkg-distaddfile msgcomm zgrep
dpkg-genchanges msgfmt zipgrep
dpkg-gencontrol msgmerge zipinfo
dpkg-name msgunfmt zless
dpkg-parsechangelog ngettext zmore
dpkg-query pager znew
dpkg-scanpackages pathsetup.sh
Fri:16 % open /sw/bin/pathsetup.sh
2004-07-16 06:37:48.916 open[421] LSOpenFromURLSpec() returned -10814 for application (null) path /sw/bin/pathsetup.sh.
2004-07-16 06:37:48.918 open[421] Couldn't open file: /sw/bin/pathsetup.sh
Fri:16 % echo $PATH
/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
Fri:16 %
Fri:16 % cd Terminal.app/
Fri:16 % echo $PATH
/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
Fri:16 %

fvs 07-16-2004 07:05 AM

Sao, Yellow and Vancense I'm running:
Fri:16 % echo $SHELL
/bin/tcsh
Fri:16 %
ri:16 % env
HOME=/Users/franksoranno
SHELL=/bin/tcsh
USER=franksoranno
LANG=en_US
PATH=/Users/franksoranno/bin:/user/local/sbin:/usr/sbin:/sbin:/usr/local/bin:/usr/bin:/bin:.:/Developer/Tools
__CF_USER_TEXT_ENCODING=0x1F5:0:0
TERM=vt100
TERMCAP=����
TERM_PROGRAM=Apple_Terminal
TERM_PROGRAM_VERSION=81
LOGNAME=franksoranno
HOSTTYPE=macintosh
VENDOR=apple
OSTYPE=darwin
MACHTYPE=powerpc
SHLVL=1
PWD=/Users/franksoranno
GROUP=staff
HOST=Frank-Sorannos-Computer.local.
VISUAL=vim
DISPLAY=:0
MANPATH=/sw/share/man:/usr/share/man
INFOPATH=/sw/share/info:/sw/info:/usr/share/info
PERL5LIB=/sw/lib/perl5:/sw/lib/perl5/darwin
EDITOR=vim
Fri:16 %

I really appreciate all the help, Your the greatest bunch. Maybe I need to start from scratch?
Is there away to clean up my present terminal and start all over? Frank

fvs 07-16-2004 07:15 AM

Yellow I did notice this reply:
2) Having . (current working directory) as part of your path is not a good idea. I can be used to exploit and compromise your UNIX box.

How am I supposed to have my path set without the current working directory, Can you show me.
Thanks for all the help. Frank

sao 07-16-2004 08:02 AM

fvs,

Let's not waste time! You obviously did not read my previous post correctly. Re-read it 3~4 times until you understand it.

First, you didn't post the result of running in Terminal.app the following:

sw_vers
fink -V
echo $SHELL
echo $0


Second, what is this...???
Code:

clear infocmp xgettext
 dpkg infotocap xxd
 dpkg-architecture init.csh zcat
 dpkg-buildpackage init.sh zcmp
 dpkg-checkbuilddeps md5sum zdiff
 dpkg-deb msgcmp zforce
 dpkg-distaddfile msgcomm zgrep
 dpkg-genchanges msgfmt zipgrep
 dpkg-gencontrol msgmerge zipinfo
 dpkg-name msgunfmt zless
 dpkg-parsechangelog ngettext zmore
 dpkg-query pager znew
 dpkg-scanpackages pathsetup.sh


Third, you ran the following, which is wrong!
Code:

Fri:16 % open /sw/bin/pathsetup.sh
Again, re-read my previous post and follow my instructions correctly. If you found in the /sw/bin/ folder the file "pathsetup.sh" then run in Terminal.app :

/sw/bin/pathsetup.sh

This command will set your PATH environment variable in order for you to use the software installed in Fink's directory hierarchy.

When done, run 'echo $PATH'.

fvs 07-16-2004 08:24 AM

Fri:16 % cd /Applications/Utilities/Terminal.app/
Fri:16 % /sw/bin/pathsetup.sh

Fri:16 % pwd
/Applications/Utilities/Terminal.app
Fri:16 % sw_ver
sw_ver: Command not found.
Fri:16 % fink -V
fink: Command not found.
Fri:16 % echo $SHELL
/bin/tcsh
Fri:16 % echo $0
-tcsh
Fri:16 % Fri:16 % cd /Applications/Utilities/Terminal.app/
Fri:16: Command not found.
Fri:16 % /sw/bin/pathsetup.sh

Fri:16 % Fri:16 % /sw/bin/pathsetup.sh
Fri:16: Command not found.
Fri:16 %
Fri:16 % echo $path
/Users/franksoranno/bin /user/local/sbin /usr/sbin /sbin /usr/local/bin /usr/bin /bin . /Developer/Tools
Fri:16 %

sao 07-16-2004 08:40 AM

fvs,

Ok. Let's quickly start again. Open a finder window, do you see a /sw folder?

fvs 07-16-2004 08:49 AM

I can't see it in finder window. Not in my Home.

sao 07-16-2004 08:52 AM

fvs,

No, not in your home directory, look at the / level of your HD.

fvs 07-16-2004 09:01 AM

I was in my desktop HD franksoranno Home.

sao 07-16-2004 09:04 AM

fvs,

Open a finder window, click once in your HD icon, you will should see inside the following folders:

Applications
Developer
Library
System
sw
Users

Do you see the sw folder?

fvs 07-16-2004 09:08 AM

Yes its there, Sorry

sao 07-16-2004 09:22 AM

fvs,

Great! Now, put the finder window in column view and select the folder sw, do you see now a bin folder?

If you see a bin folder, select it and now look inside for either one of these two files:

pathsetup.command

or

pathsetup.sh

Which one do you see?

fvs 07-16-2004 10:23 AM

pathsetup.sh

sao 07-16-2004 10:50 AM

fvs,

Ok. That was to confirm which file you had.

After you ran in Terminal.app the script "/sw/bin/pathsetup.sh", did you typed 'rehash' or closed/open Terminal.app ?

You PATH should look like this:
Code:

[pm @ Sao: ~] % echo $PATH
/sw/bin:/sw/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/Users/pm:/Users/pm/bin:/usr/X11R6/bin:/Developer/Tools

If the command "/sw/bin/pathsetup.sh" didn't work, you can set your PATH environment variable manually.

Do you have a ~/.cshrc or ~/.tcshrc file? What's the result of:

ls -a

fvs 07-16-2004 11:15 AM

I did as you asked and got an error message that it could not set the path and to look in .tcshrc file.
Here it is;

UW PICO(tm) 4.6 File: .tcshrc

alias cp cp -i \!\*
alias mv mv -i \!\*
alias trash mv \!\* ~/.Trash
alias print="lpr -P"
set path = ( $path /Developer/Tools )
setenv VISUAL vim
setenv DISPLAY :0
set path=( $path ~/bin )
alias rm rm -i \!\*
find . -name $1 -print
set prompt='%d:%D %# '
umask 022


source /sw/bin/init.csh

sao 07-16-2004 11:58 AM

fvs,

Ok, write the line:

source /sw/bin/init.csh

as the first line in the beginning of your ~/.tcshrc file.

Then close and save the file and type 'rehash' or close/open Terminal.app.

Finally, run again:

echo $PATH


All times are GMT -5. The time now is 10:36 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.
Site design © IDG Consumer & SMB; individuals retain copyright of their postings
but consent to the possible use of their material in other areas of IDG Consumer & SMB.