12

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?

ændrük
  • 76,794
  • How did you set the custom icons? Did you make sure the icon files were formatted in either png or svg and set to a transparent background? – Glutanimate Apr 08 '13 at 23:34
  • I used the method linked to above, and images I chose are SVGs in /usr/share/icons/Humanity. – ændrük Apr 09 '13 at 00:41
  • 1
    I'm also annoyed by this... did you find a solution? – oblitum Apr 27 '13 at 14:49
  • 3
    Despite being marked as fixed - this looks like its still a bug - or at least the version of nautilus in raring does NOT have the patch installed. - https://bugzilla.gnome.org/show_bug.cgi?id=688808 – fossfreedom Apr 27 '13 at 23:06
  • I downgraded Nautilus to the latest version that came with Ubuntu 12.10. No gray boxes anymore. –  Apr 28 '13 at 20:39
  • Good find, @fossfreedom, this is a bug after all. An upstream fix was committed just after the 3.6.3 release so I assume we'll see it in time. – ændrük Apr 30 '13 at 16:47
  • 1
    As per Meta policy (http://meta.askubuntu.com/questions/4216/how-should-we-deal-with-bounty-questions-that-are-confirmed-bugs) - since this is a confirmed bug report that may or may not be fixed in the near future, this question has been closed. – fossfreedom Apr 30 '13 at 20:03

3 Answers3

2

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 :-)

  • Actually, its not an ambiance phenomena, but the way nautilus behaves and renders the icons. Irrespective of the theme, I am getting the border on custom icons. This is definitely NOT configurable via GTK CSS files. – Bhavin Doshi Apr 27 '13 at 20:12
  • Also, its quite visible from the attached screenshot in the question that the user is using Ambiance theme itself, and not some other theme. – Bhavin Doshi Apr 27 '13 at 20:13
  • The road to hell is paved with misjudgements, never with naked facts. So: it looks like Ambiance, but is it really Ambiance? –  Apr 28 '13 at 20:37
  • Can you add instructions for editing and recompiling the source? – Seth Apr 29 '13 at 04:37
  • 1
    Clear instructions about recompiling and rebuilding a package on this site: http://ariejan.net/2008/05/04/how-to-compile-packages-on-debianubuntu-by-hand/ –  Apr 29 '13 at 06:22
  • 1
    changelog link is broken – fossfreedom Apr 29 '13 at 09:38
  • Won't both of your proposed solutions interfere with actual image thumbnails, too? I don't want to remove the frames from thumbnails, just from icons—like how things were in Ubuntu 12.10. – ændrük Apr 30 '13 at 17:19
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 ;-)

desgua
  • 32,917
1

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