Fonts from GDM?

An odd situation: When I start Fluxbox (or any other WM) from GDM, I get
to use the font and cursor set by GDM.

If I start fluxbox with 'startx' I am given another font and cursor.

If I knew which font and cursor GDM was using, I would like to have
fluxbox use them, but I don't. And I can't find where GDM's setting is
that tells it which to use. /etc/gdm/gdm.conf doesn't mention much on
fonts or cursors. I've explored /etc/X11 and found nothing. Can anyone
point me in the right direction?
--
Matthew K Poer

--

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Fonts from GDM?

On Wed, Feb 28, 2007 at 10:12:10PM -0500, Matthew K Poer wrote:
> An odd situation: When I start Fluxbox (or any other WM) from GDM, I get
> to use the font and cursor set by GDM.
>
> If I start fluxbox with 'startx' I am given another font and cursor.
>
> If I knew which font and cursor GDM was using, I would like to have
> fluxbox use them, but I don't. And I can't find where GDM's setting is
> that tells it which to use. /etc/gdm/gdm.conf doesn't mention much on
> fonts or cursors. I've explored /etc/X11 and found nothing. Can anyone
> point me in the right direction?

I spent some considerable time googling this with no great results
*except* that there is an alternative call x-cursor-theme. Its not
there in my setup, but if you install one of the cursor theme packages
like artwiz-cursor or big-cursor, etc I assume that alternative would
get created at that point. In my searching I did read once that gdm
actually uses the default X cursors (hence your inability to find how
gdm selects it...) and so maybe fluxbox has its own set of cursors
that it is using somehow.

I will tell you this -- the actual cursor selection mechanism appears
to be a deep mystery.

A

Fonts from GDM?

On Wed, 28 Feb 2007 22:12:10 -0500
Matthew K Poer wrote:

> An odd situation: When I start Fluxbox (or any other WM) from GDM, I
> get to use the font and cursor set by GDM.
>
> If I start fluxbox with 'startx' I am given another font and cursor.
>
> If I knew which font and cursor GDM was using, I would like to have
> fluxbox use them, but I don't. And I can't find where GDM's setting is
> that tells it which to use. /etc/gdm/gdm.conf doesn't mention much on
> fonts or cursors. I've explored /etc/X11 and found nothing. Can anyone
> point me in the right direction?

First of all, do any of the files .xinitrc, .xserverrc, .Xsession,
and .Xresources exist in your home directory? These customise your X
session, but are not used consistently in the two scenarios you
describe. If they exist, please show us the contents.

GDM probably uses the Industrial icon theme. You can make this the
default for all X sessions by executing (as root):

update-alternatives --config x-cursor-theme

As for the fonts, could it be that the fonts are the same but the
resolution is very different in the two cases? Or are the fonts
completely different? The output of the following commands in the two
environments might be helpful:

xdpyinfo | grep resol
xrdb -q | grep dpi

--

Liam

--

Fonts from GDM?

On Thu, 2007-03-01 at 10:15 +0000, Liam O'Toole wrote:
> On Wed, 28 Feb 2007 22:12:10 -0500
> Matthew K Poer wrote:
>
> > An odd situation: When I start Fluxbox (or any other WM) from GDM, I
> > get to use the font and cursor set by GDM.
> >
> > If I start fluxbox with 'startx' I am given another font and cursor.
> >
> > If I knew which font and cursor GDM was using, I would like to have
> > fluxbox use them, but I don't. And I can't find where GDM's setting is
> > that tells it which to use. /etc/gdm/gdm.conf doesn't mention much on
> > fonts or cursors. I've explored /etc/X11 and found nothing. Can anyone
> > point me in the right direction?
>
> First of all, do any of the files .xinitrc, .xserverrc, .Xsession,
> and .Xresources exist in your home directory? These customise your X
> session, but are not used consistently in the two scenarios you
> describe. If they exist, please show us the contents.
>
> GDM probably uses the Industrial icon theme. You can make this the
> default for all X sessions by executing (as root):
>
> --config x-cursor-theme
>
> As for the fonts, could it be that the fonts are the same but the
> resolution is very different in the two cases? Or are the fonts
> completely different? The output of the following commands in the two
> environments might be helpful:
>
> xdpyinfo | grep resol
> xrdb -q | grep dpi
>
> --
>
> Liam

# xdpyinfo | grep resol
resolution: 75x75 dots per inch

# xrdb -q | grep dpi
{no results}

# cat .xsession
startfluxbox

# cat .xinitrc
startfluxbox

# cat .xserverrc
cat: .xserverrc: No such file or directory

# cat .Xresources
cat: .Xresources: No such file or directory

I saw the that Industrial is set as the default cursor theme in
update-alternatives. I'm actually not so much concerned with the cursor
as the font. Here's some more info on it:
Fonts in Fluxbox are set by my theme. It covers title bars and menus.
I've attached it for reference, in case I overlooked something.
It seems that when I use GDM, other fonts are defined for my GDM
session(?). Fonts for Evolution and Epiphany, etc are smaller and (i
think) more smooth-looking in GDM session.

I've attached screenshots of GDM and non-GDM fluxbox sessions. Perhaps
they can help? Clearly the fonts used within the programs are different
sizes, though closely comparing, they me be the same font.

Attached files didn't send. They are here:
http://matthewpoer.freehostia.com/deb/fontsGDMattach/

--
Matthew K Poer

--

Fonts from GDM?

On Thu, 01 Mar 2007 21:00:27 -0500
Matthew K Poer wrote:

[...]

> # xdpyinfo | grep resol
> resolution: 75x75 dots per inch
>
> # xrdb -q | grep dpi
> {no results}
>

Was this in the GDM or startx session? I'm guessing it was in the GDM
session, because there the fonts are smaller.

> # cat .xsession
> startfluxbox
>
> # cat .xinitrc
> startfluxbox
>
> # cat .xserverrc
> cat: .xserverrc: No such file or directory
>
> # cat .Xresources
> cat: .Xresources: No such file or directory

OK, try this. Create a file called .Xresources, containing the
following line:

Xft.dpi: 75

To the start of your .xsession file, add this line:

xrdb -merge .Xresources

Finally, create a .xserverrc file with the following contents:

#!/bin/sh
exec $(which X) -br -dpi 75

Then make the .xserverrc file executable:

chmod a+x .xserverrc

Now, when you execute startx, it should give the same results as when
you log in using GDM. Of course, feel free to experiment with the DPI
value. Ideally it should match the physical DPI of your monitor.

BTW, I think that the .xinitrc file is redundant when you have
a .xsession file in Debian.

>
> I saw the that Industrial is set as the default cursor theme in
> update-alternatives.

My mistake :-(

> I'm actually not so much concerned with the
> cursor as the font. Here's some more info on it:
> Fonts in Fluxbox are set by my theme. It covers title bars and menus.
> I've attached it for reference, in case I overlooked something.
> It seems that when I use GDM, other fonts are defined for my GDM
> session(?). Fonts for Evolution and Epiphany, etc are smaller and (i
> think) more smooth-looking in GDM session.
>
> I've attached screenshots of GDM and non-GDM fluxbox sessions. Perhaps
> they can help? Clearly the fonts used within the programs are
> different sizes, though closely comparing, they me be the same font.

Yes, I they look like the same font, but at different sizes.

>
> Attached files didn't send. They are here:
> http://matthewpoer.freehostia.com/deb/fontsGDMattach/
>
>
>

--

Liam

--

Fonts from GDM?

On Fri, 2 Mar 2007 09:57:30 +0000
Liam O'Toole wrote:

> #!/bin/sh
> exec $(which X) -br -dpi 75

An update to my own message ... you should probably add the arguments
'-nolisten tcp' to the above.

--

Liam

--

Fonts from GDM?

On Fri, 2007-03-02 at 09:57 +0000, Liam O'Toole wrote:
> > # xdpyinfo | grep resol
> > resolution: 75x75 dots per inch

> Was this in the GDM or startx session? I'm guessing it was in the GDM
> session, because there the fonts are smaller.

Usually GDM sets the DPI to 96 by default.

--
Cheers,
Sven Arvidsson
http://www.whiz.se
PGP Key ID 760BDD22

Fonts from GDM?

On Fri, 02 Mar 2007 12:40:53 +0100
Sven Arvidsson wrote:

> On Fri, 2007-03-02 at 09:57 +0000, Liam O'Toole wrote:
> > > # xdpyinfo | grep resol
> > > resolution: 75x75 dots per inch
>
> > Was this in the GDM or startx session? I'm guessing it was in the
> > GDM session, because there the fonts are smaller.
>
> Usually GDM sets the DPI to 96 by default.
>

Indeed, but you would expect to see that value reflected in xrdb too. Or
maybe gnome-session (which the OP is not running) is responsible for
that. Not sure.

--

Liam

--

Fonts from GDM?

On Fri, 2007-03-02 at 09:57 +0000, Liam O'Toole wrote:
> OK, try this. Create a file called .Xresources, containing the
> following line:
>
> Xft.dpi: 75
>
> To the start of your .xsession file, add this line:
>
> xrdb -merge .Xresources
>
> Finally, create a .xserverrc file with the following contents:
>
> #!/bin/sh
> exec $(which X) -br -dpi 75
>
> Then make the .xserverrc file executable:
>
> chmod a+x .xserverrc
>
> Now, when you execute startx, it should give the same results as when
> you log in using GDM. Of course, feel free to experiment with the DPI
> value. Ideally it should match the physical DPI of your monitor.
>
> BTW, I think that the .xinitrc file is redundant when you have
> a .xsession file in Debian.
> --
> Liam
>
>

Oh my goodness, Liam, that worked perfectly :D (I got the -nolisten tcp
part to).
I don't know what the DPI of my monitor is, or how to tell. But the font
is smooth, not blurry, and comfortable on my eyes.

I suppose everyone should ignore my late-last-night post about
involving /etc/gtk

Thanks so much Liam and Andrew.
--
Matthew K Poer

--

Fonts from GDM?

On Fri, 02 Mar 2007 10:15:42 -0500
Matthew K Poer wrote:

> I don't know what the DPI of my monitor is, or how to tell.

Try here:

http://www.raydreams.com/prog/dpi.aspx

--

Fonts from GDM?

Dig this: /etc/gtk/
It seems to be a listing of what fonts to use in GTK apps, based on
locale. Trouble is, there is one for UTF-8, and a few gtkrc.iso-*
somethin-or-others. I guess one of these is what I'm using?

I think this is what GDM draws on, based on
1. I can't find anything else
2. GDM source file /gui/misc.c refers to a GTK theme and a gtkrc file.

So, if someone can verify that this is logical, my new questions are
1. How can I tell which locale I am using?
2. How to I tell applications to use the correct font?

--
Matthew K Poer

--

Syndicate content