From: ludo@gnu.org (Ludovic Courtès)
To: John Darrington <john@darrington.wattle.id.au>
Cc: guix-devel@gnu.org, John Darrington <jmd@gnu.org>
Subject: Re: [PATCH 1/4] gnu: Add XFILESEARCH path to profiles' environment.
Date: Tue, 29 Nov 2016 15:34:11 +0100 [thread overview]
Message-ID: <878ts273to.fsf@gnu.org> (raw)
In-Reply-To: <20161128131926.GA6466@jocasta.intra> (John Darrington's message of "Mon, 28 Nov 2016 14:19:26 +0100")
John Darrington <john@darrington.wattle.id.au> skribis:
>
> > * gnu/system.scm (operating-system-etc-service): Add new environment
> variable:
>
> The guix.texi change is missing from the log.
>
> Thanks for noticing.
>
> > diff --git a/doc/guix.texi b/doc/guix.texi
> > index e64c361..9d133bb 100644
> > --- a/doc/guix.texi
> > +++ b/doc/guix.texi
> > @@ -1209,6 +1209,36 @@ data in the right format.
> > This is important because the locale data format used by different libc
> > versions may be incompatible.
> >
> > address@hidden X Window System
> > address@hidden XFILESEARCHPATH
> > address@hidden @code{Xt}
> > address@hidden X Toolkit Intrinsics
> > address@hidden @command{xterm}
> > +
> > +If you intend to use X Toolkit Intrinsics client applications such
> > +as @command{xterm} then you should define the @code{XFILESEARCHPATH}
> > +environment variable:
> > +
> > address@hidden
> > +$ export XFILESEARCHPATH="$HOME/.guix-profile/share/X11/%L/%T/%N%C%S:
> > + $HOME/.guix-profile/share/X11/%l/%T/%N%C%S:
> > + $HOME/.guix-profile/share/X11/%T/%N%C%S:
> > + $HOME/.guix-profile/share/X11/%L/%T/%N%S:
> > + $HOME/.guix-profile/share/X11/%l/%T/%N%S:
> > + $HOME/.guix-profile/share/X11/%T/%N%S:
> > + $HOME/.guix-profile/lib/X11/%L/%T/%N%C%S:
> > + $HOME/.guix-profile/lib/X11/%l/%T/%N%C%S:
> > + $HOME/.guix-profile/lib/X11/%T/%N%C%S:
> > + $HOME/.guix-profile/lib/X11/%L/%T/%N%S:
> > + $HOME/.guix-profile/lib/X11/%l/%T/%N%S:
> > + $HOME/.guix-profile/lib/X11/%T/%N%S"
> > address@hidden example
>
> Seriously?! I mean, we can reasonably ask people to do that, can we?
> Is there another way?
>
> *shrug?* It's one more variable to set. Granted it's a long one. But it's
> not *us* that's asking them to do it. We are merely passing along advice
> from the Xt lib developers (see below). If people want to use Xt then
> that's what they're supposed to do.
Fortunately people don’t “want” to use Xt nowadays. ;-)
At any rate, I’m surprised this is so involved.
> > +export XFILESEARCHPATH=\"$HOME/.guix-profile/share/X11/%L/%T/%N%C%S:\\
> > +$HOME/.guix-profile/share/X11/%l/%T/%N%C%S:\\
> > +$HOME/.guix-profile/share/X11/%T/%N%C%S:\\
> > +$HOME/.guix-profile/share/X11/%L/%T/%N%S:\\
> > +$HOME/.guix-profile/share/X11/%l/%T/%N%S:\\
> > +$HOME/.guix-profile/share/X11/%T/%N%S:\\
> > +$HOME/.guix-profile/lib/X11/%L/%T/%N%C%S:\\
> > +$HOME/.guix-profile/lib/X11/%l/%T/%N%C%S:\\
> > +$HOME/.guix-profile/lib/X11/%T/%N%C%S:\\
> > +$HOME/.guix-profile/lib/X11/%L/%T/%N%S:\\
> > +$HOME/.guix-profile/lib/X11/%l/%T/%N%S:\\
> > +$HOME/.guix-profile/lib/X11/%T/%N%S:\\
> > +/run/current-system/profile/share/X11/%L/%T/%N%C%S:\\
> > +/run/current-system/profile/share/X11/%l/%T/%N%C%S:\\
> > +/run/current-system/profile/share/X11/%T/%N%C%S:\\
> > +/run/current-system/profile/share/X11/%L/%T/%N%S:\\
> > +/run/current-system/profile/share/X11/%l/%T/%N%S:\\
> > +/run/current-system/profile/share/X11/%T/%N%S:\\
> > +/run/current-system/profile/lib/X11/%L/%T/%N%C%S:\\
> > +/run/current-system/profile/lib/X11/%l/%T/%N%C%S:\\
> > +/run/current-system/profile/lib/X11/%T/%N%C%S:\\
> > +/run/current-system/profile/lib/X11/%L/%T/%N%S:\\
> > +/run/current-system/profile/lib/X11/%l/%T/%N%S:\\
> > +/run/current-system/profile/lib/X11/%T/%N%S\"
>
> That’s unreasonable IMO.
>
> This is merely the default value that the Xt library sets, but I
> have simply substituted "/usr" with "$HOME/.guix-profile" and
> repeated it substituting "/run/current-system/profile".
> It is a large string, but why is that a problem?
It’s ugly, there’s duplication, and hackers will not dare to touch it.
> We can cut down on the size of this string iff we can somehow
> guarantee that no package ever ships a file in any of those locations.
>
> Some "solutions" (in my order of preference) are:
>
> * The size of the above list can be halved, by dropping either the
> .../lib/... or the .../share/... items - we just have to then make
> sure that no package ships resource files in the one we drop. Historically,
> resource files were always in .../lib (as still are all official
> sources from x.org) but recently third party packages have started
> putting them in .../share.
>
> * I *think* we could also get away with further reducing the set to
> "$HOME/.guix-profile/lib/X11/%T/%N%S:
> /run/current-system/profile/lib/X11/%T/%N%S"
> because, all the Xt dependent packages I've seen so far, put their
> resource files there. However, we cannot know what might get added
> in the future.
Right, if we do both, that’s already much better.
> * Hack the hard coded defaults in the libXt source to use the profile
> settings instead of /usr
Maybe we should just do that, no? It’d be a local change, it would
achieve the same effect, and it would provide a good default.
WDYT?
I suppose there’s trickiness due to the fact that it’s C and we have to
concatenate strings…
> * Do what we had before: Wrap *every* program which uses libXt in
> a script setting XAPPLRESDIR - This is sure to annoy users because
> it would override any XUSERFILESEARCHPATH they had set themselves.
Doesn’t sound great.
> Is this motivated by the broken ctrl-click in xterm? That thing used to
> work, I wonder what happened.
>
> Xterm has never worked properly for me under GuixSD. It "worked" under
> Guix on Debian, presumably because it found the resource files from
> the native installation.
>
> Xterm not working was what prompted me to find out the cause.
> But it will affect all and every package which provides X resource
> files as a shipped file.
>
> Anyway my general opinion is, that I agree that the value of this variable
> is rather long, but:
> 1. I don't see why that is a problem.
> 2. It is how the X Consortium intends and recommends it to be used.
> 3. A competent user will not be intimidated by it.
> 4. A naive user will never be aware of it anyway.
>
>
> For background information, see:
>
> * http://www.faqs.org/faqs/Xt-FAQ
> * The man page for XtResolvePathname
> * The file specs/CH11.xml in the libXt source.
OK. Thanks for the info and everything!
Ludo’.
next prev parent reply other threads:[~2016-11-29 14:34 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-25 19:08 [PATCH 1/4] gnu: Add XFILESEARCH path to profiles' environment John Darrington
2016-11-25 19:08 ` [PATCH 2/4] gnu: Add editres John Darrington
2016-11-27 21:22 ` Ludovic Courtès
2016-11-25 19:08 ` [PATCH 3/4] gnu: Remove wrappers from xfd and xfontsel John Darrington
2016-11-25 19:08 ` [PATCH 4/4] gnu: Xfig: Set XAPPLOADDIR John Darrington
2016-11-27 21:22 ` [PATCH 1/4] gnu: Add XFILESEARCH path to profiles' environment Ludovic Courtès
2016-11-28 13:19 ` John Darrington
2016-11-29 14:34 ` Ludovic Courtès [this message]
2016-11-29 18:16 ` John Darrington
2016-11-29 21:42 ` Ludovic Courtès
2016-11-30 5:36 ` John Darrington
2016-12-02 16:25 ` [PATCH] gnu: Patch libxt's default search path John Darrington
2016-12-04 21:19 ` Ludovic Courtès
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=878ts273to.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=guix-devel@gnu.org \
--cc=jmd@gnu.org \
--cc=john@darrington.wattle.id.au \
/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).