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?
1000
? Otherwise, this sounds like a bad idea. Do you really need to runemacsclient
, even if that user is not logged into an X session? I ask because there's very likely an easier solution (I don't have one better than actually running a login shell, which runs a script, which runs your emacsclient). I mean, emacsclient makes no sense if there's not already anemacs
running that it can communicate with, so there's very many reasons this sounds like an XY Problem.