A misplaced if statement in env.sh (as created by Configure) results in G4WORKDIR not being set if g4non_display is non-null when G4WORKDIR otherwise would be. I think this is generally not what was intended. The problem block is near lines 540-555 in env.sh, and the solution will be obvious when you see it. Fixing it would be nice because then users could set $g4non_display before sourcing env.sh.
To be noticed that this setup with $g4non_display is NOT present in the csh version of the generated script ... Problem assigned to the responsible.
Thank you for good description! It was resolved and will be included in release 8.2