GNU bug report logs - #44354
[PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Leo Prikler <leo.prikler@HIDDEN>; Keywords: patch; dated Sat, 31 Oct 2020 16:57:02 UTC; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 44354 <at> debbugs.gnu.org:


Received: (at 44354) by debbugs.gnu.org; 4 May 2021 10:15:26 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 06:15:26 2021
Received: from localhost ([127.0.0.1]:52306 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1lds5O-0005bu-5H
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 06:15:26 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:23339)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1lds5I-0005bf-O8
 for 44354 <at> debbugs.gnu.org; Tue, 04 May 2021 06:15:25 -0400
Received: from nijino.local (91-114-247-246.adsl.highway.telekom.at
 [91.114.247.246])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FZG1c755Vz3x6V;
 Tue,  4 May 2021 12:15:16 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1620123317;
 bh=GDIAgDvHlTn5zRxs9QLn3ss1Rxw1XMNhd2prqZRhE9Q=;
 h=Subject:From:To:Cc:Date:In-Reply-To:References;
 b=IDq0iaoZnC8pIU8jrD7JGvmNEis28uQuerTBkXlT9tdCy2vghmiwUFrl6YlHDxYJY
 PsrZGHdMTAsIH9FnGxiEWNWXcScfexcpmYhEFSbj6wYfVFz/ZciAMe/SUZoiCeS9HU
 DY9QxUlgewl6LGGWvPQAA/DUTN/ZVSTVKGxqKcrE=
Message-ID: <3149f088b6e5c7d13b8f10616d7828cedc90ecba.camel@HIDDEN>
Subject: Re: [PATCH] gnu: gnome-deskop-service-type: Set
 GUIX_GTK*_IM_MODULE_FILE.
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>
Date: Tue, 04 May 2021 12:15:16 +0200
In-Reply-To: <8735v2u8f3.fsf@HIDDEN>
References: <875yzzszyu.fsf@HIDDEN>
 <3497ef1623c1a88c8fb9f09c068a078ba857e25f.camel@HIDDEN>
 <8735v2u8f3.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44354
Cc: 44354 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Am Dienstag, den 04.05.2021, 11:58 +0200 schrieb Ricardo Wurmus:
> Leo Prikler <leo.prikler@HIDDEN> writes:
> 
> > Hi,
> > 
> > Am Dienstag, den 04.05.2021, 09:46 +0200 schrieb Ricardo Wurmus:
> > > Hi Leo,
> > > 
> > > I haven’t been able to get ibus-libpinyin to work even when 
> > > these 
> > > variables are set.  I know that these variables used to work 
> > > once.
> > "Used to work" in what sense?  Did ibus-libpinyin work for you 
> > or
> > someone else with these variables set and now it's no longer 
> > working?
> 
> Yes.
> 
> IIRC I patched GTK back in the day to respect these extra 
> variables.  I did that because that made things work.  This 
> predates at least two upgrades to Gnome and the decision on 
> Gnome’s part to “integrate” ibus more tightly; I don’t know 
> exactly when things broke because all I know is that when I 
> returned to Guix after a months-long hiatus things no longer 
> worked.
I think the reason why this might not work if you're putting things
into ~/.guix-profile is because that IM_MODULE_FILE is incomplete. 
Compare its contents against the one where everything is built into the
system, there will be huge differences.

> > > I don’t know if setting them is the correct thing to do for 
> > > Gnome. 
> > > This patch would also only work for system-wide installations 
> > > of 
> > > input methods.  Input methods that have been installed in a 
> > > user 
> > > profile would not be part of the cache files.
> > I'm not sure we can expect things to "just work" with ibus in 
> > the user
> > profile.  As far as I'm aware, we don't expect GDM to find the 
> > user's
> > custom gnome installation without some hacking on their part, so 
> > I
> > don't understand why we would expect GNOME to find ibus in a 
> > similar
> > setup.
> 
> Because it worked just like that before.
> 
> Ibus should be a user process with user configuration.  This is 
> not inherently global, so only making it work with globally 
> installed input methods is a restriction that I think we should 
> aim to do without.
What is a "user process with user configuration" here?  The way I
understand those words, is that
a. the process is launched under the user's account, and
b. the configuration for that process lies in the user's directory.
Certainly, those two hold for ibus.  But they also hold for gnome,
which should not be inherently global either by the above argument. 
Yet managing gnome system-wide is significantly easier than managing it
per-user.

Also note, that my patch would not bar you from setting
GUIX_GTK*_IM_MODULE_FILE to something else if you indeed have a local
ibus setup.  I'd even go so far as to argue, that it doesn't make your
setup more difficult at all.  All it does is make things easier for
those who want a global gnome+ibus setup.

Regards,
Leo





Information forwarded to guix-patches@HIDDEN:
bug#44354; Package guix-patches. Full text available.

Message received at 44354 <at> debbugs.gnu.org:


Received: (at 44354) by debbugs.gnu.org; 4 May 2021 09:59:07 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 05:59:07 2021
Received: from localhost ([127.0.0.1]:52213 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldrpb-0003HC-Hr
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 05:59:07 -0400
Received: from sender4-of-o50.zoho.com ([136.143.188.50]:21060)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ldrpY-0003H2-KB
 for 44354 <at> debbugs.gnu.org; Tue, 04 May 2021 05:59:06 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1620122340; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=Db5uJH183KegaY9C7MpBG6/uup52prE4SGxUsiozRGJDwMh6Bdz28V5qgDRJKW4/l0NftQT8K8DCrVuZr8lhfPHbmySs+35N1Qgy8aPG/euO6K7v7bhI03dMlKh8C6BzhffTH3XylMCEsb/dLEi694C5MALl46LTvoW9A60vIL8=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1620122340;
 h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To;
 bh=ncK/nuTbm1yVtue3QbhM6mJLqRvdG1mm0wauCU9ecNs=; 
 b=gwD4LzFdU8iQRLoD5ZQ23wOChq/AcdzLnn0zRti+A1rGCzX134GQ9z5v8auH4ob7nJIvEDoiLqlOLzZhG/zRUrxNkp6DqQ6bTkBRIJxL4P+lhW/jdabxSAUB4xOIl6IZ9J+3E14i7cqjNwcFfDfWdEbMnd4MQv6qmxZdtz25I3w=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1620122340; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=References:From:To:Cc:Subject:In-reply-to:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=ncK/nuTbm1yVtue3QbhM6mJLqRvdG1mm0wauCU9ecNs=;
 b=Vz8XCw6PiKxgelWuejRMUHqmMHUkvj3nSiDT/qyiSU56pLIOavKVgQDdwwpRZZRd
 ddPgPvl7mY/cSHC0rJgpRYriVqSb/X4TPC8UmRjIGSO3xhc33iDmPKbBdz31Sxce0U+
 qmtW6NXwzxKb+Qe4d6ETe42DRQfGSm/6fQ6LLrb4=
Received: from localhost (p54ad4e9e.dip0.t-ipconnect.de [84.173.78.158]) by
 mx.zohomail.com with SMTPS id 1620122339636967.4444435020935;
 Tue, 4 May 2021 02:58:59 -0700 (PDT)
References: <875yzzszyu.fsf@HIDDEN>
 <3497ef1623c1a88c8fb9f09c068a078ba857e25f.camel@HIDDEN>
User-agent: mu4e 1.4.15; emacs 27.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: Leo Prikler <leo.prikler@HIDDEN>
Subject: Re: [PATCH] gnu: gnome-deskop-service-type: Set
 GUIX_GTK*_IM_MODULE_FILE.
In-reply-to: <3497ef1623c1a88c8fb9f09c068a078ba857e25f.camel@HIDDEN>
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 04 May 2021 11:58:56 +0200
Message-ID: <8735v2u8f3.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 44354
Cc: 44354 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)


Leo Prikler <leo.prikler@HIDDEN> writes:

> Hi,
>
> Am Dienstag, den 04.05.2021, 09:46 +0200 schrieb Ricardo Wurmus:
>> Hi Leo,
>>=20
>> I haven=E2=80=99t been able to get ibus-libpinyin to work even when=20
>> these=20
>> variables are set.  I know that these variables used to work=20
>> once.
> "Used to work" in what sense?  Did ibus-libpinyin work for you=20
> or
> someone else with these variables set and now it's no longer=20
> working?

Yes.

IIRC I patched GTK back in the day to respect these extra=20
variables.  I did that because that made things work.  This=20
predates at least two upgrades to Gnome and the decision on=20
Gnome=E2=80=99s part to =E2=80=9Cintegrate=E2=80=9D ibus more tightly; I do=
n=E2=80=99t know=20
exactly when things broke because all I know is that when I=20
returned to Guix after a months-long hiatus things no longer=20
worked.

>> I don=E2=80=99t know if setting them is the correct thing to do for=20
>> Gnome.=20
>> This patch would also only work for system-wide installations=20
>> of=20
>> input methods.  Input methods that have been installed in a=20
>> user=20
>> profile would not be part of the cache files.
> I'm not sure we can expect things to "just work" with ibus in=20
> the user
> profile.  As far as I'm aware, we don't expect GDM to find the=20
> user's
> custom gnome installation without some hacking on their part, so=20
> I
> don't understand why we would expect GNOME to find ibus in a=20
> similar
> setup.

Because it worked just like that before.

Ibus should be a user process with user configuration.  This is=20
not inherently global, so only making it work with globally=20
installed input methods is a restriction that I think we should=20
aim to do without.

--=20
Ricardo




Information forwarded to guix-patches@HIDDEN:
bug#44354; Package guix-patches. Full text available.

Message received at 44354 <at> debbugs.gnu.org:


Received: (at 44354) by debbugs.gnu.org; 4 May 2021 09:15:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 05:15:12 2021
Received: from localhost ([127.0.0.1]:51983 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldr96-0004zq-4Y
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 05:15:12 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:38976)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1ldr94-0004wi-OR
 for 44354 <at> debbugs.gnu.org; Tue, 04 May 2021 05:15:11 -0400
Received: from nijino.local (91-114-247-246.adsl.highway.telekom.at
 [91.114.247.246])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4FZDhB6Wv3z3wKy;
 Tue,  4 May 2021 11:15:06 +0200 (CEST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1620119707;
 bh=7Ww9XG7yLDs8rTZwloOjC0OR9RXzZynkK9OsdxM6pu8=;
 h=Subject:From:To:Date:In-Reply-To:References;
 b=ZGHBEsO6GR8mV/wctzdqvxzdH93rAeSWYPmSJuz3Kul+NhZOIgFisP92b7mFfCDaL
 TdRdtNaDdloF6Du/dmxxOrOTnWkb+W9uw6oLELcJJKoXP2xC4D/N0QCHQXDC8PiZUK
 z2+rP7McDDP31afxckgVb673ATcWGmF+DuKrWMIQ=
Message-ID: <3497ef1623c1a88c8fb9f09c068a078ba857e25f.camel@HIDDEN>
Subject: Re: [PATCH] gnu: gnome-deskop-service-type: Set
 GUIX_GTK*_IM_MODULE_FILE.
From: Leo Prikler <leo.prikler@HIDDEN>
To: Ricardo Wurmus <rekado@HIDDEN>, 44354 <at> debbugs.gnu.org
Date: Tue, 04 May 2021 11:15:05 +0200
In-Reply-To: <875yzzszyu.fsf@HIDDEN>
References: <875yzzszyu.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 44354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

Hi,

Am Dienstag, den 04.05.2021, 09:46 +0200 schrieb Ricardo Wurmus:
> Hi Leo,
> 
> I haven’t been able to get ibus-libpinyin to work even when these 
> variables are set.  I know that these variables used to work once.
"Used to work" in what sense?  Did ibus-libpinyin work for you or
someone else with these variables set and now it's no longer working?

> I don’t know if setting them is the correct thing to do for Gnome. 
> This patch would also only work for system-wide installations of 
> input methods.  Input methods that have been installed in a user 
> profile would not be part of the cache files.
I'm not sure we can expect things to "just work" with ibus in the user
profile.  As far as I'm aware, we don't expect GDM to find the user's
custom gnome installation without some hacking on their part, so I
don't understand why we would expect GNOME to find ibus in a similar
setup.

> Can we take a step back and come to an understanding of how ibus 
> in Gnome is supposed to work?  Ibus in Gnome is (supposed to be) 
> more “integrated” than in other environments, which means that we 
> should first aim to understand what Gnome attempts to do with 
> ibus.
As far as I know, GNOME should recognize ibus as one of its input
modules and then offer appropriate input sources in its settings.  The
specifics are handled by gsd-keyboard-manager, at least as far as
setting these is concerned.  How the settings are interpreted is
probably a matter of GtkIMContext, which at some point hands off
control to ibus IIUC.

> We should also take into account dconf keys, such as these:
> 
> /desktop/ibus/
This seems to contain settings, that IBus wants to know about,
including stuff like what Emojis you last typed for the completion UI
and so on, and so forth.  Of particular interest here is probably the
key '/desktop/ibus/general/preload-engines', which lists all engines to
load at startup.
> /org/gnome/desktop/input-sources/mru-sources
> /org/gnome/desktop/input-sources/sources
These are lists of tuples, which are either ('xkb', VARIANT) or
('ibus', ENGINE).  As far as I know, the latter won't work correctly
without GNOME knowing about ibus existing, for which I patch GUIX_GTK*_IM_MODULE_FILE.
> /org/gnome/desktop/interface/gtk-im-module
This one's likely set to "ibus" inside an ibus setup.  In particular,
gsd-keyboard-manager sets it to "ibus" if it notices any of the input-
sources to contain an ibus engine and to "gtk-im-context-simple"
otherwise.  I'm sure there would be more elegant solutions, but that's
the one they chose.

Regards,
Leo





Information forwarded to guix-patches@HIDDEN:
bug#44354; Package guix-patches. Full text available.

Message received at 44354 <at> debbugs.gnu.org:


Received: (at 44354) by debbugs.gnu.org; 4 May 2021 07:47:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue May 04 03:47:01 2021
Received: from localhost ([127.0.0.1]:51445 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ldpll-0005pL-JG
	for submit <at> debbugs.gnu.org; Tue, 04 May 2021 03:47:01 -0400
Received: from sender4-of-o51.zoho.com ([136.143.188.51]:21170)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <rekado@HIDDEN>) id 1ldplk-0005p9-8Y
 for 44354 <at> debbugs.gnu.org; Tue, 04 May 2021 03:47:01 -0400
ARC-Seal: i=1; a=rsa-sha256; t=1620114415; cv=none; 
 d=zohomail.com; s=zohoarc; 
 b=EvsWsSBHr9BC1we9I8I58VU2yqvZw156jupZWqWyOJp32kdgEb+nllNOcMtC6SwuFNkEFCIGmji7hiH3RJliJdFzjeJyR23XGcMiqcy03xqb557EOQEknhMjUeR2J4L8w3Wci5i4HDD47oInIH6SwlFIQvSf/x+cadzW+Y5ViH8=
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com;
 s=zohoarc; t=1620114415;
 h=Content-Type:Content-Transfer-Encoding:Date:From:MIME-Version:Message-ID:Subject:To;
 bh=8iZJ9MFweXmOlXESpW2VRM6oesQSiSVjpIZEW71vo4A=; 
 b=jjzFlF/T9o7KhypWkLI14v657hNHlVaSKJ4B+0mzJkTABLW5p72Yg5ChFNfKXy95mIGMhlgKliBHgqx6q9dCKpJINjsTw7sBSlPjVjwNe4x2RwiNyJ00O7YI4HowMk7ROdGeKKjn/bUx+jWhPgqAgpfoi3LHvXUZSCBJdk5JuzI=
ARC-Authentication-Results: i=1; mx.zohomail.com;
 dkim=pass  header.i=elephly.net;
 spf=pass  smtp.mailfrom=rekado@HIDDEN;
 dmarc=pass header.from=<rekado@HIDDEN> header.from=<rekado@HIDDEN>
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1620114415; 
 s=zoho; d=elephly.net; i=rekado@HIDDEN;
 h=From:To:Subject:Date:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding;
 bh=8iZJ9MFweXmOlXESpW2VRM6oesQSiSVjpIZEW71vo4A=;
 b=Se0KhyJ+MHHOk2TkLVOHPD8fHLAaVf6Pj2VpYCMfI6HMNVpj8L+1cech/ujhubRt
 XL+c5BTskTyQQsEuwya1uu4wxjK8qihNyxOsF7d5og9aBvW6b154VWWJfWfF0wMdaVX
 M57l8BFicLpfwHAClIo2cUj3xtMufDFFdMCDQ9Go=
Received: from localhost (p54ad4e9e.dip0.t-ipconnect.de [84.173.78.158]) by
 mx.zohomail.com with SMTPS id 1620114412955502.50947839166076;
 Tue, 4 May 2021 00:46:52 -0700 (PDT)
User-agent: mu4e 1.4.15; emacs 27.2
From: Ricardo Wurmus <rekado@HIDDEN>
To: 44354 <at> debbugs.gnu.org
Subject: [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.
X-URL: https://elephly.net
X-PGP-Key: https://elephly.net/rekado.pubkey
X-PGP-Fingerprint: BCA6 89B6 3655 3801 C3C6  2150 197A 5888 235F ACAC
Date: Tue, 04 May 2021 09:46:49 +0200
Message-ID: <875yzzszyu.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: quoted-printable
X-ZohoMailClient: External
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 44354
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Leo,

I haven=E2=80=99t been able to get ibus-libpinyin to work even when these=20
variables are set.  I know that these variables used to work once.

I don=E2=80=99t know if setting them is the correct thing to do for Gnome.=
=20
This patch would also only work for system-wide installations of=20
input methods.  Input methods that have been installed in a user=20
profile would not be part of the cache files.

Can we take a step back and come to an understanding of how ibus=20
in Gnome is supposed to work?  Ibus in Gnome is (supposed to be)=20
more =E2=80=9Cintegrated=E2=80=9D than in other environments, which means t=
hat we=20
should first aim to understand what Gnome attempts to do with=20
ibus.

We should also take into account dconf keys, such as these:

/desktop/ibus/
/org/gnome/desktop/input-sources/mru-sources
/org/gnome/desktop/input-sources/sources
/org/gnome/desktop/interface/gtk-im-module

What do you think?

--=20
Ricardo




Information forwarded to guix-patches@HIDDEN:
bug#44354; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 31 Oct 2020 16:56:01 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Sat Oct 31 12:56:01 2020
Received: from localhost ([127.0.0.1]:34436 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1kYuAb-0006fA-ET
	for submit <at> debbugs.gnu.org; Sat, 31 Oct 2020 12:56:01 -0400
Received: from lists.gnu.org ([209.51.188.17]:46612)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <leo.prikler@HIDDEN>) id 1kYuAa-0006f3-3K
 for submit <at> debbugs.gnu.org; Sat, 31 Oct 2020 12:56:00 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52752)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo.prikler@HIDDEN>)
 id 1kYuAZ-0000Or-H8
 for guix-patches@HIDDEN; Sat, 31 Oct 2020 12:55:59 -0400
Received: from mailrelay.tugraz.at ([129.27.2.202]:19941)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <leo.prikler@HIDDEN>)
 id 1kYuAW-0001HK-Kg
 for guix-patches@HIDDEN; Sat, 31 Oct 2020 12:55:58 -0400
Received: from localhost.localdomain (217-149-162-161.nat.highway.telekom.at
 [217.149.162.161])
 by mailrelay.tugraz.at (Postfix) with ESMTPSA id 4CNlXD4zhZz3wYj
 for <guix-patches@HIDDEN>; Sat, 31 Oct 2020 17:49:48 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tugraz.at;
 s=mailrelay; t=1604162988;
 bh=IAFwdIsJ1+iNLsEPTMB5QFTIb/5OpPlQ+hfIm5ZiXgs=;
 h=From:To:Subject:Date;
 b=lMqFXyd8EdqjurjrLHecBfeCa7X66bnFfR1MQhkTY8wWoc/F4CqLXUoR6LitWcjxQ
 4QaJMb7G78cbSnp0bGkqhHrE6ZsJ1jVoNJbCypae1eXQ/U0xh5WDiRRS2cIoc5bZ3v
 40dHQMNFDa5MqJTsuyTn/wAeevGdckod+ZHs5X58=
From: Leo Prikler <leo.prikler@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: gnome-deskop-service-type: Set GUIX_GTK*_IM_MODULE_FILE.
Date: Sat, 31 Oct 2020 17:46:03 +0100
Message-Id: <20201031164602.13152-1-leo.prikler@HIDDEN>
X-Mailer: git-send-email 2.29.1
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
X-TUG-Backscatter-control: bt4lQm5Tva3SBgCuw0EnZw
X-Spam-Scanner: SpamAssassin 3.003001 
X-Spam-Score-relay: -1.9
X-Scanned-By: MIMEDefang 2.74 on 129.27.10.117
Received-SPF: pass client-ip=129.27.2.202;
 envelope-from=leo.prikler@HIDDEN; helo=mailrelay.tugraz.at
X-detected-operating-system: by eggs.gnu.org: First seen = 2020/10/31 12:49:50
X-ACL-Warn: Detected OS   = Linux 3.11 and newer [fuzzy]
X-Spam_score_int: -42
X-Spam_score: -4.3
X-Spam_bar: ----
X-Spam_report: (-4.3 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3,
 RCVD_IN_MSPIKE_H3=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

This makes it, so that GNOME can handle system-wide input methods installed
by adding them to the gnome package, to the operating system packages, or
to some other profile-service.  An example would be a system-wide installation
of ibus along with input methods like ibus-anthy or ibus-rime.

* gnu/services/desktop.scm (gnome-environment): New variable.
(gnome-desktop-service-type)[extensions]: Use it here.
---
 gnu/services/desktop.scm | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 265cf9f35f..8a571aacb0 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -918,12 +918,43 @@ rules."
            "gnome-system-monitor"
            "gvfs"))))
 
+(define (gnome-environment config)
+  (let* ((lib "/run/current-system/profile/lib")
+         (im-module-files
+          `(("3"
+             "GUIX_GTK3_IM_MODULE_FILE"
+             .
+             ,(string-append lib "/gtk-3.0/3.0.0/immodules-gtk3.cache"))
+            ("2"
+             "GUIX_GTK2_IM_MODULE_FILE"
+             .
+             ,(string-append lib "/gtk-2.0/2.10.0/immodules-gtk2.cache"))))
+         (versions
+          (filter-map
+           (match-lambda
+             ((_ pkg)
+              (and (package? pkg)
+                   (string=? (package-name pkg) "gtk+")
+                   (version-major (package-version pkg))))
+             ((_ pkg "out")
+              (and (package? pkg)
+                   (string=? (package-name pkg) "gtk+")
+                   (version-major (package-version pkg))))
+             (_ #f))
+           (package-transitive-inputs (gnome-package config)))))
+    (filter-map
+     (lambda (version)
+       (assoc-ref im-module-files version))
+     (delete-duplicates versions))))
+
 (define gnome-desktop-service-type
   (service-type
    (name 'gnome-desktop)
    (extensions
     (list (service-extension polkit-service-type
                              gnome-polkit-settings)
+          (service-extension session-environment-service-type
+                             gnome-environment)
           (service-extension profile-service-type
                              (compose list
                                       gnome-package))))
-- 
2.29.1





Acknowledgement sent to Leo Prikler <leo.prikler@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#44354; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Tue, 4 May 2021 10:30:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.