Without this, later `emacsclient' run from an SSH session can't find
the desktop session's Emacs server.
## logout hook, so synthesize one here.
case ${DT+t} in t) trap "source $HOME/.shell-logout" EXIT; esac
+## Set the `runtime' directory. This gets done automatically on a desktop
+## login, but not in, say, SSH, which causes anomalies.
+if [ -d /run/user ]; then
+ : ${XDG_RUNTIME_DIR=/run/user/$(id -u)}; export XDG_RUNTIME_DIR
+fi
+
###--------------------------------------------------------------------------
### Set some basic paths.