delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/01/20/10:18:12

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Sat, 20 Jan 2001 17:16:16 +0200
Message-Id: <200101201516.RAA27421@linux.>
From: "Ehud Karni" <ehud AT unix DOT simonwiesel DOT co DOT il>
To: posting-list AT MailAndNews DOT com
Subject: Re: Inetd and (detached) background (console) processes
CC: cygwin AT sourceware DOT cygnus DOT com
In-reply-to: <wkwvbq4fe5.fsf_-_@blue.sea.net> (posting-list@MailAndNews.com)
Organization: Simon & Wiesel Insurance agency
Reply-to: ehud AT unix DOT simonwiesel DOT co DOT il
References: <3A6314C4 DOT F08C2845 AT iki DOT fi> <200101171937 DOT VAA10622 AT linux.> <wkwvbq4fe5 DOT fsf_-_ AT blue DOT sea DOT net>
X-Mailer: Emacs 20.7.1 rmail (send-msg 1.104)
MIME-Version: 1.0

On 20 Jan 2001 13:44:18 +0200, Jari Aalto wrote:
> 
>     In win98 the Inetd can be started from the start directory, but obviously
>     I don't want to draw a shortcut there because it would create that additional
>     window.
> 
>     Now:   run-nw inetd   does not create additional window, but If I put this
>     command to a bat file, the bat file would create extra window...
> 
>     How do I start inetd without extra window in Win98 at PC boot time?

Hello Jari, I have good memories of you from my first Emacs days.

1. inetd opens a console windows because it was not compiled with the
   -mwindows switch. I suggest that daemons will be STANDARDLY compiled
   with this switch, so no visible window is produced (when you start
   such a program from the bash prompt it works exactly the same as a
   program without this switch). You can see the program in `ps' and
   you can send it signals with `kill' like any other Cygwin program.

2. To start programs on the win98 at start up time, you have 2 options:
   2.1 User programs (those are started only after a user is logged in)
     create a shortcut in <Windows Dir>/start menu/programs/startup and
     change the "Target" (by changing its properties) to whatever
     command you want (e.g. "c:\cygwin\usr\local\bin\run-nw.exe inetd").

   2.2 Service programs. These are run even before the user logs in.
     They must be set by editing the registry (since you want only
     to add or change keys, NOT delete, it can be done by a REG file,
     see example below). The key must be added under 
           HKLM\Software\Microsoft\Windows\CurrentVersion\Run
     or    HKLM\Software\Microsoft\Windows\CurrentVersion\RunServices
     (I don't know what is the real difference between them).
     You add key of the form: "description-id"="command to run"
     All escaping is done UNIX style (i.e \\, \").
       
Note. You can use Cygwin's regtool (in bash script).

Ehud.


Example of REG file (inetd.reg) for running inetd at start up without
visible window (for Win9X). It must be a DOS text file (\r\n for EOL).

REGEDIT4

[HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices]
"CygwinInetd"="\"C:\\cygwin\\usr\\local\\run-nw.exe\" inetd"


-- 
 @@@@@@ @@@ @@@@@@ @    @   Ehud Karni  Simon & Wiesel  Insurance agency
     @    @      @  @@  @   Tel: +972-3-6212-757    Fax: +972-3-6292-544
     @    @ @    @ @  @@    (USA)  Fax  and  voice  mail:  1-815-5509341
     @    @ @    @ @    @        Better     Safe     Than     Sorry
 http://www.simonwiesel.co.il    mailto:ehud AT unix DOT simonwiesel DOT co DOT il

--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019