From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: IBus and different GTK versions Date: Mon, 21 Sep 2015 18:06:05 +0200 Message-ID: <87r3lrlpua.fsf@gnu.org> References: <87a8sqa7at.fsf@elephly.net> <87mvwq35c4.fsf@gmail.com> <87k2rt8kvp.fsf@elephly.net> <87twqv7as8.fsf@elephly.net> <87d1xd5828.fsf@elephly.net> <87bncx54nh.fsf@elephly.net> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46003) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Ze3bZ-0007Mf-5v for guix-devel@gnu.org; Mon, 21 Sep 2015 12:06:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Ze3bV-0002mJ-3d for guix-devel@gnu.org; Mon, 21 Sep 2015 12:06:13 -0400 In-Reply-To: <87bncx54nh.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 20 Sep 2015 20:25:54 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Ricardo Wurmus Cc: guix-devel Ricardo Wurmus skribis: > Ricardo Wurmus writes: > >> Ricardo Wurmus writes: >> >>> =E5=AE=8B=E6=96=87=E6=AD=A6 writes: >>> >>>>>> We can set 'GTK_EXE_PREFIX' to the '~/.guix-profile', and generate t= he >>>>>> 'immodules.cache' files in a profile hook. It will work for both gt= k2 >>>>>> and gtk3 applications. >>> >>>>> Does this mean that GTK needs to be installed in the user=E2=80=99s p= rofile for >>>>> this to work? I thought =E2=80=98GTK_EXE_PREFIX=E2=80=99 would chang= e the path of >>>>> =E2=80=98$libdir=E2=80=99 for *all* of GTK=E2=80=99s libraries. It c= an only have one value, not >>>>> a list of paths to look for libraries. >>> >>>> Yes, this require install GTK+ into user's profile. >>>> Also, there is a 'GTK_DATA_PREFIX' in a same situation, which I think = is >>>> the only way to set the GTK+ 2 theme. >>> >>> Isn=E2=80=99t this a little too high a price to pay? One can only inst= all one >>> (major) version of GTK+ into a profile, so when we begin propagating the >>> GTK inputs users will run into conflicts. >>> >>> I would really like to avoid propagating GTK+ (although it may be a bad >>> idea to have software depend on different minor versions of GTK+). It >>> would be very nice if only additional modules=E2=80=94such as explicitly >>> installed themes and input method modules=E2=80=94would have to be inst= alled to >>> the profile. Those who do not need themes or input methods would not >>> need to be bothered with this at all. >> >> I guess the question is: what would be the uglier fix? Do we prefer to >> force users to have GTK+ installed in their profiles, or are we okay >> with patching the GTK+ sources such that additional environment >> variables would be respected, allowing users to specify different >> module directories for version 2 and version 3? It would not be OK to force users to have GTK+ in their profile. > Looking at the GTK sources it occurred to me that there may be yet > another way we could fix this. GTK3 no longer searches for modules in > ~/.gtk-3.0 but GTK2 still looks in ~/.gtk-2.0 by default. Symlinking > =E2=80=98~/.guix-profile/lib/gtk-2.0=E2=80=99 to =E2=80=98~/.gtk-2.0=E2= =80=99 might be sufficient for > GTK2 applications. > > For GTK3 we could use the attached (untested) patch, which makes GTK3 > look for additional modules in the path specified by the optional > environment variable =E2=80=9CGTK3_PATH=E2=80=9D. This way we could poin= t =E2=80=9CGTK3_PATH=E2=80=9D > at =E2=80=98~/.guix-profile/lib/gtk-3.0=E2=80=99, ensuring that only GTK3= applications > load the GTK3 modules and GTK2 don=E2=80=99t crash. Sounds good. We should discuss it with upstream, but IMO this patch is acceptable regardless of what upstream thinks (I=E2=80=99m guessing upstream targets mainly FHS, where the environment variable is typically unnecessary in the first place.) > If we wanted symmetry we could patch GTK2 in a similar manner, making it > respect a =E2=80=9CGTK2_PATH=E2=80=9D variable instead. Yes, that would be best. Thanks! Ludo=E2=80=99.