Thursday, July 26, 2012

Resolving Font Preferences Between Openbox and Gnome

While working on setting a new workstation with Linux Mint 13 Maya and Openbox, I had quite a difficult time getting any adjustments to the fonts to take hold while working in Openbox.

The two approaches I took was adjusting the fonts through Gnome Tweak Tool and ObConf. Changes with the tweak tool took effect when logged in to Gnome, but not when in Openbox, which I found surprising in part because Gtk was still being used to render the windows. Adjustments in ObConf only affect items like the font rendering in the window title bar.

The difference however is when in Openbox, gnome-settings-daemon was not running. A good hint is found in the system wide autostart script at /etc/xdg/openbox/autostart:

    # If you want to use GNOME config tools...
    #if test -x /usr/lib/openbox/gnome-settings-daemon >/dev/null; then
    #  /usr/lib/openbox/gnome-settings-daemon &
    #elif which gnome-settings-daemon >/dev/null; then
    #  gnome-settings-daemon &

Running /usr/bin/gnome-settings-daemon from a terminal did the trick and the changes made to the fonts did take hold.

To make the changes permanent, you could uncomment the above section in the system-wide autostart script, but I chose for no particular reason to adjust the user-level script, ~/.config/openbox/autostart by simply adding:

    gnome-settings-daemon &

Either way should work if anyone is running into the same issue.

No comments:

Post a Comment