summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2022-03-12 14:13:32 -0700
committerSean Whitton <spwhitton@spwhitton.name>2022-03-12 14:13:50 -0700
commiteb9bc5b26869fec4d8f4ae69c55aac2ed5ada8c4 (patch)
tree6c48a41464ddb1c62c980623975a3aea80fcfc62 /scripts
parent997cafffdb158b3b6ecf999b2f691858c60135ad (diff)
downloaddotfiles-eb9bc5b26869fec4d8f4ae69c55aac2ed5ada8c4.tar.gz
scripts/desktop/emacsclient: use LOGNAME not USER
Seems the former is what cron sets.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/desktop/emacsclient5
1 files changed, 3 insertions, 2 deletions
diff --git a/scripts/desktop/emacsclient b/scripts/desktop/emacsclient
index 706517ca..a65cddbd 100755
--- a/scripts/desktop/emacsclient
+++ b/scripts/desktop/emacsclient
@@ -18,7 +18,7 @@ done
[ "$#" -eq 0 ] && set -- -nc
socket="/run/user/$(id -u)/emacs/server"
-ps -o exe -u "$USER" -U "$USER" | grep -q "$HOME/src/emacs/src/emacs" \
+ps -o exe -u "$LOGNAME" -U "$LOGNAME" | grep -q "$HOME/src/emacs/src/emacs" \
&& devel_running=true
if [ "$devel_running" = true -a "$mode" = --installed ]; then
@@ -32,7 +32,8 @@ if [ "$mode" != --installed \
-a -e "$HOME/src/emacs/admin/README.melete" \
-a -x "$HOME/src/emacs/lib-src/emacsclient" \
-a -d "/usr/share/emacs-snapshot/site-lisp/elpa" ] \
- && ! ps -o exe -u "$USER" -U "$USER" | grep -q $(command -v emacs) \
+ && ! ps -o exe -u "$LOGNAME" -U "$LOGNAME" \
+ | grep -q $(command -v emacs) \
&& ! ( [ "$devel_running" != true ] && ps h -o pid -C make \
| xargs pwdx | grep -q "$HOME/src/emacs" ); then
EMACSCLIENT="$HOME/src/emacs/lib-src/emacsclient"