blackbox, bbkeys, and .xinit... (solved) --> UNIX behind the
scenes
Mike Hauber
m.hauber at mchsi.com
Thu Nov 4 02:19:03 PST 2004
On Wednesday 03 November 2004 09:25 pm, Parv proclaimed:
> in message <200411031739.23987.m.hauber at 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
>
First of all, I get the syntax. However, I do _not_
understand the apparent dependence between the first and
the second binary (if you don't know what I'm referring to,
then please read the rest of my last email).
>
> 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
>
Actually, no. If I were to put 'blackbox && bbkeys' in the
script, then blackbox would appear, and then _after_ I exit
blackbox bbkeys shows up on the KDM "root" background.
Then when I close bbkeys, the KDM login window is restored.
Vice-versa the other way around. Obviously, this is not
what I'm after.
I've found the solution (as indicated in my last email), but
again, I don't understand the dependency that the second
binary seems to have on the first (ie. close the second and
the first disappears, but _not_ vice-versa). I haven't
found the dependency documented anywhere, and therefore I
don't understand _why_ it's the solution.
>
> ... 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
>
> --
You're probably right. This is more a NIX question in
general rather than a FreeBSD-specific question. I'll post
it to another board. Thanks.
Mike
More information about the freebsd-questions
mailing list