LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 02-10-2006, 04:45 PM   #1
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Rep: Reputation: 31
debian fonts setup


New to Debian.

I'm following instructions in DokuWiki:
http://wiki.splitbrain.org/debianfonts

It's telling me to put these as the first 2 lines in the Files section of XF86Config-4:
Code:
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
        FontPath        "/var/lib/defoma/x-ttcidfont-conf.d/dirs/CID"
but my defoma directory doesn't look like that.

In /var/lib/defoma I see:
fontconfig.d
--B
----(various Bitstream-Vera....ttf files)
----fonts.cache-1
--fonts.cache-1
--fonts.comf
--id-cache
pango.d
--pangox.aliases
scripts
--fontconfig.defoma
--pango.defoma
status-cache
fontconfig.subst-cache
truetype.font-cache

So what should be the corresponding entries in XF86Config-4?

The Wiki also talks about editing /etc/fonts/local.conf. I have fontconfig (latest version according to apt-get) installed, but I have no /etc/fonts/local.conf file. And there is no manual entry for fontconfig.

So is this Wiki obsolete or have I failed to install something? (I installed x-window-system and fluxbox, but no KDE or Gnome). Is there better documentation somewhere for setting up fluxbox, fonts, etc.?

Last edited by r.stiltskin; 02-10-2006 at 04:55 PM.
 
Old 02-10-2006, 06:10 PM   #2
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
OK, here's an alternative font fonfiguration scheme:

$ su
[type the root user's password]
# aptitude install msttcorefonts x-ttcidfont-conf
# dpkg-reconfigure libpango1.0-common
# dpkg-reconfigure fontconfig
# fc-cache -fv

I hope this will work better for you than the other instructions.

Quote:
Is there better documentation somewhere for setting up fluxbox, fonts, etc.?
So, what exactly do you want to know about fluxbox? In Debian you can run "man fluxbox". This should give you lots of useful info.
 
Old 02-10-2006, 06:20 PM   #3
kloss
Member
 
Registered: Nov 2004
Location: France & Germany
Distribution: (Pure) Debian Etch & Sid
Posts: 116

Rep: Reputation: 15
Welcome!

From my experience:
- X is already well configured (caution I'm using X.org, not Xfree86)
- Now X can deal with fonts without additional font-server
- defoma automatically configures any font packages installed through apt

So there is nothing to do but installing the font packages you need. Further configuration/installation is needed only if you need to asiatic symbols (as far as I'm concerned I don't care). That's basically what the tutorial says.

Note that I'm only telling what happen with my box, I'm not 100% sure that it's so easy for everybody.

Since you leave in the US you don't really need the transcoded fonts.

My 2 cents:
1) Make a ~/.gtkrc-2.0 to get nice-looking fonts in gtk apps.
2) The tut tells about fc-list, have also a look at xlsfonts.
3) People with european charset should also install the xfonts-terminus, a pretty cool monospaced font package for xterms.

++

Last edited by kloss; 02-10-2006 at 06:22 PM.
 
Old 02-10-2006, 07:19 PM   #4
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
You may also want to edit /etc/X11/xorg.conf (or /etc/X11/XF86Config-4 in case you use the XFree86 X server). Notice that the Xserver will load the fonts in the order in which they are listed in the config file, and that TrueType fonts usually look better than Type1 fonts. So, generally, truetype fonts should be loaded before type1 fonts. Here's the "Files" section from my Xserver config file:

Section "Files"
# FontPath "unix/:7100" # local font server
# if the local font server has problems, we can fall back on these
FontPath "/var/lib/defoma/x-ttcidfont-conf.d/dirs/TrueType"
FontPath "/usr/lib/X11/fonts/misc"
FontPath "/usr/lib/X11/fonts/100dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/75dpi/:unscaled"
FontPath "/usr/lib/X11/fonts/Type1"
# FontPath "/usr/lib/X11/fonts/CID"
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"

Notice that the truetype font path comes before the other fontpaths, and I've also commented out the "local font server" line because I haven't installed such server.
 
Old 02-11-2006, 04:12 PM   #5
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Aha. Thx for the advice. This,
# aptitude install msttcorefonts x-ttcidfont-conf
was particularly helpful since I hadn't seen anything previously telling me that x-ttcidfont-conf was a package I should install.

I'm curious as to why you left these lines
Code:
FontPath "/usr/lib/X11/fonts/100dpi"
FontPath "/usr/lib/X11/fonts/75dpi"
in your XF86Config-4. Doesn't that defeat the purpose of the two ":unscaled" lines?

It's hard to see the tiny font that comes up in shell windows in fluxbox and xdm. I've skimmed through man fluxbox (and also man xdm) but couldn't find info on how to configure them to use bigger fonts. So far, the only way that I can accomplish this is to eliminate the higher resolutions from the screen section of XF86Config-4, leaving only 800x600. That's a terrible solution: the shell windows are now fine, but everything else is ugly & too big.

Also, I'm trying to understand what determines how startx decides which window manager to use (twm, fluxbox, etc, assuming more than one has been installed). For example, when fluxbox is not installed, startx starts up twm. Install fluxbox and then startx starts up fluxbox even though twm is still installed. How do you designate which one to use -- systemwide and per-user?

I've been flipping back and forth among the manpages for startx, xdm, twm, fluxbox, etc, etc, looking at xinitrc, xserverrc, Xsession, & various other files that seem like they should tell me something but I'm getting nowhere. The manpages have lots of information that I'm not looking for, but they don't seem to have any of what I am looking for. Can you point me to the right docs?

And exactly what do xdm, gdm, kdm do? Right now I don't have any of those installed, so apparently twm and fluxbox don't need them. Are they needed only if you want to run KDE or Gnome?
 
Old 02-11-2006, 11:02 PM   #6
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
Doesn't that defeat the purpose of the two ":unscaled" lines?
I don't think so -- although I might be wrong. IIRC, applications choose the first matching font in the fontpath list. So it makes a difference if the ":unscaled" line is before or after the similar line without this definition. Also, you get slightly different results in some apps if you switch the 100dpi and 75dpi lines.

Quote:
It's hard to see the tiny font that comes up in shell windows in fluxbox and xdm.
You could try this command in terminal window:

echo "Xft.dpi: 96" > ~/.Xresources

You can also use the ~/.Xresources file to set some specific font for your terminal windows. You can list the available fonts with "xlsfonts | more".

Quote:
Also, I'm trying to understand what determines how startx decides which window manager to use (twm, fluxbox, etc, assuming more than one has been installed).
The "startx" command checks for .xinitrc and .xsession files in user's home directory. If you want "startx" to start fluxbox, type this command in terminal window:

echo "exec fluxbox" > ~/.xinitrc

Also, Debian has it's own "alternatives" system that decides the default window manager in case there's no ~/.xinitrc or ~/.xsession. You can edit the default alternative for window manager by typing "su" to become the root user and then typing "update-alternatives --config x-window-manager". (See "man update-alternatives".)

Quote:
And exactly what do xdm, gdm, kdm do? Right now I don't have any of those installed, so apparently twm and fluxbox don't need them. Are they needed only if you want to run KDE or Gnome?
You don't necessarily need them if you can live without a pretty login window. "exec startkde" in ~/.xinitrc tells "startx" to start KDE; "exec gnome-session" in ~/.xinitrc tells "startx" to start GNOME. Xdm reads the ~/.xsession file instead of ~/.xinitrc while kdm and gdm have an in-built menu that you can use for choosing which window manager you want to start.
 
Old 02-12-2006, 01:09 AM   #7
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Quote:
Originally Posted by Dead Parrot
Also, Debian has it's own "alternatives" system that decides the default window manager in case there's no ~/.xinitrc or ~/.xsession.
Well, that explains one mystery. Now I see how a window manager was being chosen when I couldn't find any entries in any .xinitrc or .xsession files, or in any of the corresponding system-wide files that were described in the manpages. I never heard of the Debian Alternatives system before, so thanks for mentioning that.

As to putting the dpi entry in a ~/.Xresources file -- I tried putting dpi and various other settings, such as fg and bg, in my user ~/.Xresources file but it seems to be ignored. None of those entries seem to have any effect. No error messages either, so it doesn't seem that the settings were incorrect. It seems that X simply wasn't looking at that file. Can you think of any reason why that would be? (Of course I restarted X.)

I did, however, find my way to the xterm font menu via control+right_mouse_button combination so I can use that to get a readable terminal window. I guess I'll just have to keep experimenting to find a way to change the default behavior.

Thanks again for your help.
 
Old 02-12-2006, 06:07 AM   #8
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
As to putting the dpi entry in a ~/.Xresources file -- I tried putting dpi and various other settings, such as fg and bg, in my user ~/.Xresources file but it seems to be ignored.
You could make ~/.xinitrc and ~/.xsession to begin with this line:

xrdb -load $HOME/.Xresources

That should force "startx" to check also ~/.Xresources.

Here is a HOWTO you may find useful: http://www.debian-administration.org/articles/66
 
Old 02-12-2006, 10:00 PM   #9
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Apparently this is going to be a more lengthy project than I anticipated. I made the following files:

~/.xinitrc:
Code:
exec twm
xrdb -load ~/.Xresources
~/.xsession:
Code:
xrdb -load ~/.Xresources
~/.Xresources:
Code:
Xft.foreground: white
Xft.background: black
Xft.dpi: 96
The ONLY effect of all this is that now startx loads twm instead of fluxbox.

I also tried substituting * for . in the .Xresources entries, and replacing "Xft" with "Xterm" (as shown in the Debian Administration article you mentioned). These changes also made no difference, so it seems that .Xresources is still being ignored.

Edit: I also tried (in an xterm window) this command:
Code:
xrdb -merge ~/.Xresources
and then ran
Code:
xterm
to open a new xterm window. Still, .Xresources was ignored. On the other hand, when I ran (also in an xterm window):
Code:
xterm -fg white -bg black -cr green
that opened a new xterm window as specified, i.e. with white text on black background and a green cursor.

Last edited by r.stiltskin; 02-12-2006 at 10:20 PM.
 
Old 02-12-2006, 10:30 PM   #10
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Since you use the "startx" command to start X, it is ~/.xinitrc that matters most. Make it look like this:
Code:
xrdb -load $HOME/.Xresources
exec twm
After reading the "exec" line, "startx" executes the command (in this case the twm window manager) and doesn't read the .xinitrc file any further. So the "exec" command should always be the last line of ~/.xinitrc or ~/.xsession.

Your ~/.Xresources should look like this:
Code:
Xft.dpi: 96
XTerm*background: black
XTerm*foreground: white
XTerm*cursorColor: green
 
Old 02-14-2006, 04:48 PM   #11
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
I wasn't thinking of .xinitrc as a script that would be executed sequentially; your correction makes perfect sense.

It's not clear why one line in .Xresources takes "Xft" and a ".", while the others take "Xterm" and a "*", but I tried it your way. And I also tried it with "Xft" and "*" on all the lines, "Xft" and "." on all the lines, "Xterm" and "*" on all the lines, and "Xterm" and "." on all the lines.

Unfortunately, it doesn't make any difference.

None of these entries have any effect except for the "exec" line in .xinitrc. When I include that line, startx starts twm. When I comment it out, startx starts fluxbox.

But the foreground, background and cursorColor entries have no effect at all, so apparently .Xresources is still being ignored.
 
Old 02-14-2006, 05:54 PM   #12
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
I think that you must have either named the resource file something else than .Xresources or then you may have a typo in the .xinitrc line that's supposed to call this resource file.

But anyway, that doesn't really matter because there's another way that's bound to work: you can edit the /usr/lib/X11/app-defaults/XTerm-color config file and set the xterm colours like you want.
 
Old 02-14-2006, 06:51 PM   #13
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Nope, nope and nope. The files are correctly named and I have checked thoroughly for typos. And editing the XTerm-color file misses the point. I don't care about those colors. I'm just want to learn how to configure xwindows. I was playing with those colors only to have something simple to test.

I'll just have to read through those manuals thoroughly when I can find the time. Thanks for your suggestions. Please post if you happen to come across any other ideas.
 
Old 02-14-2006, 07:31 PM   #14
Dead Parrot
Senior Member
 
Registered: Mar 2004
Distribution: Debian GNU/kFreeBSD
Posts: 1,597

Rep: Reputation: 46
Quote:
It's not clear why one line in .Xresources takes "Xft" and a ".", while the others take "Xterm" and a "*", but I tried it your way. And I also tried it with "Xft" and "*" on all the lines, "Xft" and "." on all the lines, "Xterm" and "*" on all the lines, and "Xterm" and "." on all the lines.
OK, I think I spotted the reason why it doesn't work for you. You see, most things on GNU/Linux are case sensitive. "Xterm" is no good when xterm expects "XTerm". So try it once more time, making your .Xresources look like this:
Code:
Xft.dpi: 96
XTerm.background: black
XTerm.foreground: white
XTerm.cursorColor: green
(I checked the xterm man page and it tells to use ".", although "*" works just as fine on my system.)

EDIT:
Actually, it only seems to work for me with "*" (and not with ".").

Last edited by Dead Parrot; 02-14-2006 at 09:00 PM.
 
Old 02-14-2006, 09:24 PM   #15
r.stiltskin
Member
 
Registered: Oct 2003
Location: USA
Distribution: Xubuntu, Arch
Posts: 231

Original Poster
Rep: Reputation: 31
Damn. Thanks for spotting that. Now the color settings work, but there's no perceptible difference whether or not the dpi setting is there.


Which manual are you looking at? My man page for xterm (3428 lines!) seems to have no mention at all of .Xresources, dpi, .xinitrc, ...
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Fonts configuration in Debian J_dash Linux - Newbie 3 10-08-2005 09:36 AM
fonts in debian and gnome bujecas Debian 0 07-29-2005 11:54 AM
fonts in debian and xfs bujecas Debian 2 07-22-2005 04:58 PM
fonts in debian sarge imagreg Debian 1 10-04-2004 01:52 AM
fonts, xtreme small in debian psa Linux - Distributions 3 08-28-2004 01:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 04:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration