forked from phuang/ibus
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src, client/x11: Add systemd unit file
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=#2377
- Loading branch information
Showing
5 changed files
with
81 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/sh | ||
@libexecdir@/ibus-x11 & |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
[Unit] | ||
Description=IBus Daemon | ||
CollectMode=inactive-or-failed | ||
|
||
# Require GNOME session and specify startup ordering | ||
Requisite=gnome-session-initialized.target | ||
After=gnome-session-initialized.target | ||
PartOf=gnome-session-initialized.target | ||
Before=gnome-session.target | ||
|
||
# Needs to run when DISPLAY/WAYLAND_DISPLAY is set | ||
After=gnome-session-initialized.target | ||
PartOf=gnome-session-initialized.target | ||
|
||
# Never run in GDM | ||
Conflicts=gnome-session@gnome-login.target | ||
|
||
[Service] | ||
Type=dbus | ||
# Only pull --xim in X11 session, it is done via Xwayland-session.d on Wayland | ||
ExecStart=sh -c '@bindir@/ibus-daemon --panel disable $([[ $XDG_SESSION_TYPE == "x11" ]] && echo "--xim")' | ||
Restart=on-abnormal | ||
BusName=org.freedesktop.IBus | ||
TimeoutStopSec=5 | ||
Slice=session.slice | ||
|
||
[Install] | ||
WantedBy=gnome-session.target |