From owner-freebsd-questions Wed Oct 17 7:32:15 2001 Delivered-To: freebsd-questions@freebsd.org Received: from raffles-it.com (raffles.demon.co.uk [158.152.17.201]) by hub.freebsd.org (Postfix) with ESMTP id E68FE37B408 for ; Wed, 17 Oct 2001 07:31:58 -0700 (PDT) Received: from arrow.lan.raffles-it.com (arrow.lan.raffles-it.com [192.168.100.51]) by raffles-it.com (8.11.4/8.11.4) with ESMTP id f9HEAko52021; Wed, 17 Oct 2001 15:10:46 +0100 (BST) (envelope-from dpd@raffles-it.com) Received: from arrow.lan.raffles-it.com (localhost [127.0.0.1]) by arrow.lan.raffles-it.com (8.11.6/8.11.6) with ESMTP id f9HEAjc06221; Wed, 17 Oct 2001 15:10:45 +0100 (BST) (envelope-from dpd@lan.raffles-it.com) Message-Id: <200110171410.f9HEAjc06221@arrow.lan.raffles-it.com> X-Mailer: exmh version 2.3.1 01/18/2001 with nmh-1.0.4 To: "Chuck O'Donnell" Cc: Korcek Vladimir , "'freebsd-questions@FreeBSD.ORG'" Subject: Re: Execute program? In-Reply-To: Message from "Chuck O'Donnell" of "Wed, 17 Oct 2001 09:39:16 EDT." <20011017093916.B40473@bus.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 17 Oct 2001 15:10:45 +0100 From: David Dooley Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > 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