Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 17 Oct 2001 15:10:45 +0100
From:      David Dooley <dpd@raffles-it.com>
To:        "Chuck O'Donnell" <cao@bus.net>
Cc:        Korcek Vladimir <Vladimir.Korcek@icn.siemens.de>, "'freebsd-questions@FreeBSD.ORG'" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Execute program? 
Message-ID:  <200110171410.f9HEAjc06221@arrow.lan.raffles-it.com>
In-Reply-To: Message from "Chuck O'Donnell" <cao@bus.net>  of "Wed, 17 Oct 2001 09:39:16 EDT." <20011017093916.B40473@bus.net>

next in thread | previous in thread | raw e-mail | index | archive | help
> On Wed, Oct 17, 2001 at 03:27:47PM +0200, Korcek Vladimir wrote:
> >    Hi Folks,
> > 
> > I have a question about executing a programs.  For example I've
> > currently installed Netscape. It's installed in directory
> > "/usr/local/netscape". I have to run it only from this directory and
> > with command "./netscape".  I want to be able run it from anywhere
> > (from any directory) and lets say with command "netscape" without
> > "./".  What should I do. Whitch file I have modify? What I have to
> > add and which file I have to add this to?
> 
> If you install netscape from the ports tree, it will handle this for
> you, as well as adding a few other handy packages. But, to answer your
> question, you may just want to create a symolic link or a shell script
> in some directory in your path, such as /usr/local/bin. Of course,
> you'll need to be root of you are working in a system directory like
> /usr/local/bin.
> 
> 1. Shell script method:
> 
> Maybe something like "/usr/local/bin/netscape":
> 
> #!/bin/sh
> exec /usr/local/netscape/path/to/netscape-binary "$@"
> 
> Don't forget to ``chmod 755 /usr/local/bin/netscape''
> 
> 2. Symbolic link method:
> 
> ln -s /usr/local/netscape/path/to/netscape-binary /usr/local/bin/netscape
> 
> 
> Good luck,
> 
> Chuck
> 
You could always try adding the directory to your path, by modifying 
ether the system profile or your own local profile, depending on 
which shell your using.


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200110171410.f9HEAjc06221>