From owner-freebsd-emulation Fri Sep 7 11:11: 8 2001 Delivered-To: freebsd-emulation@freebsd.org Received: from ambrisko.com (adsl-64-174-51-42.dsl.snfc21.pacbell.net [64.174.51.42]) by hub.freebsd.org (Postfix) with ESMTP id DB65137B407 for ; Fri, 7 Sep 2001 11:11:05 -0700 (PDT) Received: (from ambrisko@localhost) by ambrisko.com (8.11.3/8.11.3) id f87I7uc16743; Fri, 7 Sep 2001 11:07:56 -0700 (PDT) (envelope-from ambrisko) From: Doug Ambrisko Message-Id: <200109071807.f87I7uc16743@ambrisko.com> Subject: Re: LD_PRELOAD and linux binaries In-Reply-To: <20010907111805.A38412@node7.cluster.srrc.usda.gov> To: Glenn Johnson Date: Fri, 7 Sep 2001 11:07:56 -0700 (PDT) Cc: John Polstra , emulation@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL92 (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-emulation@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Glenn Johnson writes: | On Fri, Sep 07, 2001 at 09:07:56AM -0700, John Polstra wrote: | | > In article <20010907102249.C37844@node7.cluster.srrc.usda.gov>, Glenn | > Johnson wrote: | > | > > I have been playing around with gdkxft and so have the LD_PRELOAD | > > environment variable set to point to the gdkxft library. The | > > problem is with Linux programs which obviously can not link the | > > FreeBSD library. The LD_PRELOAD environment variable needs to be | > > unset to run these. For those Linux programs that use a wrapper | > > script, such as netscape it is easy enough to just unset the | > > variable in the wrapper script. The problem is with Linux programs | > > that do not use a wrapper script. I know the wrapper scripts are | > > trivial to write but it does not seem practical to write a wrapper | > > for every such program. | > | > Is there some way you could leave LD_PRELOAD unset, and use wrapper | > scripts to invoke the applications with which you want to use gdkxft? | > That's what I'd recommend. I don't think the folks who dreamed up | > LD_PRELOAD had it in mind that you'd set it except for specific | > applications. See runsocks, for example. | | In this case, I am using the LD_PRELOAD variable for all gtk | applications. I have many more of those then of Linux programs so | either way it is basically the same problem. The gdkxft library being | loaded is for anti-aliasing fonts for gtk applications. I really do not | absolutely need this functionality but I was just wondering if there was | a good way to get around the Linux binary and LD_PRELOAD problem while I | was using it. Since LD_PRELOAD is really only used when you fire off another program then it is usually easy to rename that app the wants or doesn't want LD_PRELOAD set or set different and then replace the original name with a shell script modifying LD_PRELOAD as needed and then start the app. You can get tricky enough to do a file on the app. first and then set LD_PRELOAD to the appropriate path as needed. I've done this in the past and it worked okay. Not that LD_PRELOAD is not an kernel thing but a loader thing. Doug A. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message