View Single Post
Old 11-25-2013, 12:22 PM   #125
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Týr
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,586
Karma: 6299993
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
its to do with the way environment variables are being "stripped" out when you call up the subshell.

you need to setup some simple tests like say

test.sh
Quote:
echo $PATH > /mnt/us/path.txt
if that is empty then you have your answer, the subshell strips it.

it would also explain why putting the values IN a shell script AFTER you call the -c would work, as you are setting them "after" the stripping

and luakit isn't "missing" them, in the original context it didn't need them. but with the altered environment call it does.

There was some switch " su --preserve-environment -c" on a linux box to convince an su subshell to maintain the calling environment, It doens't apply here though (since you cant su anyways)
but it demonstrates a solution to a similar problem and what an answer might might be. Stripped environment in subshells.

test test test. set up simple tests. only way to know for sure.
twobob is offline   Reply With Quote