I have a cron job that runs
emacsclient which requires that
XDG_RUNTIME_DIR to be set. I can set the variable to something like
/run/user/1000 in the
crontab but then this assumes that the owner of the cron is the first user to login (otherwise their
XDG_RUNTIME_DIR would be
/run/user/1001 for example).
Is there a better way to have
cron inherit the value of
XDG_RUNTIME_DIR from the owner of the cron jobs?