[NTLUG:Discuss] Shortcuts

Greg Edwards greg at nas-inet.com
Thu Aug 23 16:52:23 CDT 2001


Patrick Parks wrote:
> I have a easy question, that I can not seem to find an answer for. I
> have a program, lets say Netscape browser that I want to create a
> shortcut for in my desktop. In order to get this program to launch, I
> have to cd to the directory where it is located "cd
> /usr/local/netscape6.1" then I have to type "./netscape" to get it to
> run, not just netscape. My question is, how would I type this in the
> command section of the launcher that I am trying to create, and why do I
> have to do a "./" to get it to run, it is the first program I have had
> to do this with, and I do not understand what the "./" does. Could
> someone please enlighten me? Thanks.

Patrick,

*nix systems use a method of searching only know directory paths to
execute a program from.  To determine what paths to search the command
line path is used first and if no path was given the list of directories
in the path environment variable are used.

When you put the "./" on the command line your telling the system
(shell) to search the current working directory for the program to run. 
By default the current working directory is not included in you path
enviroment variable.

There are 2 standard methods to include a path to be searched for a
program to run.  You can add the desired path to your "/etc/profile"
file which will make the path available to all users.  Or add it to your
.bash_profile file (assuming bash shell is your default) in your home
directory.  Do a "man bash" to start down the self education trail on
the subject.

Other methods exist to finding a program, but this should keep you busy
for awhile:)

-- 
Greg Edwards
New Age Software, Inc.
http://www.nas-inet.com



More information about the Discuss mailing list