diff --git a/linux/keyman-config/keyman_config/ibus_util.py b/linux/keyman-config/keyman_config/ibus_util.py index fba1ec5d3f..ec0e410d5f 100644 --- a/linux/keyman-config/keyman_config/ibus_util.py +++ b/linux/keyman-config/keyman_config/ibus_util.py @@ -187,20 +187,8 @@ def restart_ibus(bus=None): logging.info('restarting IBus by subprocess for user %s', realuser) subprocess.run(['sudo', '-u', realuser, 'ibus', 'restart'], check=False) else: - logging.info('restarting IBus through API') - try: - if not bus: - bus = get_ibus_bus() - if bus: - logging.info("restarting IBus") - # we no longer try to restart since we sometimes ended up with more than one - # ibus-daemon process (#6237). Instead we only exit ibus here, and start - # ibus again below. - bus.exit(False) - bus.destroy() - except Exception as e: - logging.warning("Failed to restart IBus") - logging.warning(e) + logging.info('restarting IBus by subprocess') + subprocess.run(['ibus', 'restart'], check=False) # give ibus a chance to shutdown (#6237) time.sleep(1) # 1s verify_ibus_daemon(True)