Forum > Unix

how to pass environment along to external program


I am using makeself (self-extractor) to distribute my program. Now I want to do updates, so I have the program download a makeself package and then execute it. But this doesn't work as expected. The package executed from the commandline does work.

makeself apparently uses the shell environment to decide what is available to it. Free Pascal doesn't pass environment info along with methods from:

I also tried:

which executes the program via the shell ("sh -c" and a string that specifies the target).

Is there any way to pass the environment along? If not I would have to grep makeself for all vars it accesses and pass them along :(


For those working with makeself: the makeself generated executable accepts a --nox11 ("No X11") parameter. With this parameter the problem goes away. At least that's my conclusion so far.

So I no longer need to pass the environment.

Makes me wonder why it was needed in the first place...


[0] Message Index

Go to full version