DebianThis forum is for the discussion of Debian Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
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.
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.
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.
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.
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?
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.
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.
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.
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.
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
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.
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.
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.
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.