Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibus restart does not work in IBus 1.5.26 and GNOME 42 #2407

Closed
fujiwarat opened this issue Apr 20, 2022 · 2 comments
Closed

ibus restart does not work in IBus 1.5.26 and GNOME 42 #2407

fujiwarat opened this issue Apr 20, 2022 · 2 comments

Comments

@fujiwarat
Copy link
Member

GNOME 42 uses IBus systemd file to launch ibus-daemon.
When I run ibus restart command, ibus-daemon closes owned file descriptors from sysconf() and calls execv() to launch ibus-daemon in ibus/bus/server.c:_restart_server(). But ibus-daemon fails to launch ibus-daemon with execv().

Seems execv() is not permitted with systemd.

ibus restart command need to call systemd D-Bus method if gnome-session launches ibus-daemon with systemd.
But the ibus client does not know whether ibus-daemon is launched with systemd or directly.

E.g. users can call ibus exit command and runs ibus-daemon directly in GNOME.

@fujiwarat
Copy link
Member Author

CC'ing @garnacho

The current workaround is to run systemctl --user restart org.freedesktop.IBus.session.GNOME

@fujiwarat
Copy link
Member Author

Thinking about this again, ibus-daemon outputs the D-Bus address and PID to $XDG_CONFIG_HOME/ibus/bus/ and probably I think IBus clients can get the PPID from the socket file and check if the parent is systemd.

fujiwarat added a commit that referenced this issue Jul 19, 2022
If ibus-daemon is called via systemd, IBus restart API cannot restart
ibus-daemon but just terminates it.
Now ibus restart command checks the systemd avaiability and restart
ibus-daemon via systemd.
ibus start command is also added to launch ibus-daemon with systemd.

BUG=#2407
@fujiwarat fujiwarat self-assigned this Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant