Page 1 of 8 123 ... LastLast
Results 1 to 10 of 77

Thread: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

  1. #1
    Join Date
    Mar 2005
    Beans
    6,040

    Thumbs up HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    In most desktop environments, colors, fonts and other visual properties of icons are individually modifiable. This is not the case with GNOME; icon text colors in GNOME are theme-dependent, which means the colors and decorations of the icon text are decided by the active GTK theme. No simple GUI tool is provided to override the active theme elements either, and the info you'll find in most places on the web on modifying (especially desktop) icon text is outdated and won't work for GNOME 2.12.x. At this point the .gtkrc-2.0 file and a few style tags to be specified in it come to rescue; whatever GTK theme properties you specify in this file will override your active theme properties.

    The two most common complaints by users about GNOME desktop icon text are that it "remains white all the time" and that it has shadows which decrease readibility especially with small fonts. The dreaded white blends into light backgrounds and decreases legibility. 95% of all GTK themes out there do not modify the icon text color, so it seems to be fixed in white, whereas it can be easily tweaked. And with the method outlined below, you'll get rid of those ugly shadows forever. This may be a matter of personal preference, but I find the plain, unshaded icon text much more legible.

    Here are the obligatory before / after screenshots:

    Before


    After


    Ok, here are the steps:

    1) Create a .gtkrc-2.0 file in your home folder if it does not exist.

    2) Add the following lines to the file, substituting the variables appropriately:

    Code:
    style "desktop-icon"
    {
     NautilusIconContainer::frame_text = X
     text[NORMAL] = "#YYYYYY"
     NautilusIconContainer::normal_alpha = Z 
    }
    class "GtkWidget" style "desktop-icon"
    X = Binary value; has to be set to 1 for this tweak to take effect. Setting it to 0 will bring back the shadows and reset the font color.

    YYYYYY = HTML color value. Insert the value of the color you want for the icon text here.

    Z = Background color transparency value. 0 is fully transparent (recommended), 255 is fully opaque (white; I have not yet figured out a way to set the framed bg color value)

    To learn the HTML code of the color you'd like to have, launch GIMP, hit the foreground color box and choose the color you'll like; its code will appear in the "HTML Notation" box.

    Here's the code I used for the screenshot above:

    Code:
    style "desktop-icon"
    {
     NautilusIconContainer::normal_alpha = 0
     text[NORMAL] = "#000000"
     NautilusIconContainer::frame_text = 1
    }
    class "GtkWidget" style "desktop-icon"
    3) Save the file and restart Nautilus with
    Code:
    killall nautilus
    .
    Last edited by 23meg; December 5th, 2007 at 01:03 PM.
    Previously known as 23meg

  2. #2
    Join Date
    Jul 2005
    Location
    Brasil
    Beans
    52
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Change Nautilus Icon Colors (Including Desktop Icons)

    very nice, i've hated to use light wallpapers because of that but now i've got rid of this problem
    thanks a lot ;D
    Come on, search is easier than posting!
    UbuntuForums Search | Ubuntu Wiki | UbuntuGuide | GoogleLinux

  3. #3
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: Change Nautilus Icon Colors (Including Desktop Icons)

    You're welcome; while the preset I gave above is very practical for light backgrounds, users who prefer dark backgrounds can also find use in this, since it lets you choose any color as your icon text, and I have yet to see a dark theme that sets icon font color to anything other than white. While experimenting I found bright green text on dark gray and black backgrounds to be quite pleasing.
    Last edited by 23meg; November 13th, 2005 at 05:44 AM.
    Previously known as 23meg

  4. #4
    Join Date
    Oct 2005
    Location
    Dallas
    Beans
    620
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    I tried this with a new .gtkrc-2.0 file and an existing .gtkrc-1.2-gnome2 file...neither worked. I don't know what info you need to tell me why...but I'm running Breezy and it's all up to date

  5. #5
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    It's working fine for me in Breezy, and others have tested it successfully as well. What GTK theme are you using? Did you try it with different themes?
    Previously known as 23meg

  6. #6
    Join Date
    Oct 2005
    Location
    Dallas
    Beans
    620
    Distro
    Ubuntu 7.04 Feisty Fawn

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    I'm using MilkMint GTK with Creme for my Metacity...and no, I haven't tried it with different themes...I'll play around with it some more, though. If it just can't be done with MilkMint, that's fine, I can live with it. Just thought this was a neat trick, and I'm always playing around way too much

    Thanks!

  7. #7
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    I've tried with MilkMint and some other non-Clearlooks themes and it's still working without problems here. Please check that you've done everything right, and that you don't have another file linked as an "include" from your .gtkrc-2.0 file.
    Last edited by 23meg; November 14th, 2005 at 04:42 AM.
    Previously known as 23meg

  8. #8
    Join Date
    Jun 2005
    Location
    Pacific NorthWest
    Beans
    2,782
    Distro
    Ubuntu Development Release

    Wink Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    Hi 23meg--
    Looked at you post with interest--hated just having white--Thanks for showing the option--I played with the icon alpha & got this ----
    Last edited by autocrosser; December 4th, 2006 at 04:31 AM.
    "Let's nobody be dead today----Looks very bad on my report" One of my favourite lines from AVATAR
    Linux User#395230
    Ubuntu User# 13498

  9. #9

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    Thanks for the tip. Is there a way to change the color of the font in the panels? I like to have fully transparent panels, and it's hard to read black on some wallpapers.

  10. #10
    Join Date
    Mar 2005
    Beans
    6,040

    Re: HOWTO: Change Nautilus Icon Text Colors (Including Desktop Icons)

    autocrosser: Cool, I hadn't really considered semi-transparent text frames; seems they can work well with dark backgrounds.

    souled: I'll investigate that; it most probably has its own style property in the gtkrc file.
    Previously known as 23meg

Page 1 of 8 123 ... LastLast

Bookmarks

Posting Permissions

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