Subject: Re: reasonable details for X-applications...
To: Lubos Vrbka <shnek@chemi.muni.cz>
From: Frederick Bruckman <fredb@immanent.net>
List: netbsd-help
Date: 01/21/2003 09:36:34
On Tue, 21 Jan 2003, Lubos Vrbka wrote:

> i currently use aterm (pkgsrc/x11/aterm) and i would like to know what
> resources (mainly font family, size, ...) does it use. i was looking
> into man to get the information where the initial settings are stored.
> it says:
>
> aterm  accepts  application  defaults  set  in   XAPPLOAD-
> DIR/aterm (compile-time defined: usually /usr/X11R6/lib/X11/app-
> defaults/aterm)  and  resources  set  in  ~/.Xdefaults  or
> ~/.Xresources.
> ...
> If  no resources are specified, suitable defaults will be used.
>
> i don't have aterm in ...app-defaults (i searched the whole /usr) and i
> don't use Xdefaults or Xresources file. where does the application get
> the SUITABLE DEFAULTS mentioned in the man? i was looking into the
> defaults file for XTerm , but it also doesn't contain the font
> specification in the form that i'm used to know (i.e.
> -*-fixed-*...-14-*-...) - it seems that it contains just absolute sizes
> of the characters... (i.e. 7x13, ...)

Last question first. Those are aliases. Observe:

 # grep 7x13 /usr/X11R6/lib/X11/fonts/misc/fonts.alias
 7x13         -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-1
 7x13bold     -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso8859-1
 7x13euro     -misc-fixed-medium-r-normal--13-120-75-75-c-70-iso8859-15
 7x13eurobold -misc-fixed-bold-r-normal--13-120-75-75-c-70-iso8859-15

Either form should work.

The app-defaults file for "aterm" would be
/usr/X11R6/lib/X11/app-defaults/Aterm, but no, that doesn't exist.
Since it's an "xterm" replacement, defaults are drawn from
/usr/X11R6/lib/app-defaults/XTerm, that is, except for the ones that
are compiled in. It will respond to entries in your resources file for
either XTerm*foo:, or Aterm*foo or aterm*foo. (Note, the 't' is never
capitalized.)

> well, why i would like to know how to specify the defaults?

The big secret is... the name for the XENVIRONMENT file on NetBSD is
${HOME}/.Xdefaults-$(hostname) (expanded). I find that stupid, since
if anything, you'd want the settings to vary with the X server host,
not with the login host, but there it is. You can override the name by
setting XENVIRONMENT in your environment. I have, for example, in
~/.xsession:

 XENVIRONMENT=~/.Xresources
 export XENVIRONMENT

> the font in
> the aterm is small and i would like to increase its size - but i don't
> know the name and it's quite hard work to go through all fonts in the
> xfontsel to search for the right one... :o(

Well, "xlsfonts" will give a complete list of available fonts, but no
clue as to what they look like.

> by the way, is there any possibility to get the name of the font used
> from the running [xa]term?

You mean "fonts".

 appres XTerm | grep 'font.*:'

doesn't actually tap a running "xterm", but I believe it tells you
what you want to know.

Frederick