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

src, client/x11: Add systemd unit file #2377

Merged
merged 1 commit into from Feb 11, 2022

Conversation

garnacho
Copy link

This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:

  • On X11 sessions, ibus-daemon will be launched with --xim parameter,
    so ibus-x11 is started with it.
  • On Wayland sessions, ibus-daemon will be started without XIM support,
    ibus-x11 will be launched and tear down together with all other
    session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

Copy link
Member

@fujiwarat fujiwarat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the patch.

Please put "BUG=#2377" at the end of the git description.

I think this request would be a little late for Fedora 36 Change and it would be safe to target the integration to IBus 1.5.27 & Fedora 37 as this is a system wide change.

client/x11/10-ibus-x11.in Show resolved Hide resolved
client/x11/Makefile.am Show resolved Hide resolved
configure.ac Outdated Show resolved Hide resolved
src/Makefile.am Outdated Show resolved Hide resolved
src/org.freedesktop.IBus.service.in Outdated Show resolved Hide resolved
garnacho added a commit to garnacho/ibus that referenced this pull request Feb 9, 2022
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
garnacho added a commit to garnacho/ibus that referenced this pull request Feb 9, 2022
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
garnacho added a commit to garnacho/ibus that referenced this pull request Feb 9, 2022
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
garnacho added a commit to garnacho/ibus that referenced this pull request Feb 9, 2022
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
garnacho added a commit to garnacho/ibus that referenced this pull request Feb 9, 2022
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
This so far depends on GNOME targets, and is thus just usable there.
Other DEs wishing to use systemd and ibus will need to add the
necessary dependencies where applicable.

There are 2 scenarios here:
- On X11 sessions, ibus-daemon will be launched with --xim parameter,
  so ibus-x11 is started with it.
- On Wayland sessions, ibus-daemon will be started without XIM support,
  ibus-x11 will be launched and tear down together with all other
  session X11 services while Xwayland is running.

For the second part of the second situation, additionally install
a script at /etc/xdg/Xwayland-session.d, which takes care of X11
service initialization together with the Xwayland instance.

BUG=ibus#2377
@fujiwarat
Copy link
Member

fujiwarat commented Feb 10, 2022

<garnacho> there are 2 reasons for the change

the first one is separating ibus-daemon and ibus-x11 startup logic, GNOME Shell on Wayland has capabilities to start/stop Xwayland dynamically on presence of X11 clients, ibus-x11 should follow that
currently, as you know it is GNOME Shell code starting ibus-daemon "manually", besides the well known issues (the process not being killed), we are also handling this with ibus-daemon restarts (optionally passing --xim), which is far from great

And the second reason is https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2235, we are going to raise the file descriptor limit in GNOME Shell/Xwayland, but wouldn't want to have it propagated to other processes

@garnacho
Copy link
Author

FTR, this is the service running locally on my jhbuild setup on a GNOME Wayland session:

[carlos@irma ~]$ systemctl --user status org.freedesktop.IBus.session.GNOME.service
● org.freedesktop.IBus.session.GNOME.service - IBus Daemon
     Loaded: loaded (/run/user/1000/systemd/user.control/org.freedesktop.IBus.session.GNOME.service; enabled-runtime; vendor preset: disabled)
     Active: active (running) since Wed 2022-02-09 21:09:06 CET; 14h ago
   Main PID: 122701 (ibus-daemon)
      Tasks: 28 (limit: 9294)
     Memory: 79.7M
        CPU: 3min 20.546s
     CGroup: /user.slice/user-1000.slice/user@1000.service/session.slice/org.freedesktop.IBus.session.GNOME.service
             ├─122701 /usr/bin/ibus-daemon --panel disable
             ├─122741 /usr/libexec/ibus-dconf
             ├─122744 /usr/libexec/ibus-extension-gtk3
             ├─122938 /usr/libexec/ibus-engine-simple
             ├─123474 /usr/bin/python3 /usr/share/ibus-typing-booster/engine/main.py --ibus
             ├─123475 /usr/libexec/ibus-engine-libpinyin --ibus
             ├─123476 /usr/libexec/ibus-engine-hangul --ibus
             └─123477 /usr/libexec/ibus-engine-m17n --ibus

gnomesysadmins pushed a commit to GNOME/gnome-shell that referenced this pull request Feb 10, 2022
IBus is moving to being a systemd managed service in GNOME sessions
(see ibus/ibus#2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.
gnomesysadmins pushed a commit to GNOME/gnome-shell that referenced this pull request Feb 10, 2022
IBus is moving to being a systemd managed service in GNOME sessions
(see ibus/ibus#2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.
@garnacho
Copy link
Author

The related merge request in GNOME Shell is https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2171

@fujiwarat
Copy link
Member

Thank you very much for your patch.
I will import the patch to Fedora soon.

gnomesysadmins pushed a commit to GNOME/gnome-shell that referenced this pull request Feb 11, 2022
IBus is moving to being a systemd managed service in GNOME sessions
(see ibus/ibus#2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.
gnomesysadmins pushed a commit to GNOME/gnome-shell that referenced this pull request Feb 11, 2022
IBus is moving to being a systemd managed service in GNOME sessions
(see ibus/ibus#2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.
gnomesysadmins pushed a commit to GNOME/gnome-shell that referenced this pull request Feb 11, 2022
IBus is moving to being a systemd managed service in GNOME sessions
(see ibus/ibus#2377). Since there will be a
transition period, and we still have to support non-systemd sessions,
check for this existence at runtime.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/2171>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants