How can I remove the gray boxes around custom folder icons? [closed]

When I set custom folder icons in Ubuntu 13.04, gray boxes appear around them:

Home in Ubuntu 13.04

How can I make the icons just look normal?


Solution 1:

It's not a bug. In Nautilus 3.6.3 (the version in Ubuntu 13.04) every custom icon gets a frame "to make it consistent with the appearance of thumbnails."

That's what I read in the changelog on Launchpad (search for 2012-08-31, and you wil read it too.)

The 64x64 bits PNG-image that draws that frame, is included in the source code package. It's the thumbnail_frame.png in the /icons directory

SOLUTION(1): in the source-code, replace that thumnail_frame.png with another picture, and recompile the program.

SOLUTION(2): Hack the nautilus-ui-utilies.c file, starting at codeline 192

void
nautilus_ui_frame_image (GdkPixbuf **pixbuf)
{
GdkPixbuf *pixbuf_with_frame, *frame;
int left_offset, top_offset, right_offset, bottom_offset;

/*  frame = nautilus_get_thumbnail_frame (); */
    frame = NULL;
if (frame == NULL) {
    return;
}

left_offset = NAUTILUS_THUMBNAIL_FRAME_LEFT;
top_offset = NAUTILUS_THUMBNAIL_FRAME_TOP;
right_offset = NAUTILUS_THUMBNAIL_FRAME_RIGHT;
bottom_offset = NAUTILUS_THUMBNAIL_FRAME_BOTTOM;

pixbuf_with_frame = eel_embed_image_in_frame
    (*pixbuf, frame,
     left_offset, top_offset, right_offset, bottom_offset);
g_object_unref (*pixbuf);

*pixbuf = pixbuf_with_frame;
}

So with this hack the nautilus_ui_frame_image function returns without putting a frame :-)

Solution 2:

If you are like me that rarely have lucky compiling things by yourself, you may want something already compiled.

Nemo is a fork of Nautilus 3.4

You can install it with the Cinnamon ppa:

sudo add-apt-repository ppa:gwendal-lebihan-dev/cinnamon-stable; sudo apt-get update; sudo apt-get install nemo nemo-fileroller  

It looks like this:

enter image description here

Regards ;-)

Solution 3:

While this is not a solution to this particular problem (I wasn't able to find one myself), you can work around it by not using folders with custom icons, but rather desktop files that are links to alternate locations (e.g. a hidden folder in your home directory). Their icon will be shown without a border.

Example: link.desktop

[Desktop Entry]
Type=Link
Name=MyFolder
URL=file:///home/<username>/.hidden_folder/
Icon=/path/to/icon.svg