$XDG_RUNTIME_DIR
is not well set on my computer and this causes upstart
to write PID files to my home folder. May I know what it should be and where to set it?
Asked
Active
Viewed 2.8k times
2 Answers
6
As far as I can tell, it is of the form:
/run/user/$(id -u)
For example, my UID is 1000, so XDG_RUNTIME_DIR
is /run/user/1000
. You can try setting it in ~/.pam_environment
:
echo "XDG_RUNTIME_DIR=/run/user/$(id -u)" >> ~/.pam_environment
I couldn't find any sources for this, though.

muru
- 197,895
- 55
- 485
- 740
2
Set:
export XDG_RUNTIME_DIR=/run/user/$(id -u)
To make this permanent, put it into your .bashrc file:
echo "export XDG_RUNTIME_DIR=/run/user/$(id -u)" >> ~/.bashrc
source ~/.bashrc
~/.bashrc
commands we can also (apart fromsource
) re-login if connected remotely via ssh. – mirekphd Aug 05 '23 at 08:30