Commit graph

27 commits

Author SHA1 Message Date
Eberhard Beilharz
456254a896
chore(linux): Log if user not set 2023-09-11 18:21:36 +02:00
Eberhard Beilharz
ffa3324be2 fix(linux): Prevent exception if neither USER, LOGNAME nor SUDO_USER set
Closes #9542.
2023-09-05 09:17:10 +02:00
Eberhard Beilharz
f9896756f6
Merge pull request #9310 from keymanapp/fix/linux/logging
fix(linux): Fix logging
2023-07-20 22:48:52 +02:00
Eberhard Beilharz
2f25d198f4
fix(linux): Output not connected ibus as info instead of warning
There is nothing the user can do, and it's usually irrelevant
(except when troubleshooting).
2023-07-20 11:11:43 +02:00
Eberhard Beilharz
8a34a5d6ce
refactor(linux): Some refactorings 2023-07-20 11:09:55 +02:00
Eberhard Beilharz
33603c0f71
refactor(linux): Use better way to get username
`getpass.getuser()` tries several different ways to get the username
and is the recommended way of getting the username.
2023-07-20 11:04:04 +02:00
Eberhard Beilharz
481cb4a281
refactor(linux): Code refactoring 2023-07-05 11:39:33 +02:00
Eberhard Beilharz
117ef77160
chore(linux): Sorting of imports 2022-07-18 15:19:50 +02:00
Eberhard Beilharz
0c78e44eda
chore(linux): Remove debug output 2022-03-15 17:53:46 +01:00
Eberhard Beilharz
cc0317af2c
fix(linux): Don't use restart option of exit()
Instead of trying to restart ibus by passing True to bus.exit()
we now exit ibus and then let verify_ibus_daemon() start it again.
Also added additional checks to verify that we're not running
multiple ibus-daemons at the start of km-config and before
restarting.
2022-03-11 18:14:02 +01:00
Eberhard Beilharz
e6cf0327b7
chore(linux): Small improvements
- output error if more than one ibus-daemon is running
- log Keyman version after starting km-config
2022-03-09 18:37:59 +01:00
Eberhard Beilharz
92395ec1f6
fix(linux): Add some debug output 2022-03-08 17:43:19 +01:00
Eberhard Beilharz
e30c00733a
fix(linux): Don't start ibus-daemon multiple times
This change adds a 1s sleep after restarting ibus before checking
that it actually runs. Hopefully this will solve the problem. Since
this bug is hard to reproduce, we also log a critical error for the
other code path this could happen.

Fixes #6237.
2022-03-07 18:22:06 +01:00
Eberhard Beilharz
6cac869d0b
feat(linux): Try to start ibus if not running
When we try to restart ibus and that fails and ibus isn't running
afterwards we directly try to start ibus-daemon.

On Ubuntu 21.10 Impish there are two `ibus-daemon` processes
running for the current user. One of them has the `--xim` flag
and is the one we care about. This change improves the detection
that ibus is running after installing a keyboard.
2022-02-07 16:44:26 +01:00
Eberhard Beilharz
c42a623f38
fix(linux): Don't crash when installing keyboards in Wasta
Fixes #6158. This bug got introduced in #6015.
2022-01-27 17:22:02 +01:00
Eberhard Beilharz
b57699b06b refactor(linux): Move GSettings code to separate class 2021-12-08 19:05:23 +01:00
Eberhard Beilharz
05f2bdad61
fix(linux): Fix installation of shared packages
This change fixes the installation of shared packages, so that they
show up in the list of the installed keyboards. It implements the
fix for both ibus and gnome.

Fixes #5311.
2021-12-07 16:56:08 +01:00
Eberhard Beilharz
0a2dd29e53
fix(linux): Fix restarting ibus when running with sudo
When installing in the shared area the user has to run
`km-package-install` with sudo so that he has sufficient permissions.
In that case we have to do extra work to restart ibus for the
logged-in user instead of root.

Fixes #5309.
2021-06-25 18:59:12 +02:00
Eberhard Beilharz
5a3a7910ab
feat(linux): Try only 5 instead of 10000 times to connect to ibus
Part of #4910.
2021-06-02 15:16:22 +02:00
Eberhard Beilharz
071df63ac7
feat(linux): Install keyboard on Gnome
This change adds the keyboard to the Gnome input sources after
installing the .kmx file, and removes it on uninstall.

This implements #2728.
2020-06-24 19:13:40 +02:00
Eberhard Beilharz
5f214015c5
refactor(linux): cleanup code
This change adds a config file for flake8 Python linter and fixes
the problems the linter identified.
2020-06-23 17:15:23 +02:00
Eberhard Beilharz
1890016710
feat(linux): Make two windows modal dialogs
This change modifies DownloadKmpWindow and InstallKmpWindow so that
they are modal dialogs. This will cause them to show up in front of
the km-config window and will prevent accidentally open multiple
download windows.

This change also fixes an unused method in ibus_util that was using
a variable that got renamed previously.
2020-06-04 19:13:24 +02:00
darcywong00
c98667a602 Check .kmx names in install_kmp_shared
Also update history.md
2019-02-20 20:04:54 -06:00
darcywong00
6af594a344 Address review comments 2019-02-20 08:15:41 -06:00
Darcy Wong
d42130baba Fix typo 2019-02-19 06:13:53 +07:00
darcywong00
677f9546a3 Sanitize the keyboard id for ibus 2019-02-17 21:23:51 -06:00
glasseyes
f9186f386c add missing files get_info and ibus_util 2019-01-02 11:28:01 +07:00