Ever wondered which environment variables are consulted by a program? ltrace -e getenv does not tell the full story, so getenv.sh lists all calls to getenv(3) made by a program.
For example, on my Fedora ltrace does not show that xclock(1) reads the DISPLAY environment variable.
With ltrace:
[g ~]$ ltrace -e getenv xclock
+++ exited (status 0) +++
Nothing … and now with `getenv.sh`:
[g ~]$ ./getenv.sh xclock
getenv("XTAPPPEEKEVENT_SKIPTIMER") = NULL
getenv("DISPLAY") = ":0.0"
getenv("XAUTHORITY") = "/tmp/.gdmWQFWIT"
getenv("XLIBBUFFERSIZE") = NULL
getenv("XKB_DEBUG") = NULL
getenv("_XKB_OPTIONS_ENABLE") = NULL
getenv("XKB_DISABLE") = NULL
getenv("RESOURCE_NAME") = NULL
getenv("XLOCALEDIR") = NULL
getenv("XLOCALEDIR") = NULL
getenv("XMODIFIERS") = NULL
getenv("XENVIRONMENT") = NULL
getenv("HOME") = "/home/g"
...
Product's homepage