Merge pull request #7192 from keymanapp/chore/linux/postinst

chore(linux): Fix ibus-keyman.postinst script
This commit is contained in:
Eberhard Beilharz 2022-09-05 08:45:39 +02:00 committed by GitHub
commit 369ef3d152
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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