unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <rekado@elephly.net>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: IBus and different GTK versions
Date: Mon, 21 Sep 2015 18:06:05 +0200	[thread overview]
Message-ID: <87r3lrlpua.fsf@gnu.org> (raw)
In-Reply-To: <87bncx54nh.fsf@elephly.net> (Ricardo Wurmus's message of "Sun, 20 Sep 2015 20:25:54 +0200")

Ricardo Wurmus <rekado@elephly.net> skribis:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Ricardo Wurmus <rekado@elephly.net> writes:
>>
>>> 宋文武 <iyzsong@gmail.com> writes:
>>>
>>>>>> We can set 'GTK_EXE_PREFIX' to the '~/.guix-profile', and generate the
>>>>>> 'immodules.cache' files in a profile hook.  It will work for both gtk2
>>>>>> and gtk3 applications.
>>>
>>>>> Does this mean that GTK needs to be installed in the user’s profile for
>>>>> this to work?  I thought ‘GTK_EXE_PREFIX’ would change the path of
>>>>> ‘$libdir’ for *all* of GTK’s libraries.  It can 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’t this a little too high a price to pay?  One can only install 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—such as explicitly
>>> installed themes and input method modules—would have to be installed 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
> ‘~/.guix-profile/lib/gtk-2.0’ to ‘~/.gtk-2.0’ 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 “GTK3_PATH”.  This way we could point “GTK3_PATH”
> at ‘~/.guix-profile/lib/gtk-3.0’, ensuring that only GTK3 applications
> load the GTK3 modules and GTK2 don’t crash.

Sounds good.  We should discuss it with upstream, but IMO this patch is
acceptable regardless of what upstream thinks (I’m 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 “GTK2_PATH” variable instead.

Yes, that would be best.

Thanks!

Ludo’.

      reply	other threads:[~2015-09-21 16:06 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-09-13 11:27 IBus and different GTK versions Ricardo Wurmus
2015-09-13 11:51 ` 宋文武
2015-09-14  8:06   ` Ludovic Courtès
2015-09-14  8:28   ` Ricardo Wurmus
2015-09-14  9:18     ` 宋文武
2015-09-15 19:16       ` Ricardo Wurmus
2015-09-20 17:12         ` Ricardo Wurmus
2015-09-20 18:25           ` Ricardo Wurmus
2015-09-21 16:06             ` Ludovic Courtès [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r3lrlpua.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).