Accepting request 362444 from home:tiwai:branches:M17N
(Resubmission with NoDisplay=true in autostart.desktop) - Fix the invocation of ibus service for KDE, etc (boo#968486): for DEs known to support autostart (KDE, XFCE and LXCE), ibus is now started via XDG autostart for avoiding the race. This should fix the missing ibus service. For other DEs, ibus is still started in xim script, but with a slight (two seconds) delay for avoiding the race, too. Along with the change, INPUT_METHOD environment variable is set explicitly in xim script at startup; this is referred in XDG autostart so that it won't be executed when other IM is chosen. Last but not least, the explicit dbus-launch invocation is dropped, as it's known to conflict with DE's own startup of dbus OBS-URL: https://build.opensuse.org/request/show/362444 OBS-URL: https://build.opensuse.org/package/show/M17N/ibus?expand=0&rev=146
This commit is contained in:
parent
066f1fced6
commit
b7af184101
15
ibus-autostart
Normal file
15
ibus-autostart
Normal file
@ -0,0 +1,15 @@
|
||||
#!/bin/sh
|
||||
|
||||
test x"$INPUT_METHOD" = x"ibus" || exit 0
|
||||
|
||||
# GNOME starts ibus by itself
|
||||
case "$WINDOWMANAGER" in
|
||||
*gnome*)
|
||||
exit 0;;
|
||||
esac
|
||||
|
||||
# sleep for a little while to avoid duplicate startup
|
||||
# sleep 2
|
||||
|
||||
ibus-daemon --xim -d
|
||||
exit 0
|
16
ibus-autostart.desktop
Normal file
16
ibus-autostart.desktop
Normal file
@ -0,0 +1,16 @@
|
||||
[Desktop Entry]
|
||||
_Name=IBus
|
||||
_GenericName=IBus Daemon
|
||||
_Comment=Start IBus daemon
|
||||
Exec=ibus-autostart
|
||||
Icon=ibus-setup
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=System;Utility;
|
||||
StartupNotify=false
|
||||
NoDisplay=true
|
||||
X-GNOME-Autostart-Phase=Applications
|
||||
X-GNOME-AutoRestart=false
|
||||
X-GNOME-Autostart-Notify=false
|
||||
X-KDE-autostart-after=panel
|
||||
X-KDE-StartupNotify=false
|
17
ibus.changes
17
ibus.changes
@ -1,3 +1,20 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 24 19:01:08 CET 2016 - tiwai@suse.de
|
||||
|
||||
- Fix the invocation of ibus service for KDE, etc (boo#968486):
|
||||
for DEs known to support autostart (KDE, XFCE and LXCE), ibus is
|
||||
now started via XDG autostart for avoiding the race. This should
|
||||
fix the missing ibus service. For other DEs, ibus is still
|
||||
started in xim script, but with a slight (two seconds) delay for
|
||||
avoiding the race, too.
|
||||
|
||||
Along with the change, INPUT_METHOD environment variable is set
|
||||
explicitly in xim script at startup; this is referred in XDG
|
||||
autostart so that it won't be executed when other IM is chosen.
|
||||
|
||||
Last but not least, the explicit dbus-launch invocation is dropped,
|
||||
as it's known to conflict with DE's own startup of dbus
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Aug 10 05:03:43 UTC 2015 - ftake@geeko.jp
|
||||
|
||||
|
10
ibus.spec
10
ibus.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package ibus
|
||||
#
|
||||
# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -44,6 +44,8 @@ Source4: xim.d-ibus-121
|
||||
Source5: kde.tar.gz
|
||||
Source6: kde-12.2.tar.gz
|
||||
Source7: macros.ibus
|
||||
Source10: ibus-autostart
|
||||
Source11: ibus-autostart.desktop
|
||||
Source99: baselibs.conf
|
||||
# PATCH-FIX-OPENSUSE ibus-python-install-dir.patch ftake@geeko.jp
|
||||
Patch0: ibus-python-install-dir.patch
|
||||
@ -280,6 +282,10 @@ make DESTDIR=%{buildroot} install -j1
|
||||
# autostart
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/X11/xim.d/
|
||||
install -m 644 %{SOURCE4} %{buildroot}%{_sysconfdir}/X11/xim.d/ibus
|
||||
mkdir -p %{buildroot}%{_bindir}
|
||||
install -c -m 0755 %{SOURCE10} %{buildroot}%{_bindir}/ibus-autostart
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/xdg/autostart
|
||||
install -c -m 0644 %{SOURCE11} %{buildroot}%{_sysconfdir}/xdg/autostart/ibus-autostart.desktop
|
||||
|
||||
sed -i 1i"SYS_LIB=%{_lib}" %{buildroot}%{_sysconfdir}/X11/xim.d/ibus
|
||||
|
||||
@ -365,6 +371,7 @@ dconf update
|
||||
%config %{_sysconfdir}/rpm/macros.ibus
|
||||
%config %{_sysconfdir}/X11/xim.d/*
|
||||
%{_bindir}/ibus
|
||||
%{_bindir}/ibus-autostart
|
||||
%{_bindir}/ibus-daemon
|
||||
%{_bindir}/ibus-setup
|
||||
%{_datadir}/ibus/
|
||||
@ -381,6 +388,7 @@ dconf update
|
||||
# This file is not a config file. Users may not modify it.
|
||||
%{_sysconfdir}/dconf/db/ibus.d/00-upstream-settings
|
||||
%{_sysconfdir}/dconf/profile/ibus
|
||||
%{_sysconfdir}/xdg/autostart/ibus-autostart.desktop
|
||||
%{_mandir}/man1/ibus.1.gz
|
||||
%{_mandir}/man1/ibus-daemon.1.gz
|
||||
%{_mandir}/man1/ibus-setup.1.gz
|
||||
|
@ -3,11 +3,10 @@ if ! type ibus-daemon > /dev/null 2>&1 ; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
# explicitly set below, as referred in xdg autostart
|
||||
export INPUT_METHOD=ibus
|
||||
|
||||
case "$WINDOWMANAGER" in
|
||||
#when skim installed, Autostart must be "false".
|
||||
#here we move $HOME/.kde/share/config/skimrc to skimrc.orig.ibus
|
||||
*kde*)
|
||||
;;
|
||||
# GNOME 3 Settings Daemon keyboard plugin manages all ibus settings itself,
|
||||
# so don't do manual setup&startup of ibus otherwise it would conflict with
|
||||
# G-S-D. see bnc#873016.
|
||||
@ -29,9 +28,6 @@ case "$WINDOWMANAGER" in
|
||||
gsettings set org.gnome.settings-daemon.plugins.keyboard active true
|
||||
return 0
|
||||
;;
|
||||
*)
|
||||
# do nothing
|
||||
;;
|
||||
esac
|
||||
|
||||
# Force OOo to use gtk-immodule
|
||||
@ -56,11 +52,15 @@ else
|
||||
export QT_IM_MODULE=xim
|
||||
fi
|
||||
|
||||
if [ -z $DBUS_SESSION_BUS_ADDRESS ]; then
|
||||
eval `dbus-launch --sh-syntax --exit-with-session --close-stderr < /dev/null`
|
||||
fi
|
||||
|
||||
ibus-daemon --xim -d
|
||||
case "$WINDOWMANAGER" in
|
||||
*kde*|*xfce*|*lxde*)
|
||||
# started via xdg autostart
|
||||
;;
|
||||
*)
|
||||
# FIXME: a little bit of delay is required to avoid race
|
||||
(sleep 2; ibus-daemon --xim -d) &
|
||||
;;
|
||||
esac
|
||||
|
||||
# success:
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user