ibusManager: pass on envrionment variables to ibus-daemon
In GNOME 42, the fallback ibus spawn method was changed from using Gio.SubprocessLauncher
to GLib.spawn_async()
, this resulted in two issues for me.
The first issue is that the environment variables don't get passed on to the child, in the GLib.spawn_async()
docs, if envp is not null, then only what is specified for envp will get passed on to the child, this is a problem since ibus expects to also have WAYLAND_DISPLAY
on wayland and DBUS_SESSION_BUS_ADDRESS
for dbus, which results in ibus not working properly.
The second problem I ran into is that ibus immediately exits saying that the parent process died. According to a person on the matrix, that is because g_spawn_async()
double forks and ibus is detecting the death of the temporary process.
I discussed this on the matrix and we weren't able to come up with a solution for the latter problem, so this at least fixes the first issue. This issue is now resolved.
Feedback would be appreciated.