Commit graph

2125 commits

Author SHA1 Message Date
Eberhard Beilharz
285a8463e7
fix(linux): use ibus command to restart ibus 🍒
When using Kubuntu exiting ibus sometimes used to hang (#10178). This
was because ibus' `bus.exit()` doesn't shutdown properly
(see https://github.com/ibus/ibus/issues/2816#issuecomment-3410473708).
The recommended way is to use the `ibus exit` command. Since we no longer
use the API we can directly use the `ibus restart` command, which this
PR implements.

Fixes: #10178
Cherry-pick-of: #14971
2025-10-16 20:02:55 +02:00
Eberhard Beilharz
b80dbf5a6b
fix(linux): replace dbus-x11 dependency 🍒
When using a different DBus implementation `dbus-launch` might not exist,
but instantiating a `SessionBus` object might start a session dbus if
it's not already running. This change also replaces the `dbus-x11`
dependency with `default-dbus-session-bus | dbus-session-bus` and changes
the way we detect if dbus is already running.

Also remove `DBUS_SESSION_BUS_ADDRESS` from `sudo gsettings` call. It
turns out we don't need this since we execute the `gsettings` command
in the context of the user anyway which connects to the user's session
dbus.

Cherry-pick-of: #14895
Fixes: #14888
Test-bot: skip
2025-10-07 16:29:59 +02:00
Eberhard Beilharz
d93f3a4931
chore(linux): Update debian changelog 2025-09-29 11:38:49 +02:00
Eberhard Beilharz
0d02825d1d
chore(linux): remove no longer needed lintian overrides 🍒
It looks like we no longer need these lintian overrides:
- `package-contains-documentation-outside-usr-share-doc` got resolved
  by excluding these directories from our source package
- the other one was a false positive that looks like it got fixed in
  Debian

Cherry-pick-of: #14810
Test-bot: skip
2025-09-22 17:58:02 +02:00
Eberhard Beilharz
d5ddf5bb74
Merge pull request #14785 from keymanapp/maint/linux/cherry-pick/debianupload 2025-09-22 12:12:24 +02:00
Eberhard Beilharz
a73cda2e8a
maint(linux): address code review comments
- directly get PR# from `gh pr create`
- add `Build-bot: skip` trailers

Build-bot: skip
Test-bot: skip
2025-09-19 15:39:52 +02:00
Eberhard Beilharz
711879fb15
maint(linux): improve getting PR# in upload-to-debian.sh 🍒
With this change we wait two seconds after creating the PR before trying
to get the number of the PR so that GitHub can catch up. Previously
recently it wasn't able to get the PR#.

Also adjust the commit message and use the new header for skipping tests.

Cherry-pick-of: #13890
Build-bot: skip
Test-bot: skip
2025-09-18 11:47:47 +02:00
Eberhard Beilharz
7c0c097f14
chore(linux): Update debian changelog 2025-09-18 11:35:12 +02:00
Eberhard Beilharz
456096cb63
maint(linux): remove Oracular, add Questing 🍒
Remove EOL Ubuntu 24.10 Oracular, add Ubuntu 25.10 Questing.

Cherry-pick-of: #14319
Build-bot: skip
Test-bot: skip
2025-09-18 10:10:15 +02:00
Eberhard Beilharz
d696927980
Merge pull request #14771 from keymanapp/fix/linux/cherry-pick/14748_TypeError
Fixes: #14748
Fixes: KEYMAN-LINUX-8Q
Cherry-pick-of: #14760
2025-09-18 09:16:04 +02:00
Eberhard Beilharz
5d4eb6de46
docs(linux): update release notes for stable release
Follows: #14773
Build-bot: skip
Test-bot: skip
2025-09-17 15:47:10 +02:00
Eberhard Beilharz
b3bf2eac90
chore(linux): remove automatic installation of onboard-keyman 🍒
`onboard-keyman` isn't available on Debian/Ubuntu and doesn't work
properly with Wayland. This change removes the `onboard-keyman`
recommends which used to cause `onboard-keyman` to be installed
automatically together with `keyman`. The user can still manually install
`onboard-keyman`.

Fixes: #14769
Fixes: #5214
Cherry-pick-of: #14772
Build-bot: skip
Test-bot: skip
2025-09-17 15:33:58 +02:00
Eberhard Beilharz
373c02b7d1
fix(linux): don't crash on invalid languages in keyboard 🍒
Fixes: #14748
Fixes: KEYMAN-LINUX-8Q
Cherry-pick-of: #14760

# User Testing

**TEST_INSTALL**: open `km-config` and install a keyboard. Verify that
the keyboard gets added to the list of installed keyboards in `km-config`
as well as to the languages dropdown in the taskbar.
2025-09-17 15:10:00 +02:00
Eberhard Beilharz
c3487e964d
fix(linux): don't crash if kmp.json is missing keyboards section 🍒
Some keyboards seem to be missing the `keyboards` section in the
`kmp.json` file. This change prevents a crash and instead returns `None`
and thus we don't create a .ldml file and so onboard will show the
default keyboard instead. The alternative would be to create an empty
.ldml file, but that causes onboard to show a keyboard with all key caps
being empty.

Cherry-pick-of: #14708
Fixes: #14707
Fixes: KEYMAN-LINUX-8P
Test-bot: skip
2025-09-09 16:32:36 +02:00
Eberhard Beilharz
d3d6f63d0f
Merge pull request #14599 from keymanapp/maint/linux/cherry-pick/packaging 2025-09-03 11:56:36 +02:00
Eberhard Beilharz
dd25555fbf
maint(linux): address code review comments 2025-09-01 15:36:42 +02:00
Eberhard Beilharz
701f7b72ec
chore(linux): Update debian changelog 2025-08-27 18:02:47 +02:00
Marc Durdin
67e3bdf3b3
Merge branch 'stable-18.0' into maint/linux/cherry-pick/packaging 2025-08-27 07:01:29 +02:00
Eberhard Beilharz
7ede83ee37
maint(linux): address code review comments 2025-08-25 17:48:06 +02:00
Eberhard Beilharz
591b153e89
maint(linux): ignore generate patch directories 🍒
During a package build a  patch directory (`.pc`) might get created.
That can't and shouldn't be part of the source package. This change
excludes any `.pc` directories.

Cherry-pick-of: #14600
Build-bot: skip
Test-bot: skip
2025-08-25 15:56:48 +02:00
Eberhard Beilharz
0b7ac2d9ee
maint(linux): preserve created package files
Copy the generated files before removing the worktree so that they
are still available for reference.
2025-08-25 15:39:08 +02:00
Eberhard Beilharz
e776aac6c8
maint(linux): create temporary worktree for packaging 🍒
This change creates a temporary worktree for creating Debian packages.
This will allow us to work from a clean state of the source repo. Also
exclude any generated patch directories (`.pc`).

Cherry-pick-of: #14598
Build-bot: skip
Test-bot: skip
2025-08-25 15:24:52 +02:00
Eberhard Beilharz
95e594c1fa
maint(linux): fix lintian warnings
This addresses comments from Debian review of the package.

Cherry-pick-of: #13904
Test-bot: skip
2025-08-22 16:55:08 +02:00
Eberhard Beilharz
cc4de75bd7
Merge pull request #14118 from keymanapp/chore/linux/changelog 2025-06-05 12:28:46 +02:00
Eberhard Beilharz
a5290c1d5d
chore(linux): Update debian changelog 2025-06-04 19:14:19 +02:00
Eberhard Beilharz
305483d0b8
docs(linux): clarify requirement of patched ibus for Keyman < 18 🍒
Cherry-pick-of: #14112
Test-bot: skip
2025-06-04 11:56:31 +02:00
Eberhard Beilharz
4f27f6e256
maint(linux): sudo not required for removing temporary files
Since we have write access to the directory we don't need `sudo` for
removing the temporary dependency files if we pass `-f` to `rm`.
2025-05-30 11:02:46 +02:00
Eberhard Beilharz
fc9efa39fb
maint(linux): fix typo of temporary dependency package
This fixes a typo when we try to remove the temporary files created
during dependency installation. This caused build failures because
the wrong spelling was not in the list of allowed commands, so sudo
kept asking for a password.
2025-05-30 10:48:28 +02:00
Eberhard Beilharz
c811af7029
Merge pull request #14000 from keymanapp/maint/linux/cherry-pick/13970_werror
By default we add the `--werror` option to meson builds. This might cause problems when compiling with a different compiler, so this option adds the `--no-werror` option to our build scripts. This enables integrators to compile with other compiler versions. 

Fixes: #13970
Cherry-pick-of: #13988
2025-05-21 08:53:35 +02:00
Eberhard Beilharz
fdd1e79a45
maint(linux): add --no-werror option to not report warnings as errors
By default we add the `--werror` option to meson builds. This might cause
problems when compiling with a different compiler, so this option adds
the `--no-werror` option to our build scripts. This enables integrators
to compile with other compiler versions.

Fixes: #13970
Cherry-pick-of: #13988
Test-bot: skip
2025-05-20 15:10:16 +02:00
Eberhard Beilharz
f6dd1037c2
fix(linux): configurable path in .service file when using basu
This makes the path in `com.keyman.SystemService1.service`
configurable when using basu (e.g. Gentoo Linux).

(cherry picked from commit 8e4e92067d)
2025-05-20 15:01:50 +02:00
Eberhard Beilharz
55bf72d1e9
Merge pull request #13888 from keymanapp/chore/linux/changelog 2025-05-16 17:38:23 +02:00
Eberhard Beilharz
b02ced4cbb
chore(linux): Update debian changelog 2025-05-16 16:50:47 +02:00
Marc Durdin
084e92059e fix(linux): use correct header guard define in OrderedOutputDevice.h
Test-bot: skip
Fixes: #13911
Cherry-pick-of: #13962
2025-05-16 16:18:20 +02:00
Eberhard Beilharz
e3b7b25107
change(linux): add ICU dependency needed to build on Arch Linux 🍒
Co-authored-by: Nikita Moor <nikita@lreis.ac.cn>
Fixes: #13814
Cherry-pick-of: #13842
2025-05-06 14:58:28 +02:00
Eberhard Beilharz
7abb9b390a
chore(linux): add a stub unit test to allow successful coverage reporting
Previously keyman-system-service didn't have any unit tests. With the
gcov/lcov versions available for Ubuntu 24.04 Noble this suddenly caused
a failure when trying to generate the test coverage report, although it
worked fine with older versions.

This change adds a do-nothing unit test stub for keyman-system-service.
This allows to generate the coverage reporting with Ubuntu 24.04 Noble.

Cherry-pick-of: #13740
2025-04-24 10:15:53 +02:00
Eberhard Beilharz
2558b724b8
chore(linux): Update debian changelog 2025-04-23 11:21:14 +02:00
Marc Durdin
f4f0cf6e80 chore: stable-18.0 2025-04-23 07:06:13 +07:00
Eberhard Beilharz
8044de4649
chore(linux): Update debian changelog 2025-04-04 15:12:52 +02:00
Eberhard Beilharz
565f1b4dec
Merge pull request #13648 from keymanapp/fix/linux/13647_kbd-details
fix(linux): fix crash if kmp doesn't have name field

Fixes: #13647
Fixes: KEYMAN-LINUX-80
2025-04-04 08:57:49 +02:00
Eberhard Beilharz
d1b74d0175
chore(linux): fall back to package id
This change addresses a code review comment. In the case where the kmp
doesn't contain a name, we now use the `packageID` instead.
2025-04-03 15:56:07 +02:00
Eberhard Beilharz
6d39ab0b06
Merge pull request #13625 from keymanapp/fix/linux/13590_arrow-keys
fix(linux): allow unhandled keys to pass through to compliant apps

This change fixes a bug introduced in #13372. Before that engine.c determined if keys are handled or not. For keys that we didn't handle we returned FALSE. However, that didn't allow the Core to adjust the context where necessary, so #13372 moved that to Core. However, this caused ibus_keyman_engine_process_key_event to return TRUE even if we didn't handle the key. Instead we called ibus_engine_forward_key_event with the non-handled key. This worked in most applications, but not in the Text Editor.

This change now does no longer call ibus_engine_forward_key_event for compliant apps but instead returns FALSE from ibus_keyman_engine_process_key_event for unhandled keys, allowing the app to see and act on the key event.

An 'unhandled' key here is a key that doesn't match a rule in the keyboard and isn't a character key. Core returns a QIT_EMIT_KEYSTROKE action for that key.

Fixes: #13590
2025-04-03 10:26:27 +02:00
Eberhard Beilharz
5df36c05a4
fix(linux): fix crash if kmp doesn't have name field
Fixes: #13647
Fixes: KEYMAN-LINUX-80
2025-04-02 18:20:11 +02:00
Eberhard Beilharz
659e844f83
docs(linux): add function headers for some of the engine methods 2025-04-01 16:46:18 +02:00
Eberhard Beilharz
ac6b521583
docs(linux): clarify the newly added return values
Addresses code review comments.
2025-04-01 16:44:29 +02:00
Eberhard Beilharz
915d30cd95
fix(linux): fix cursor movement
This change fixes a bug introduced in #13372. Before that `engine.c`
determined if keys are handled or not. For keys that we didn't handle
we returned `FALSE`. However, that didn't allow the Core to adjust the
context where necessary, so #13372 moved that to Core. However, this
caused `ibus_keyman_engine_process_key_event` to return `TRUE` even if
we didn't handle the key. Instead we called `ibus_engine_forward_key_event`
with the non-handled key. This worked in most applications, but not
in the Text Editor.

This change now does no longer call `ibus_engine_forward_key_event` for
compliant apps but instead returns `FALSE` from
`ibus_keyman_engine_process_key_event` for unhandled keys, allowing the
app to see and act on the key event.

Fixes: #13590
2025-03-31 17:58:08 +02:00
Eberhard Beilharz
4a9a3dc55f
refactor(linux): remove a warning
The previous code resulted in warnings showing up:
`(ibus-engine-keyman:4276): GLib-CRITICAL **: 14:31:16.030: g_hash_table_lookup: assertion 'hash_table != NULL' failed`.
This should work around the warning.
2025-03-31 16:33:31 +02:00
Eberhard Beilharz
3e3a0dbce1
refactor(linux): mark undocumented keycodes as internal
Several keys that are defined in `winuser.h` were added after Keyman
defined its vkeys and so are not documented in the Keyman docs. This
change adds underscores before and after to mark them as being internal.
It's still useful to have them in the source code because it makes the
mapping between Linux keys and Keyman vkeys easier.

Addresses code review comment.
2025-03-26 16:49:31 +01:00
Eberhard Beilharz
a645fea903
fix(linux): improve key mapping to allow Core to reset context
This change tries to map all keys to corresponding Core VKeys so that
Core sees them and can reset the context if necessary. Previously we
had 0 for most of the keys, which meant that we didn't send them to
Core but instead returned right away. While this doesn't directly fix
the failing user tests described in #12968, it fixes the original tests
in #11172.

Closes: #12968
2025-03-21 18:15:46 +01:00
Eberhard Beilharz
74f3a2a975
fix(linux): improve emitting keystrokes
For some reason when using a LDML keyboard we ended up emitting a
keystroke even though Core returned `FALSE for `emitting_keystroke`.
I wasn't able to track down where this happened, but this change seems
like an easy way to fix it.

This showed up when debugging why the changes in #13372 didn't work for
non-compliant apps.
2025-03-21 09:03:21 +01:00