From 9d1004b9ec14dd48f4d51aeeaa607e7c6259e277 Mon Sep 17 00:00:00 2001 From: Eberhard Beilharz Date: Fri, 2 Sep 2022 18:05:52 +0200 Subject: [PATCH] chore(linux): Fix ibus-keyman.postinst script When installing ibus-keyman it could happen that we got an (ignored) error "user name does not exist". This change tries to work around this problem. --- linux/debian/ibus-keyman.postinst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/debian/ibus-keyman.postinst b/linux/debian/ibus-keyman.postinst index 5b66b64c2a..57c22b8d6d 100644 --- a/linux/debian/ibus-keyman.postinst +++ b/linux/debian/ibus-keyman.postinst @@ -37,8 +37,8 @@ case "$1" in fi # Verify that it's running now - if [ ! -z $SUDO_USER ]; then - ! ibusdaemon=`ps --user $SUDO_USER -o s= -o cmd | grep --regexp="^[^ZT] ibus-daemon .*--xim.*"` + if [ ! -z $SUDO_USER ] && id $SUDO_USER > /dev/null 2>/dev/null; then + ! ibusdaemon=$(ps --user $SUDO_USER -o s= -o cmd | grep --regexp="^[^ZT] ibus-daemon .*--xim.*") if [ "x$ibusdaemon" = "x" ]; then # otherwise try to start it for the user installing the package if [ "x$is_gnome_shell" = "x1" ]; then