Date: Wed, 3 Nov 2004 21:25:51 -0500 From: Parv <parv@pair.com> To: Mike Hauber <m.hauber@mchsi.com> Cc: freebsd-questions@freebsd.org Subject: Re: blackbox, bbkeys, and .xinit... (solved) --> UNIX behind the scenes Message-ID: <20041104022551.GA1840@moo.holy.cow> In-Reply-To: <200411031739.23987.m.hauber@mchsi.com> References: <200411021855.52247.m.hauber@mchsi.com> <d9175cad0411030048556faaf3@mail.gmail.com> <200411031739.23987.m.hauber@mchsi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
in message <200411031739.23987.m.hauber@mchsi.com>, wrote Mike Hauber thusly... > > I discovered that with the line "blackbox & bbkeys" in the script, > the bbscript remains when I exit blackbox, and I have to close > bbscript to return to KDM. ... > However, when I login and close bbkeys, then blackbox abruptly > closes (apparently a clean kill), and I return to KDM. That's what you had asked for. Using '&' after a command, a shell executes the command in the background. Lack of '&' causes the command to be executed in the foreground. Try these two commands in a bourne-like shell (such as ash (FreeBSD sh), ksh93, bash2, bash3) ... sleep 15 && date & sleep 15 && date In your situation, blackbox runs in the background & bbkeys in foreground. If you wanted to run bbkeys only if blackbox runs, then do AND operation ... blackbox && bbkeys ... optionally send the both commands in the background (say, if there are more commands to be run after the two commands)... blackbox && bbkeys & See also... - Get a good introductory Unix book - Man page for the shell which will execute your .xinit - Search "Google Groups" at http://groups.google.com/ ... + comp.unix.* newsgroups for "foreground background process OR command shell" search term + comp.unix.* & comp.windows.x newsgroups for "shell xinitrc OR xsession background" - Parv --
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20041104022551.GA1840>