Subject: Re: X apps cannot find app-defaults
To: None <grant@NetBSD.org>
From: Chuck Cranor <chuck@ece.cmu.edu>
List: tech-pkg
Date: 04/20/2004 10:26:29
In article <20040417101705.GG15332@fang> you write:
>On Sat, Apr 17, 2004 at 12:33:37PM +1000, Luke Mewburn wrote:
>> I agree with Chuck; we should find a clean way to build applications
>> in the xpkgwedge framework so that they find their app-defaults correctly
>> (at least for NetBSD systems running X built from src/x11).

>I think the requirement is actually much wider than NetBSD/x-build X.
>it should work with all X11R6 implementations that pkgsrc supports,
>including the XFree86 packages in pkgsrc itself.


what are the possible "wide" solutions?   

you might be able to link the application with some sort of special 
xpkgwedge library file or magic crt0 that sets the XAPPLRESDIR env var 
before the X libraries run.

alternately, you could have the "applications" be shell scripts
that set XAPPLRESDIR env var and then exec the real binary like
what firefox does:

        #!/bin/sh
        MOZILLA_FIVE_HOME=/usr/pkg/lib/firefox
        export MOZILLA_FIVE_HOME
        exec /usr/pkg/lib/firefox/firefox-bin "$@"


either solution would be better than the broken situation that we
currently have.  
  
chuck