Managing IBus with systemd

Hi,

I’ve been trying to set up IBus as a systemd service on two boxes powered identically with Manjaro KDE (with i3 for a WM) and standalone i3 as an alternative.

The idea is to manage IBus once for any DE.

~ ᐅ cat .config/systemd/user/ibus-custom.service
[Unit]
PartOf=graphical-session.target

Description=IBus Service
After=graphical-session.target

[Service]
Type=exec
ExitType=cgroup
ExecStartPre=/usr/bin/sleep 10
ExecStart=/usr/bin/ibus-daemon -drxR
Restart=no
TimeoutSec=15s
Slice=app.slice

[Install]
WantedBy=graphical-session.target

then

~ ᐅ systemctl enable --user ibus-custom

I have kinda three-fourths success on login:

Box A:

  • KDE: Ok
  • i3: Ok

Box B:

  • KDE: Ok
  • i3: Failure

On Box B logged into i3:

~ ᐅ systemctl status --user ibus-custom
 ibus-custom.service - IBus Service
     Loaded: loaded (/home/alexey/.config/systemd/user/ibus-custom.service; enabled; preset: enabled)
     Active: inactive (dead)

No trouble starting the service manually:

~ ᐅ systemctl start --user ibus-custom

What do I have to look for?

Oh, it works on Box A no longer! I never touched anything systemd related. It’s a step in the right direction, in a way. I have better output now:

~ ᐅ systemctl status --user ibus-custom
○ ibus-custom.service - IBus Service
     Loaded: loaded (/home/alexey/.config/systemd/user/ibus-custom.service; enabled; preset: enabled)
     Active: inactive (dead) since Sun 2023-01-01 17:31:47 MSK; 45s ago
   Duration: 5min 13.817s
    Process: 3118 ExecStartPre=/usr/bin/sleep 10 (code=exited, status=0/SUCCESS)
    Process: 3120 ExecStart=/usr/bin/ibus-daemon -drxR (code=exited, status=0/SUCCESS)
   Main PID: 3120 (code=exited, status=0/SUCCESS)
        CPU: 3.843s

Jan 01 17:26:23 gaucho systemd[640]: Starting IBus Service...
Jan 01 17:26:33 gaucho systemd[640]: Started IBus Service.
Jan 01 17:31:47 gaucho systemd[640]: ibus-custom.service: Consumed 3.843s CPU time.

Success through and through, the service is inactive (dead). What is it?

Are these flags correct? It seems it starts but finishes. For systemd, it should run in the foreground.
And I’ve never seen Type=exec, are you sure about that?

About /usr/bin/ibus-daemon -drxR I’m sure. At least, it’s been running fine in different contexts, including systemd (manual start, as I mentioned). About everything else I’m sure not at all.

Would you suggest removing Type=exec? UPD: It doesn’t make any difference.