From mboxrd@z Thu Jan 1 00:00:00 1970 From: Benjamin Slade Subject: getting applications from Nix to have access to fonts Date: Sat, 18 Aug 2018 19:30:56 -0600 Message-ID: <87sh3b5ei7.fsf@jnanam.net> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48660) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1frCYa-0008PL-2x for help-guix@gnu.org; Sat, 18 Aug 2018 21:31:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1frCYW-0003AQ-4T for help-guix@gnu.org; Sat, 18 Aug 2018 21:31:04 -0400 Received: from mail-it0-x22f.google.com ([2607:f8b0:4001:c0b::22f]:35632) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1frCYV-00039l-W2 for help-guix@gnu.org; Sat, 18 Aug 2018 21:31:00 -0400 Received: by mail-it0-x22f.google.com with SMTP id 139-v6so16374227itf.0 for ; Sat, 18 Aug 2018 18:30:58 -0700 (PDT) Received: from vitasta (c-174-52-88-123.hsd1.ut.comcast.net. [174.52.88.123]) by smtp.gmail.com with ESMTPSA id j126-v6sm2815341ioe.17.2018.08.18.18.30.57 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Aug 2018 18:30:57 -0700 (PDT) List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane.org@gnu.org Sender: "Help-Guix" To: help-guix I'm having trouble getting external applications, specifically things installed via Nix, to have access to fonts, which often is the difference between them working or not working. For instance, I installed Gargoyle (the text adventure/interactive fiction interpreter - http://ccxvii.net/gargoyle/ ) from Nix. If I set gtk2 to use something other than 'sans' as the default font, when I try to launch Gargoyle, it hangs, with the terminal output `Fontconfig error: Cannot load default config file`. I have similar issues with other pieces of software; those which don't hang, usually just have access to whatever fonts they're actually packaged with, and not any of the fonts on my system (including fonts installed via Nix itself). In #guixsd, pkill9 recommended adding `~/.local/bin` to PATH in ~/.profile, and creating a wrapper like this: <----------------#+BEGIN_SRC bash------------> #!/bin/sh # Wrapper to run Gargoyle built and packaged by Nix MESA_LIB=$(dirname $(realpath /run/current-system/profile/lib/libGL.so)) #To get webgl working export LD_LIBRARY_PATH="$MESA_LIB${LD_LIBRARY_PATH:+:}$LD_LIBRARY_PATH" #export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts${FONTCONFIG_PATH:+:}$FONTCONFIG_PATH" export FONTCONFIG_PATH="$(guix build fontconfig)/etc/fonts" exec -a "$0" "/nix/var/nix/profiles/per-user/$USER/profile/bin/gargoyle" "$@" <-----------------#+END_SRC-------------------> However, even doing this, I end up with exactly the same issues. (And I've tried calling the script directly, e.g. with `~/.local/bin/gargoyle`, just in case the PATH from .profile wasn't working correctly.) Does anyone have any insight or suggestions on how to resolve this? -- Benjamin Slade - https://babbagefiles.xyz `(pgp_fp: ,(21BA 2AE1 28F6 DF36 110A 0E9C A320 BBE8 2B52 EE19)) '(sent by mu4e on Emacs running under GNU/Linux . https://gnu.org ) `(Choose Linux ,(Choose Freedom) . https://linux.com )