On Fri, 26 May 2017 03:16:14 -0400 "William L. Thomson Jr." <[email protected]> said:
> On Fri, 26 May 2017 15:03:44 +0900 > Carsten Haitzler (The Rasterman) <[email protected]> wrote: > > > > so you didn't try it then. i did explain before about environment > > variables, inheritance of them etc. if you read what i wrote you > > wouldn't have to keep asking. so i'm going to YET AGAIN repeat myself. > > I cannot test under Wayland... it will work. but you going on about it "not being a solution" or just ignoring it. since gpg has decided to special case handle x stuff by messing with DISPLAY and just not inheriting it (which should be enough) it wants to unset it then pass it around as an arg instead. this requires then you do special case code to del with this thanks to gpg doing this. (the only use case for this would be ye-olde multihead where you have 2 or more root windows which has fallen out of yes already 1-2 decades ago, but ok - then pass it from the client, but... pass via env var not arg to save code). since it knows zip about wayland it doesn't pass WAYLAND_DISPLAY around and it actually doesn't need to. inheriting from parent will do just fine. > > i explained that wayland uses WAYLAND_DISPLAY. not DISPLAY. gpg > > doesnt know what WAYLAND_DISPLAY is. it does not remove it from the > > environment. > > To test that theory I set my own var. > > MY_VAR="test" > > Just reusing same code as before > > int > main (int argc, char *argv[]) > { > FILE *fd = fopen("/tmp/log.txt","w"); > const char *display = getenv("MY_VAR"); > if(display) > fprintf(fd,"display=%s\n",display); > fclose(fd); > pinentry_init (PGMNAME); > .... > > The file was empty. MY_VAR never existed as it ran in another shell. > git -> gpg -> pinentry it would have inherited the env where gpg-agent spawned. you would likely ALREADY have a spawned agent from another environment/parent process. kill gpg-agent then launch it by hand... (which is what gpg tools do for you implicitly if gpg-agent is not running so thus it'd inherit from wherever the tools are run from). it'll be spawned from some process in the login session (eg mail client like i already explained in a prior email) and thus inherit the env vars. but sure. don't believe me. i tested it myself. it works. it inherits. i tested though knowing how gpg-agent would be spawned and made sure it was spawned from the environment that had the test env var... i knew it'd work to begin with, my tests show it does. your tests almost definitely didn't take into account you have a gpg-agent floating about from another parent process and thus different environment from your test. either way. i have repeated ad nauseam everything you need to do, know and what will work and even why and i know i'm right because not only do i know this area of linux quite well and have decades of experience in it, i tested properly too just to ensure i can say i did. you can choose to not believe me and do whatever you want to do. > Just the same WAYLAND_DISPLAY may not be set as MY_VAR was not. I am > unable to test or confirm. > > -- > William L. Thomson Jr. -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
