mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-06 17:05:34 +00:00
fix(linux): Improve robustness when installing ibus-keyman
If for whatever reason ibus wasn't running for the current user the installation failed previously, leaving the user in a broken state until he reboots and tries the installation again. This change detects this situation and skips restarting ibus.
This commit is contained in:
parent
b437b8f072
commit
b6b9b5de46
1 changed files with 6 additions and 2 deletions
|
|
@ -14,10 +14,14 @@ case "$1" in
|
|||
if [ "x$gspid" != "x" ]; then
|
||||
# gnome-shell has multiple ibus-daemon processes and needs exit instead of restart
|
||||
ibususer=`ps -C ibus-daemon -o user=|grep -v gdm|uniq`
|
||||
sudo -H -u "$ibususer" ibus exit
|
||||
if [ "x$ibususer" != "x" ]; then
|
||||
sudo -H -u "$ibususer" ibus exit
|
||||
fi
|
||||
else
|
||||
ibususer=`ps -C ibus-daemon -o user=|uniq`
|
||||
sudo -H -u "$ibususer" ibus restart
|
||||
if [ "x$ibususer" != "x" ]; then
|
||||
sudo -H -u "$ibususer" ibus restart
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue