On Thu, Aug 04, 2022 at 04:42:57PM +0200, Walter Alejandro Iglesias wrote:
> Run xterm with the default system Xresources, open the "VT Fonts" dialog
> (holding down Ctrl and pressing right mouse button) check TrueType
> Fonts.  At least to me, fontconfig writes the following error:
> 
>   $ xterm
>   Fontconfig error: Cannot load default config file: No such file:
>   (null)

Ok I understood this problem. It's caused by the fact that xterm is
accessing /etc/fonts after it's initialization, once unveil() has
entered into action.

One possible patch is to add /etc/fonts to the unveiled directories :

Index: app/xterm/main.c
===================================================================
RCS file: /cvs/OpenBSD/xenocara/app/xterm/main.c,v
retrieving revision 1.57
diff -u -p -u -r1.57 main.c
--- app/xterm/main.c    22 May 2022 14:43:01 -0000      1.57
+++ app/xterm/main.c    5 Aug 2022 13:31:15 -0000
@@ -2968,6 +2968,7 @@ main(int argc, char *argv[]ENVP_ARG)
            }
 
            unveil("/usr/X11R6", "r");
+           unveil("/etc/fonts", "r");
             unveil("/usr/local/share/fonts", "r");
            unveil("/var/cache/fontconfig", "r");
            unveil("/usr/local/share/icons", "r");

-- 
Matthieu Herrb

Reply via email to