0

I'm trying to debug some login behaviour where I have both my display manager and systemd (and potentially others) altering some environment variables (the XDG_* variables). Does anyone know any way of logging which processes have set or unset an environment variable? My best guess so far is some LD_PRELOAD trick on setenv, unsetenv and putenv, but surely there's got to be a more obvious way? Thanks in advance.

2
  • or strace the relevant processes, or maybe sysdig or such can log the calls Commented Sep 10, 2022 at 13:54
  • strace -fF -o /tmp/login.log -p $LOGIN_PROCESS_PID Commented Sep 10, 2022 at 14:19

0

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.