From owner-freebsd-questions@FreeBSD.ORG Sun May 23 21:51:29 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id BF45616A4CE for ; Sun, 23 May 2004 21:51:29 -0700 (PDT) Received: from grog.secure-computing.net (grog.secure-computing.net [63.228.14.241]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3DAE043D31 for ; Sun, 23 May 2004 21:51:29 -0700 (PDT) (envelope-from ecrist@secure-computing.net) Received: from Nomad (nat-server.secure-computing.net [63.228.14.245]) i4O4ngFY063511; Sun, 23 May 2004 23:49:42 -0500 (CDT) (envelope-from ecrist@secure-computing.net) From: "Eric Crist" To: "'Murray Taylor'" , "'Gerard Seibert'" Date: Sun, 23 May 2004 23:49:48 -0500 Message-ID: <007101c4414a$8b5e1280$6601a8c0@Nomad> X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.2616 In-Reply-To: <1085373818.33247.11.camel@wstaylorm.dand06.au.bytecraft.au.com> X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Importance: Normal cc: 'freebsd-questions' Subject: RE: Proper way to start a program at log-on X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 May 2004 04:51:29 -0000 Make a shell script like the ones in /usr/local/etc/rc.d to start and stop the process. The script MUST be named whatever.sh and must be executable. It must accept start and stop as parameters. This is the general solution. There is probably a doc reference for it but I havent looked. mjt On Mon, 2004-05-24 at 07:58, Gerard Seibert wrote: > Since I am still new to this OS, I thought that I would check to make > sure > that I am doing this correctly. > > On my WinXP machine, I run the Distributed Net 'dnetc' program. > Further > information regarding this program is available here: > http://www.distributed.net//docs/tutor_clients.php. > > To start the program in the background I need to issue the following > command: 'dnetc -quiet'. Since I want to start this program automatically > each time I log on, I placed that command at the end of my '.bash_profile' > file. I then placed the shutdown command 'dnetc -shutdown' in the > '/etc/rc.shutdown' file. > > Since everything seems to be workings correctly, I assume that I have > done > this correctly. If there is a better way to do this, I would appreciate > receiving the information. > > Thanks! > > Gerard E. Seibert > gerard-seibert@rcn.com I would do it this way myself. You can use the other scripts in this directory as an example. If permissions are an issue, I would setuid for the user you want this to run as, but not root. Back in 1998, I used to run this very program, and this was my solution. HTH Eric F Crist President AdTech Integrated Systems, Inc (612) 998-3588