Find the answer to your Linux question:
Results 1 to 7 of 7
I'm using Ubuntu 9.10, so in order to set the fonts and themes I use the gnome-appearance-settings dialog. Then I found this tiling window manager named xmonad. At the gdm ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4

    Fundamentally, which files are in control of the appearance of X?


    I'm using Ubuntu 9.10, so in order to set the fonts and themes I use the gnome-appearance-settings dialog. Then I found this tiling window manager named xmonad. At the gdm login screen, I chose xmonad instead of gnome. What I found is that in xmonad the settings I did for the fonts and theme in gnome are not respected. As far as I know, linux settings are just files. I guess appearance settings such as fonts, windows background and foreground color, shape of button are controlled by X, not by the window manager or gnome. So what files are in control of those settings?

  2. #2
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    Moreover, if I login to console, without starting X, then what files control the fonts in the console?

  3. #3
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by xiaweitang View Post
    I guess appearance settings such as fonts, windows background and foreground color, shape of button are controlled by X, not by the window manager or gnome. So what files are in control of those settings?
    What controls this depends on the toolkit the application uses. If you start a GNOME application and a KDE (qt) application, you will find that there not share the same settings. One of the more annoying sides of GNU/Linux, but what can you do...

    X itself hasn't much to do with this. It merely offers a set of fonts to choose from (look in xorg.conf). But it doesn't mandate which fonts to use. A very basic toolkit that is used by the default X applications is the XT widget toolkit (man X).

    It is therefore the application that decides which config files to obey for its looks.
    So for XMonad, you will find infos here:
    XMonad.Doc.Configuring
    Debian GNU/Linux -- You know you want it.

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by xiaweitang View Post
    Moreover, if I login to console, without starting X, then what files control the fonts in the console?
    This would depend on the distribution you use.
    On Debian, there is the setupcon command and the /etc/init.d/console-setup file.
    Debian GNU/Linux -- You know you want it.

  5. #5
    Just Joined!
    Join Date
    Dec 2009
    Posts
    4
    [QUOTE=GNU-Fan;746474]What controls this depends on the toolkit the application uses. If you start a GNOME application and a KDE (qt) application, you will find that there not share the same settings. One of the more annoying sides of GNU/Linux, but what can you do...

    X itself hasn't much to do with this. It merely offers a set of fonts to choose from (look in xorg.conf). But it doesn't mandate which fonts to use. A very basic toolkit that is used by the default X applications is the XT widget toolkit (man X).

    It is therefore the application that decides which config files to obey for its looks.
    So for XMonad, you will find infos here:


    This is very educating, and I have some more questions on it.
    1. How do I know which toolkit a certain application uses, e.g., firefox?
    2. The appliaction itself decides which config files to obey, so which files, is it something like /etc/fonts/fonts.conf.
    3. More specifically, if I build a system with X only (maybe with Xmonad, but without any desktop environment), which files do I need to edit so that the fonts in application menus and buttons is Serif instead of Sans?

  6. #6
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Quote Originally Posted by xiaweitang View Post
    1. How do I know which toolkit a certain application uses, e.g., firefox?
    If you can't tell by the looks, visit the homepage of the project. It often says what is used. If still unsure after that, the ldd program tells the dependencies of a given program.

    Code:
    >1:~/$ whereis firefox
    firefox /usr/bin/firefox
    >2:~/$ ldd /usr/bin/firefox
    [...]
    	libgtk-x11-2.0.so.0 => /usr/lib/libgtk-x11-2.0.so.0 (0xb72dd000)
    	libgdk-x11-2.0.so.0 => /usr/lib/libgdk-x11-2.0.so.0 (0xb7248000)
    [...]
    So my Firefox is linked against the GDK/GTK toolkit.

    Quote Originally Posted by xiaweitang View Post
    2. The appliaction itself decides which config files to obey, so which files, is it something like /etc/fonts/fonts.conf.
    This depends completely on the application or the toolkit.
    If it is a GNOME application, it will be most likely read some config file in ~/.gnome or ~/.gnome2 for which fonts it shall use. And these config files are changed by the
    gnome-appearance-settings program.

    The homepage of Xmonad talks about a file called
    ~/.xmonad/xmonad.hs


    Quote Originally Posted by xiaweitang View Post
    3. More specifically, if I build a system with X only (maybe with Xmonad, but without any desktop environment), which files do I need to edit so that the fonts in application menus and buttons is Serif instead of Sans?

    Now that is the invidious part of the whole thing. The "outer shell" of an application window, namely its borders, are controlled by the window manager (Xmonad). What is inside the border (and how it's displayed) is controlled by the application.

    Take a look at this picture.
    http://gnome-look.org/CONTENT/content-pre3/116529-3.png

    You see that the border is different each time. But the content (including the menu) is the same all the time. They are independent of each other.

    Maybe you are lucky and the applications still use the Xt intrinsics widget toolkit.
    In which case you can maybe change a common "resource" file where you select the font. But I don't know which one that would be.

    This is by the way the number one reason why I use GNOME and only GNOME applications if I can help it. I have only one control center where I control the looks of all applications I use.
    Last edited by GNU-Fan; 12-25-2009 at 09:25 AM.
    Debian GNU/Linux -- You know you want it.

  7. #7
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    If starting GNOME, there is also a process running all the time called gnome-settings-daemon. If your GNOME applications don't use the correct fonts when using XMonad, then maybe this daemon isn't running.

    So it is possibly not a question of the config files but instead you have to make sure gnome-settings-daemon is running, so that it can deliver the settings to the applications.
    Debian GNU/Linux -- You know you want it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •