• Posted on November 15, 2013

XFCE Desktop Icon Text

If you are using XFCE, you probably have the issue of the desktop icons text or labels being hard to read. This can easily be fixed by modifying the xfce gtkrc files. I only tested this on Linux Mint 15 XFCE, but it should work in all xfce environments.

Our New File

We have to create a new style file for XFCE. This is easily done by creating a normal text file (use Gedit, vim, or any editor). This file then has to be included into the current theme, which is easy.

style "xfdesktop-icon-view" {
	XfdesktopIconView::label-alpha = 0

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

	fg[NORMAL] = "#ffffff"
	fg[SELECTED] = "#ffffff"
	fg[ACTIVE] = "#ffffff"
widget_class "*XfdesktopIconView*" style "xfdesktop-icon-view"

Copy the code above into our new file and save it to your users directory /home/username/.gtkrc-xfcegtn. After saving it, open up the file /home/username/.gtkrc-2.0. In the 2.0 file, we have to add a rule to use our new file. Add the following code to the bottom of the .gtkrc-2.0 file.

include ".gtkrc-xfcegtn"

Now you can logout and back in to see your desktop icon label changes or you can restart the xfce desktop. The above style is white text with a black text shadow. This will be visible on all background colors and is the same style they use in Windows to make the text always available.

To restart XFCE, run the following two commands in terminal. After the second command, it will appear as the terminal is still active (since it is), but you will be able to close out of it or cancel the operation and still have xfdesktop running.

$ xfdesktop --quit
$ xfdesktop