mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-05 16:35:33 +00:00
Installing into the shared area (`/usr/local/share`) requires `root` permissions, so in order to install into the shared area the user has to call `km-package-install` with `sudo`. But we also want to add the keyboard to the user's list of available keyboards so that he can switch to it. That needs to be done in the user context. However, when `sudo` ran the command in the user context, the environment variables to connect to the user's session dbus were not set. This change fixes this by passing `DBUS_SESSION_BUS_ADDRESS` along with the `sudo -u <user>` call. Since `root` doesn't have this variable set (or at least not pointing to the user's dbus), we construct the dbus address based on the user's uid. On newer Ubuntu versions (>=25.04) we also have to set `XDG_RUNTIME_DIR`, at least when running the autopkgtests. Fixes: #14911 |
||
|---|---|---|
| .. | ||
| bcp47tag_tests.py | ||
| canonical_language_code_utils_tests.py | ||
| custom_keyboards_tests.py | ||
| dbus_util_tests.py | ||
| dconf_util_tests.py | ||
| get_kmp_tests.py | ||
| gnome_keyboards_util_tests.py | ||
| gsettings_tests.py | ||
| handle_install_tests.py | ||
| ibus_util_tests.py | ||
| install_kmp_tests.py | ||
| kvk2ldml_tests.py | ||
| lang_tags_map_tests.py | ||
| package_install_completion_tests.py | ||
| python.env | ||
| uninstall_kmp_tests.py | ||