Re: Trying to use the Droid fonts in xterm

2011-02-07 Thread Siard
Bob Proulx wrote:
 Siard wrote:
  Camaleón wrote:
   But if I set the font face and font size from ~/.Xresources it
   seems to be omitted (no warning nor error, but the font does not
   change) :-?
  
  As far as I remember, ~/.Xdefaults should be used instead since a
  few years.
 
 Actually it is the other way around.  In the beginning it was
 .Xdefaults (and actually still is) but now it is .Xresources.  But the
 reasoning isn't simple.  There are something like six different unique
 places that applications can get resource information.  Some of those
 override others and some do not.  It isn't pretty nor simple.
 
 The .Xdefaults file is used by default from the X server unless there
 is data set by 'xrdb'.  In which case the .Xdefault file is ignored.
 You read that right, it is the default but mostly ignored.
 
 Normally in the session startup the xrdb program is called to load a
 personal .Xresources file or a system Xresources file.  Therefore for
 the 99.44% of us (a number I just made up from reading an ivory soap
 package) reading this mailing list that are running X will have data
 loaded from xrdb and the .Xdefaults file will be ignored.  The rest
 will have started X using 'xinit' and have total control with the
 $HOME/.xinitrc file.  (And I can't remember what the 'startx' script
 does.  You can browse the script to figure it out.)
 
 Normally by default in Debian the X startup flow will start with the
 /etc/X11/Xsession script which chains through the script
 /etc/X11/Xsession.d/30x11-common_xresources which runs xrdb and loads
 up resources from the /etc/X11/Xresources/* and the $HOME/.Xresources
 file if it exists.  Because of that you typically want to make
 resource changes to ~/.Xresources and then reload it with xrdb.
 Changes to the file do not take effect until loaded.
 
   xrdb -merge ~/.Xresources
 
 That works to modify or add resources.  But of course if you are
 deleting them then you will need to dump them first, remove the ones
 you want to remote, and then load the result.  Because if you load
 your ~/.Xresources then you also drop all of the resources from
 /etc/X11/Xresources/* which are merged in.  (Whew!  That is too much
 to know!  My brain hurts.)
 
 I say normally by default because a lot of users do not run a Debian
 default X environment through gdm/kdm/xdm and instead start X using
 either xinit or startx from the command line.  This allows complete
 customization and of course many of those users will never have called
 xrdb and therefore will actually default to the .Xdefaults file.  (I
 had to add this paragraph or otherwise each and every one of those
 unique users would have commented upon it.)
 
 Now by this point you may have forgotten some important questions.
 Here is the important questions you should be asking.  Why have
 .Xdefaults *and* .Xresources?  Why is .Xresources newer?  What is the
 advantage of .Xresources over .Xdefaults?  Why is it preferred?
 
 The answer is that .Xdefaults is a local file in your home directory.
 But X is designed as a network transparent windowing system.  If you
 throw your display onto a different network host then it won't have
 access to your $HOME/.Xdefaults file on the other machine.  (Unless
 you are also using something like NFS.  But that is a different
 story.)  If you have a different $HOME on a different host then you
 will have to set your fonts and colors and such all over again on that
 other host.  But wait it gets worse.  If you have a display that is
 large and a display that is small then both are forced to use the same
 .Xdefaults.  It's a problem.  [Plus if that happens to be a shared
 account (more common when X was designed) then you get to fight over
 the settings with other users of that account.]
 
 Instead the Xresources set through xrdb is a property of your display.
 One display that is large can set small fonts.  Another display that
 is small can set large fonts.  You can have one set of defaults when
 logged in with your desktop and a different set of defaults when
 connected using a smartphone/pda with a small screen.  The resources
 are available over the network.  When the application queries it for
 resources they are all in one place and available from your display.
 This solves most of the problems of a $HOME/.Xdefaults file.

Interesting information, which I will keep for future reference.
It explains why ~/.Xresources was ignored since I moved from gdm to the
console to start X.
It also explains why ~/.Xmodmap was ignored since then, so I had to add
'xmodmap ~/.Xmodmap' as an extra startup command.

BTW, I start X with just a script that has some startup commands and
starts the WM or DE.

E.g., /usr/local/fluxbox-session contains:

#! /bin/sh
/usr/bin/unclutter -idle 2 
xmodmap ~/.Xmodmap  
/usr/bin/xbindkeys 
/usr/bin/fluxbox

/usr/local/kde-session contains:

#! /bin/sh
/usr/bin/unclutter -idle 2 
xmodmap ~/.Xmodmap 
/usr/bin/startkde


--
To UNSUBSCRIBE, email to 

Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Liam O'Toole
On 2011-02-05, John Magolske listm...@b79.net wrote:
 I just installed the Droid fonts on Debian sid like so:

   % wget 
 http://mirrors.kernel.org/ubuntu/pool/universe/t/ttf-droid/ttf-droid_1.00~b112+dfsg+1-0ubuntu1_all.deb
   # dpkg -i ttf-droid_1.00\~b112+dfsg+1-0ubuntu1_all.deb
   # fc-cache -v -f /usr/share/fonts/truetype/ttf-droid

 I find it's possible to pick  set this font using the pull-down menu in
 gvim, but how does one set it in xterm? I tried this in my ~/.Xresources
 (fc-list shows a Droid Sans Mono:style=Regular) :

   XTerm*font:  Droid Sans Mono:style=Regular

 But get this:

   unable to open font Droid Sans Mono:style=Regular, trying fixed

 Any tips on how to get the Droid fonts working with xterm?

In the case of TrueType fonts you need to specify the faceName and
faceSize resources, e.g., 

XTerm*faceName: Droid Sans Mono
XTerm*faceSize: 9

Or you can specify the same at startup:

xterm -fa Droid Sans Mono -fs 9

-- 
Liam O'Toole
Cork, Ireland



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/slrnikq7s4.2la.liam.p.otoole@dipsy.tubbynet



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Camaleón
On Sat, 05 Feb 2011 09:59:32 +, Liam O'Toole wrote:

 On 2011-02-05, John Magolske wrote:

(...)

   XTerm*font:  Droid Sans Mono:style=Regular

 But get this:

   unable to open font Droid Sans Mono:style=Regular, trying
   fixed

 Any tips on how to get the Droid fonts working with xterm?
 
 In the case of TrueType fonts you need to specify the faceName and
 faceSize resources, e.g.,
 
   XTerm*faceName: Droid Sans Mono
   XTerm*faceSize: 9
 
 Or you can specify the same at startup:
 
   xterm -fa Droid Sans Mono -fs 9


Hum... this should also work for the OP:

xterm -fa Droid Sans Mono:style=Regular -fs 9

But if I set the font face and font size from ~/.Xresources it seems to 
be omitted (no warning nor error, but the font does not change) :-?

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.02.05.13.15...@gmail.com



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Siard
Camaleón wrote:
 But if I set the font face and font size from ~/.Xresources it
 seems to be omitted (no warning nor error, but the font does not
 change) :-?

As far as I remember, ~/.Xdefaults should be used instead since a few
years.
Having xfonts-efont-unicode installed, this is what I have in
~/.Xdefaults:

xterm*VT100.foreground:  black
xterm*VT100.background:  white
xterm*VT100.cursorColor: gray
xterm*VT100.geometry: 85x40
xterm*VT100.font:  -efont-fixed-medium-r-*-*-16-*-*-*-*-*-iso10646-*


--
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20110205143713.fa4de970.shiems...@kpnplanet.nl



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Camaleón
On Sat, 05 Feb 2011 14:37:13 +0100, Siard wrote:

 Camaleón wrote:
 But if I set the font face and font size from ~/.Xresources it seems
 to be omitted (no warning nor error, but the font does not change) :-?
 
 As far as I remember, ~/.Xdefaults should be used instead since a few
 years.

(...)

I've tried with ~/.Xdefaults but it doesn't work either.

I mean, this works:

xterm -fa Courier New -fs 14

But this doesn't:

sm01@stt008:~$ cat .Xdefaults
XTerm*faceName: Courier New
XTerm*faceSize: 14

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.02.05.14.48...@gmail.com



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Liam O'Toole
On 2011-02-05, Camaleón noela...@gmail.com wrote:
 On Sat, 05 Feb 2011 14:37:13 +0100, Siard wrote:

 Camaleón wrote:
 But if I set the font face and font size from ~/.Xresources it seems
 to be omitted (no warning nor error, but the font does not change) :-?
 
 As far as I remember, ~/.Xdefaults should be used instead since a few
 years.

 (...)

 I've tried with ~/.Xdefaults but it doesn't work either.

 I mean, this works:

 xterm -fa Courier New -fs 14

 But this doesn't:

 sm01@stt008:~$ cat .Xdefaults
 XTerm*faceName: Courier New
 XTerm*faceSize: 14


Did you reload .Xdefaults (or .Xresources)?

xrdb -merge .Xdefaults

Or simply restart X.

-- 
Liam O'Toole
Cork, Ireland



-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/slrnikrhg2.rsp.liam.p.otoole@dipsy.tubbynet



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Camaleón
On Sat, 05 Feb 2011 21:49:54 +, Liam O'Toole wrote:

 On 2011-02-05, Camaleón wrote:

 I mean, this works:

 xterm -fa Courier New -fs 14

 But this doesn't:

 sm01@stt008:~$ cat .Xdefaults
 XTerm*faceName: Courier New
 XTerm*faceSize: 14


 Did you reload .Xdefaults (or .Xresources)?
 
   xrdb -merge .Xdefaults

Ha! Nope, and that did it, thanks :-)
 
 Or simply restart X.

Greetings,

-- 
Camaleón


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/pan.2011.02.05.22.30...@gmail.com



Re: Trying to use the Droid fonts in xterm

2011-02-05 Thread Bob Proulx
Siard wrote:
 Camaleón wrote:
  But if I set the font face and font size from ~/.Xresources it
  seems to be omitted (no warning nor error, but the font does not
  change) :-?
 
 As far as I remember, ~/.Xdefaults should be used instead since a few
 years.

Actually it is the other way around.  In the beginning it was
.Xdefaults (and actually still is) but now it is .Xresources.  But the
reasoning isn't simple.  There are something like six different unique
places that applications can get resource information.  Some of those
override others and some do not.  It isn't pretty nor simple.

The .Xdefaults file is used by default from the X server unless there
is data set by 'xrdb'.  In which case the .Xdefault file is ignored.
You read that right, it is the default but mostly ignored.

Normally in the session startup the xrdb program is called to load a
personal .Xresources file or a system Xresources file.  Therefore for
the 99.44% of us (a number I just made up from reading an ivory soap
package) reading this mailing list that are running X will have data
loaded from xrdb and the .Xdefaults file will be ignored.  The rest
will have started X using 'xinit' and have total control with the
$HOME/.xinitrc file.  (And I can't remember what the 'startx' script
does.  You can browse the script to figure it out.)

Normally by default in Debian the X startup flow will start with the
/etc/X11/Xsession script which chains through the script
/etc/X11/Xsession.d/30x11-common_xresources which runs xrdb and loads
up resources from the /etc/X11/Xresources/* and the $HOME/.Xresources
file if it exists.  Because of that you typically want to make
resource changes to ~/.Xresources and then reload it with xrdb.
Changes to the file do not take effect until loaded.

  xrdb -merge ~/.Xresources

That works to modify or add resources.  But of course if you are
deleting them then you will need to dump them first, remove the ones
you want to remote, and then load the result.  Because if you load
your ~/.Xresources then you also drop all of the resources from
/etc/X11/Xresources/* which are merged in.  (Whew!  That is too much
to know!  My brain hurts.)

I say normally by default because a lot of users do not run a Debian
default X environment through gdm/kdm/xdm and instead start X using
either xinit or startx from the command line.  This allows complete
customization and of course many of those users will never have called
xrdb and therefore will actually default to the .Xdefaults file.  (I
had to add this paragraph or otherwise each and every one of those
unique users would have commented upon it.)

Now by this point you may have forgotten some important questions.
Here is the important questions you should be asking.  Why have
.Xdefaults *and* .Xresources?  Why is .Xresources newer?  What is the
advantage of .Xresources over .Xdefaults?  Why is it preferred?

The answer is that .Xdefaults is a local file in your home directory.
But X is designed as a network transparent windowing system.  If you
throw your display onto a different network host then it won't have
access to your $HOME/.Xdefaults file on the other machine.  (Unless
you are also using something like NFS.  But that is a different
story.)  If you have a different $HOME on a different host then you
will have to set your fonts and colors and such all over again on that
other host.  But wait it gets worse.  If you have a display that is
large and a display that is small then both are forced to use the same
.Xdefaults.  It's a problem.  [Plus if that happens to be a shared
account (more common when X was designed) then you get to fight over
the settings with other users of that account.]

Instead the Xresources set through xrdb is a property of your display.
One display that is large can set small fonts.  Another display that
is small can set large fonts.  You can have one set of defaults when
logged in with your desktop and a different set of defaults when
connected using a smartphone/pda with a small screen.  The resources
are available over the network.  When the application queries it for
resources they are all in one place and available from your display.
This solves most of the problems of a $HOME/.Xdefaults file.

Bob


signature.asc
Description: Digital signature