mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-24 08:37:42 +00:00
fix(linux): fix regex to detect running ibus-daemon
On Ubuntu 20.04 Focal ibus gets started by a shell command so that we end up with two processes mentioning `ibus-daemon`. This change limits the search to processes that specify with full path to `ibus-daemon` or without path, but `ibus-daemon` has to be the command, not a parameter.
This commit is contained in:
parent
d396a397e3
commit
8ff35c8657
1 changed files with 1 additions and 1 deletions
|
|
@ -115,7 +115,7 @@ def verify_ibus_daemon(start):
|
|||
try:
|
||||
ps_output = subprocess.run(('ps', '--user', user, '-o', 's=', '-o', 'cmd'),
|
||||
check=False, stdout=subprocess.PIPE).stdout
|
||||
ibus_daemons = re.findall('^[^ZT] (.*/|)ibus-daemon( .*|$)',
|
||||
ibus_daemons = re.findall(r'^[^ZT] (/[^ ]+/|)ibus-daemon( .*|$)',
|
||||
ps_output.decode('utf-8'), re.MULTILINE)
|
||||
if len(ibus_daemons) <= 0:
|
||||
if start:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue