How do I run apps in X11?

Paul Forbes

Registered
Hi all,
I know very little about unix but want to learn stuff. So I have Apple’s X11 Public Beta v0.2.1 on Jaguar 10.2.4 and it works fine. I’ve now installed Fink Commander and that seems to be working okay except when I download programs with Fink and try and run them from the X11 terminal (by going to the correct path and typing the program name) it says something like “command unknown”. What am I doing wrong? I’ve tried some very basic programs like a calculator and a game called “3dpong” and they all say the same error.
Thanks.
- Paul
 
You need to add the path to your PATH environment variable. If you just go to the path and then try to type the name, it won't work, because your PATH doesn't include that path.

If you're using the default tcsh shell, type setenv PATH="${PATH}: path_where_programs_are" (sorry, I don't use Fink, so I don't know where they're installed).

Edit: I had to put a space between the : and the p because it showed a smiley - don't put that space when you type that.

You'll have to do that every time you make a new window in Terminal unless you add that to your login script - I don't use tcsh, so I'm not sure of the file, hopefully someone else can tell you that one.

Alternatively, you can go to the path, and type ./program_name and that will start it up.
 
If fink is installed correctly, and you're using the tcsh shell, you should add the following line to the file .cshrc in your home directory:

source /sw/bin/init.csh

You could check to make sure the file is there by
typing

ls /sw/bin/init.csh

at the tcsh prompt -- you should just see the filename repeated. Now when you create a new
terminal, your fink programs should be recognized.
 
Thanks Darkshadow & randomdude. I'll try it all tonight and let you know how I get on (because I bet there'll be more questions after I get that working!)
- Paul
 
I edited my .cshrc as suggested and everything is working. Thanks again Darkshadow & randomdude. One other thing: what does .cshrc and .xinitrc stand for (if anything).
 
Paul -
The abbreviation "rc" stands for "run commands", and is often used in the UNIX world as the last two letters of a file of commands to be run each time a program starts. The commands in .cshrc are run each time you run csh (the default shell that Mac OS X uses when you open a terminal), and the .xinitrc commands are run when the X window system is initialized. Not all programs use the "rc" convention though -- if you type
"ls -a" from your home directory, you'll see a bunch of startup files along with directories that some programs have created. (The -a tells ls to show all files, including ones that begin with a period, which are normally hidden.)
 
Back
Top