Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > macOS > Fink Error

Fink Error
Thread Tools
bkb
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Dec 29, 2004, 10:51 PM
 
When trying to launch GNU's Backgammon, i usuall just type:

cd /sw/bin
. gnubg

I am now getting this error:

bash: ����: command not found

Any ideas how to fix this?

Thanks,
BKB.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
MacGorilla
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
Dec 30, 2004, 11:41 AM
 
try ./gnubg
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Dec 30, 2004, 09:07 PM
 
Originally posted by MacGorilla:
try ./gnubg
That worked. What's the difference?
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
MacGorilla
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
Dec 30, 2004, 10:02 PM
 
Originally posted by bkb:
That worked. What's the difference?
Hmmm....one works, one doesn't?

That's always the way you launch apps that aren't in your $PATH. I have never heard of trying it any other way.
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Dec 30, 2004, 11:11 PM
 
Originally posted by MacGorilla:
Hmmm....one works, one doesn't?

That's always the way you launch apps that aren't in your $PATH. I have never heard of trying it any other way.
Hm...

So how come typing:
. gimp

when in /sw/bin

launches GIMP?
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
MacGorilla
Addicted to MacNN
Join Date: Aug 2000
Location: Retired
Status: Offline
Reply With Quote
Jan 1, 2005, 11:34 AM
 
Originally posted by bkb:
Hm...

So how come typing:
. gimp

when in /sw/bin

launches GIMP?
Interesting. Like I said, I never heard of that before.
Power Macintosh Dual G4
SGI Indigo2 6.5.21f
     
macmike42
Senior User
Join Date: Dec 2001
Status: Offline
Reply With Quote
Jan 2, 2005, 10:23 AM
 
. (space) script-name

will run a script within your current shell. If the file is not a shell script, the command will fail. Any changes that such a script makes to your environment will remain in effect after the script completes, since it is actually running within your shell, instead of in a sub-shell.

./command-name (note no spaces)

will run any executable in the current directory. If command-name is a script, your shell will launch a new interpretter to run the script (bash, perl, etc), thereby leaving your current shell environment untouched.

The reason the first one works for The GIMP is that /sw/bin/gimp is a shell script used to launch The GIMP and open image files. The actual executable is /sw/bin/gimp.real (or something similar). One of the reasons for this is so you can say "gimp somefile.png" to open files in the currently-running instance of The GIMP, without launching another copy of the application.
"Think Different. Like The Rest Of Us."

iBook G4/1.2GHz | 1.25GB | 60GB | Mac OS X 10.4.2
Athlon XP 2500+/1.83GHz | 1GB PC3200 | 120GB | Windows XP
     
bkb  (op)
Dedicated MacNNer
Join Date: Sep 2003
Status: Offline
Reply With Quote
Jan 3, 2005, 12:17 PM
 
Originally posted by macmike42:
. (space) script-name

will run a script within your current shell. If the file is not a shell script, the command will fail. Any changes that such a script makes to your environment will remain in effect after the script completes, since it is actually running within your shell, instead of in a sub-shell.

./command-name (note no spaces)

will run any executable in the current directory. If command-name is a script, your shell will launch a new interpretter to run the script (bash, perl, etc), thereby leaving your current shell environment untouched.

The reason the first one works for The GIMP is that /sw/bin/gimp is a shell script used to launch The GIMP and open image files. The actual executable is /sw/bin/gimp.real (or something similar). One of the reasons for this is so you can say "gimp somefile.png" to open files in the currently-running instance of The GIMP, without launching another copy of the application.


Thanks for the clarification.
PBG4/12"/1GHz/1.25GB/60GB//SD/APX/10.3
     
[APi]TheMan
Mac Elite
Join Date: Sep 2001
Location: Chico, CA and Carlsbad, CA.
Status: Offline
Reply With Quote
Jan 3, 2005, 12:51 PM
 
Originally posted by macmike42:
. (space) script-name

will run a script within your current shell. If the file is not a shell script, the command will fail. Any changes that such a script makes to your environment will remain in effect after the script completes, since it is actually running within your shell, instead of in a sub-shell.
And I believe this is called "sourcing" the file, or at least that's what this action is called in tcsh. You often need to source a file such as .profile to set up the current shell with environment variables and aliases. For example, if I made changes to my .profile and I wanted them to be reflected in the current shell without having to log out, I'd source the new file. Check it out:
Code:
[theman@computer: ~]$ echo $macnn [theman@computer: ~]$ echo "export macnn='hello'" >> .profile [theman@computer: ~]$ . .profile [theman@computer: ~]$ echo $macnn hello
So the "gimp" that you seem to be running must be some text file with a command to run the gimp. Check it out using more or cat to read the file.
"In Nomine Patris, Et Fili, Et Spiritus Sancti"

     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 08:37 AM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,