XFCE Howto: Create transparant desktop icon texts with shadow and decrease icon spacing.

Like the title says I got a good tip on how to create transparant icon texts with shadow on the desktop.
I describe how it worked for me and this change is on a per user basis, no sudo or root privilege needed to get it working.

  1. edit the file “.gtkrc-2.0” (without the “” and including the . ) in the regular/normal user home folder (~/<user>/.gtkrc-2.0).
    The <user> is your own user name of course :slight_smile:
    It is a hidden file because of the point character as first character in the filename.
    In a terminal you can do " ls -a " to view all files including hidden files.
    Enter CTRL+H to enable hidden files in various file managers or else change the view to show hidden files in the menu of a filemanager.

1b. If the file does not exist, do create it and open/edit it as a normal user (no sudo and no root) and put the following in:

style "xfdesktop-icon-view" {
    XfdesktopIconView::label-alpha = 0
    XfdesktopIconView::selected-label-alpha = 170
    XfdesktopIconVIew::ellipsize-icon-labels = 1

    XfdesktopIconView::shadow-x-offset = 2
    XfdesktopIconView::shadow-y-offset = 2
    XfdesktopIconView::shadow-color = "#000000"
    XfdesktopIconView::selected-shadow-x-offset = 2
    XfdesktopIconView::selected-shadow-y-offset = 2
    XfdesktopIconView::selected-shadow-color = "#000000"

    XfdesktopIconVIew::cell-spacing = 1.5
    XfdesktopIconView::cell-padding = 1.5
    XfdesktopIconView::cell-text-width-proportion = 1.5

    base[NORMAL] = "#cccccc"
    base[SELECTED] = "#cccccc"
    base[ACTIVE] = "#cccccc"

    fg[NORMAL] = "#ffffff"
    fg[SELECTED] = "#000000"
    fg[ACTIVE] = "#000000"
}
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"
  1. Save the file as normal user (no sudo or root) and reboot to make sure that it is enabled.
    This is only enabled for the current user.

  2. You can experiment with all settings to adjust it to your liking.
    3b. Also the “cell-spacing” and “cell-padding” can be freely edited, but becareful that you keep the value of all settings a bit low, between 1.5 and 3 is highly recommended.

  3. The changes are not instant, you need to log-out or reboot to enable the changes.

My own “.gtkrc-2.0” file contains only what I’ve mentioned in the code section.
And it works for me. I hope someone finds it useful when running XFCE as desktop environment.

My own desktop icons are 64x64 so I edited the cell-spacing and cell-padding to 1.5 and gives a good view. The icons are not too far apart of eachother when icons are present on the desktop itself.

Possible addition: as it is an end-user only setting, IMHO no reboot is needed. A logout/login should be sufficient.

(And BTW “sudo or root privilege”, sudo is only one way of getting root privileges, it is not an alternative. Thus it should read something like: “sudo or other means to get root privilege”.)