[KDE/Mac] Another QSP update for the OSX/CI system! + XDG_* vars on OSX?

René J.V. Bertin rjvbertin at gmail.com
Sun Dec 14 16:50:46 UTC 2014

On Sunday December 14 2014 11:07:22 Ian Wadham wrote:

> Yes.  Environment variables are a threatened species in OS X's ever-tightening environment
> and are extinct in the the most recent OS X versions, except for command-line work.

Forgive if this already came up and that I haven't checked myself, but what form does the environment var. issue in apps not launched from the command-line take? Is it just difficult to set them, or do they not even receive the env. pointer anymore?

There remains the option to launch applications through a proxy, not unlike the app I hacked together from DropScript. I haven't tried, but it would probably be possible to use this kind of approach to force a set of env. variables. In foo.app, move foo.app/Contents/MacOS/foo to foo.bin and then create an executable shell script foo containing:


# a Cocoa utility that serves just to scrape together the documents the user may have requested to be opened:
# OS X sh doesn't seem to support EXPORT var=val
ENVVAR1="val1" ; export ENVVAR1
ENVVAR2="val2" ; export ENVVAR2

exec "${0}.bin" ${DOCS_TO_OPEN}

NB: I never checked if a utility like OSXArgv would actually work...

More information about the kde-mac mailing list