pkgsrc-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: xfig: app-defaults and font Helvetica-Narrow not found

    Date:        Fri, 04 Mar 2016 10:48:06 +0100
    Message-ID:  <>

  | the app-defaults for xfig are installed in
  | 	/usr/pkg/lib/X11/app-defaults/Fig
  | but xfig searches in the home directory and in

This is a perennial problem, and there are all kinds of workarounds for
it, it is particularly noticeable in xfig as it really doesn't function at
all without its app-defaults file.

But it affects other applications as well, they tend to just be more forgiving
of an app-default file that is not found.  What it does mean is that if you
modify one that is installed, or install your own when one isn't, unless
you put the file in one of the "standard" places (or set the XAPPLRESDIR
(or whatever it is called) environment variable - which is the most common
solution suggested) they won't be noticed, which is rather more subtle 
behaviour than xfig's.

What I do is add this line ...

/usr/pkg/lib/X11/app-defaults /usr/X11R7/lib/X11/app-defaults union rw,hidden

to /etc/fstab.   (Obviously that assumes that /usr/pkg is where you are
installing packages - LOCALBASE).  The "hidden" option is clearly optional,
having it there keeps this stuff invisible to a normal "df" so no-one
normally notices it unless they look hard.    I have been doing this for
many many years (ever since probably NetBSD 1.3 or something) and the
only problem I ever have is when I forget to do it after a new install.

With that, everything installed in /usr/pkg/lib/X11/app-defaults
appears as if it exists in /usr/X11R7/lib/X11/app-defaults as well.

What's more it works for all users without per-user config, or creating
dummy wrap around scripts to set the env var and then run the real binary.

It does assume that you have unionfs installed in your kernel, if not,
something can probably be done with a "-o union" type mount, but to me
this way always looked easier.

Note that while unionfs is (sometimes) buggy, for this particular usage
it works just fine.

An alternative (much more brutal) fix is to recompile and reinstall
everything X11 related using X11_TYPE=modular so everything X related
gets installed and used from inside LOCALBASE and all app-default files
are in, and looked for in, one place.

The font issue I have not seen, so I'm not sure, but if you do install
(old style) fonts, you either need to "xset fp+ ..." each time you boot,
or add FontPath lines to the Files section in your x server config file
(probably /etc/X11/xorg.conf - but these days it is often missing, and needs
to be created.)

I do see on my system that I don't have any fonts that are adstyl==narrow
(not helvetica anyway, and I think, none), and omitting that part of your
font string, I also don't have pixel size 13 (but do have 12 and 14, and more)

I also don't have times in pixel size 13 (maybe someone thinks it is
unlucky) but do have 10 11 12 14.

But I'd fix the app-defaults file first, without that, worrying about what
xfig is doing is just frustrating and pointless...


Home | Main Index | Thread Index | Old Index