fixes
[distro-setup] / switch-mail-host
index 12bf126e1f2512179915933ebacf0ebeb6ec0513..b27cde9dc4bac303d13fbcbd809fe27353694f37 100644 (file)
@@ -153,7 +153,8 @@ done
 e "On $new_host: umounting /m and /o, checking emacs"
 $new_shell bash -s <<'EOF'
 set -eE
-if pgrep -f 'emacs --daemon' &>/dev/null; then
+if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
+  export XDG_RUNTIME_DIR=/run/user/1000
   bufs="$(emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')"
   if [[ $bufs ]]; then
     echo "error: on $HOSTNAME, unsaved emacs files: $bufs" >&2
@@ -169,7 +170,8 @@ done
 EOF
 
 $old_shell bash -s <<'EOF'
-if pgrep -f 'emacs --daemon' &>/dev/null; then
+if pgrep -G iank -u iank -f 'emacs --daemon' &>/dev/null; then
+  export XDG_RUNTIME_DIR=/run/user/1000
   bufs="$(emacsclient --eval "$(cat /a/bin/ds/unsaved-buffers.el)"| sed '/^"nil"$/d;s/^"(/E: /;s/)"$//')"
   if [[ $bufs ]]; then
     echo "error: on $HOSTNAME, unsaved emacs files: $bufs" >&2