From owner-freebsd-questions@FreeBSD.ORG Wed Nov 3 22:36:44 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 E8F9916A4CE for ; Wed, 3 Nov 2004 22:36:43 +0000 (GMT) Received: from sccmmhc91.asp.att.net (sccmmhc91.asp.att.net [204.127.203.211]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8777443D53 for ; Wed, 3 Nov 2004 22:36:43 +0000 (GMT) (envelope-from m.hauber@mchsi.com) Received: from [10.51.10.3] (12-219-204-133.client.mchsi.com[12.219.204.133]) by sccmmhc91.asp.att.net (sccmmhc91) with ESMTP id <20041103223642m9100cdjpke>; Wed, 3 Nov 2004 22:36:42 +0000 From: Mike Hauber To: freebsd-questions@freebsd.org Date: Wed, 3 Nov 2004 17:39:22 -0500 User-Agent: KMail/1.7 References: <200411021855.52247.m.hauber@mchsi.com> In-Reply-To: X-Copyright: 2004, Michael C. Hauber. All rights reserved. X-Notice: Duplication, modification, and/or redistribution are prohibited without proper consent from the author. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200411031739.23987.m.hauber@mchsi.com> cc: kjelderg@gmail.com Subject: Re: blackbox, bbkeys, and .xinit... (solved) --> UNIX behind the scenes X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: m.hauber@mchsi.com List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Nov 2004 22:36:44 -0000 On Wednesday 03 November 2004 03:48 am, Eric Kjeldergaard proclaimed: > On Tue, 2 Nov 2004 18:55:51 -0500, Mike Hauber wrote: > > Greets, > > > > This is something I haven't had to mess with before, > > and I'm confused by the docs... > > > > I have several WMs installed on my FreeBSD (4.10) > > desktop, one of which is blackbox. Is there a way to > > uniquely state that if blackbox loads, then bbkeys > > should load as well? > > > > The instructions say to add the command to my ~/.xinit > > file, but if I do that, then bbkeys will load with > > whatever I start (If I understood it correctly. Like I > > said, I've not had to do this before). > > > > Oh yeah... I'm running KDM from /etc/ttys at startup > > (if that matters). > > Well, you could do the following (which is dirty, but > popped into my head) > > if (ps | grep blackbox | grep -v grep > /dev/null); then > bbkeys; fi Thanks for the reply, Eric. That was pretty much my initial idea, but it would be something that would always have to be running... Not that I'm _that_ short on resources, just thought there should be a cleaner way of doing it. I've written a simple script to run blackbox and bbkeys using the ampersand, and then pointed blackbox.desktop to the script. 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. That would lead me to believe that the two binaries run independant of each other (makes sense). However, when I login and close bbkeys, then blackbox abruptly closes (apparently a clean kill), and I return to KDM. So much for the binaries running independantly. I don't understand why. I've also discovered that the ampersand doesn't seem to _really_ mean that binaries are run simultaniously, so that would mean the second binary is actually started on a succeeding clock cycle? kinda makes sense. Then I switched the line in the script to read "bbkeys & blackbox" Now, when I exit blackbox, bbkeys goes away as well. I don't see it when I 'ps -xa', I don't see multiple instances when I log back in, and I don't see any core dumps. Therefore I have to assume that this is also a clean kill (which is okay with me, but I still don't understand why). Obviously the ampersand is not FreeBSD specific, but *NIX in general so I've googled around and searched some generic UNIX sites/tutorials, but haven't found anything explaining how it really works (beyond saying that it's used to run binaries "simultaneously"). I'd like to learn more, but I'm not sure where to begin. If it's the hardware that I'm needing to understand better, then I would _like_ to avoid starting at the "this is a NAND gate" level. Any recommends? Thanks, Mike