diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-12 14:13:32 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2022-03-12 14:13:50 -0700 |
commit | eb9bc5b26869fec4d8f4ae69c55aac2ed5ada8c4 (patch) | |
tree | 6c48a41464ddb1c62c980623975a3aea80fcfc62 /scripts | |
parent | 997cafffdb158b3b6ecf999b2f691858c60135ad (diff) | |
download | dotfiles-eb9bc5b26869fec4d8f4ae69c55aac2ed5ada8c4.tar.gz |
scripts/desktop/emacsclient: use LOGNAME not USER
Seems the former is what cron sets.
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/desktop/emacsclient | 5 |
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" |