From owner-freebsd-ports@FreeBSD.ORG Wed Jun 28 21:06:17 2006 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 11F5B16A632 for ; Wed, 28 Jun 2006 21:06:17 +0000 (UTC) (envelope-from kruptos@mlinux.org) Received: from ms-smtp-01.tampabay.rr.com (ms-smtp-01.tampabay.rr.com [65.32.5.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id DF58144A92 for ; Wed, 28 Jun 2006 20:37:59 +0000 (GMT) (envelope-from kruptos@mlinux.org) Received: from fnord.quux.edu (207.40.33.65.cfl.res.rr.com [65.33.40.207]) by ms-smtp-01.tampabay.rr.com (8.13.6/8.13.6) with ESMTP id k5SKbwaK003508 for ; Wed, 28 Jun 2006 16:37:58 -0400 (EDT) From: Kevin Brunelle To: freebsd-ports@freebsd.org Date: Wed, 28 Jun 2006 16:37:50 -0400 User-Agent: KMail/1.9.3 References: <20060628172146.GA55051@iib.unsam.edu.ar> <7A131765-AD00-4346-A3D1-771ED181EE16@mac.com> In-Reply-To: <7A131765-AD00-4346-A3D1-771ED181EE16@mac.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200606281637.50708.kruptos@mlinux.org> X-Virus-Scanned: Symantec AntiVirus Scan Engine Subject: Re: getting to /usr but not /compat/usr from a linux app X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 28 Jun 2006 21:06:17 -0000 On Wednesday 28 June 2006 13:53, Charles Swiger wrote: > On Jun 28, 2006, at 1:21 PM, Fernan Aguero wrote: > > I'm using Linux Firefox, and when asked to choose a helper > > app to open a document I try to navigate to /usr/X11R6/bin > > but I always end up in /compat/linux/usr/X11R6/bin instead > > (though firefox believes it's /usr/X11R6/bin). > > > > I can see why this happens (linux apps should be fooled into > > using their 'compat' usr space), but is there any way of > > escaping from this? > > The Linux app is being run inside of a chroot()ed environment in > order to give the appearance that they are running in a "real Linux > system"; you can't escape a chroot() environment (hopefully), but you > could create hard links or copy files from the FreeBSD /usr/X11R6/bin > to the Linux environment... This is not 'exactly' true. The program is not being run in a chroot environment. Easily demonstrated by the fact that linux programs can access file in user's home directories without any difficulty. There are other ways to show this... but the main thing is distinct paths. The programs default to /compat/linux/whatever if whatever exists in both places. You really just need to specify enough of the path manually that the program sees the file outside of /compat/linux. For example, I had to type the complete path for "/usr/X11R6/bin/acroread" into one program for it to show up. But once the complete path is there, the program doesn't have a problem with it. If you get to a part where the program seem stuck (you know there is a different directory you need to enter but you're in the /C/L tree, and all you have is a place to type the filename... try 'directory/' and most programs take the hint and move you up. Hope this helps. -kevin