Skip to content

Instantly share code, notes, and snippets.

@cit
Created Oct 28, 2011
Embed
What would you like to do?
Modding the nautilus desktop - Text Beside Icons
First, open terminal and write:
apt-get source nautilus
sudo apt-get build-dep nautilus
the build-dep command will install all the build dependencies for nautilus.
1) Create a new text file and call it: file-manager.patch
copy all this contents into this file:
--- nautilus-desktop-icon-view.c 2011-10-27 17:31:16.773039361 +0200
+++ ../../nautilus-3.2.1-original/src/nautilus-desktop-icon-view.c 2011-10-28 09:40:25.000000000 +0200
@@ -852,7 +852,7 @@
"supports-auto-layout", FALSE,
"supports-scaling", TRUE,
"supports-keep-aligned", TRUE,
- "supports-labels-beside-icons", FALSE,
+ "supports-labels-beside-icons", TRUE,
NULL);
return NAUTILUS_VIEW (view);
}
Save the patch.
2) Copy the patch into the folder ~/nautilus-(version)/src/
open terminal go to ~/nautilus-(version)/src/ that where you put the patch and when you in there,
write:
patch -p0 < file-manger.patch
if the command was successful you should see something like this:
patching file nautilus-desktop-icon-view.c
3) not start to compile nautilus
./configure --prefix=/usr
make
sudo make install
killall nautilus
Alt+F2
nautilus
that's it, now the option text beside icons should work on the desktop too, enjoy :) The text is
stolen from [1] but I updated the patch. I tested the patch with Ubuntu 11.10 and nautilus-3.2.1.
[1] http://pastebin.com/raw.php?i=f3f29fcec
@sonic5397
Copy link

sonic5397 commented Jun 11, 2012

Any luck on getting this to work on Nautilus-3.4.1? For some reason, my home PC uses Nautilus-3.2.1 under Ubuntu 12.04, but my laptop upgraded to 3.4.1. This tip works on 3.2.1, but not under 3.4.1

@cit
Copy link
Author

cit commented Jun 11, 2012

What exactly does not work under 3.4.1? I've tested it under Ubuntu 12.04 with nautilus 3.4.2 and it works. Could you please be a little bit more verbose about the problem.

@sonic5397
Copy link

sonic5397 commented Jun 11, 2012

Thanks for the quick response. Here's what I am seeing:

In ~/nautilus-3.4.1/src/nautilus-desktop-icon-view.c, I can see the following (note: line numbers are different in 3.4.1 than in the 3.2.1):

781 nautilus_desktop_icon_view_create (NautilusWindowSlot *slot)
782 {
783         NautilusIconView *view;
784
785         view = g_object_new (NAUTILUS_TYPE_DESKTOP_ICON_VIEW,
786                              "window-slot", slot,
787                              "supports-zooming", FALSE,
788                              "supports-auto-layout", FALSE,
789                              "supports-scaling", TRUE,
790                              "supports-keep-aligned", TRUE,
791                              "supports-labels-beside-icons", TRUE,
792                              NULL);
793         return NAUTILUS_VIEW (view); 

I followed the above instructions:
./configure --prefix=/usr
make
sudo make install
killall nautilus
Alt+F2
nautilus

no errors on any of the above, but when I restart Nautilus, the text is still below the icons. I noticed you referenced 3.4.2 - maybe I need to bump up to the minor revision (.2) from .1.

Thanks!

@cit
Copy link
Author

cit commented Jun 11, 2012

Patch is smart enough to modify the file even if the line numbers are different. At first it scans for the specific line number. If patch finds the line which it expects that everything is fine. If not then it tries to search for the line above and below. This looks like this:

$  patch -p0 < ../../patch.txt
patching file nautilus-desktop-icon-view.c
Reversed (or previously applied) patch detected!  Assume -R? [n]

Here you can answer 'y' and patch will modifiy nautilus-desktop-icon-view.c nevertheless. This works fine for me.

@r5r4y
Copy link

r5r4y commented Jul 25, 2012

Thanks for updating my little patch. I was unaware they've changed it for Nautilus 3.x till about an hour ago when I've browsed through the files again.
The patch is great but not entirely necessary, it's just a matter of changing one line from FALSE to TRUE.
I think they are planning to remove "Labels beside icons" for icon view in Nautilus 3.5.4, that's a shame. Lucky it's still open source.

I re-wrote this little tutorial from my old Pastebin and posted it into my deviantart Journal. With some additional info:
http://oi3prnnx.deviantart.com/#/d58nu5u

If you've got anything to add, please do.

@sonic5397
Copy link

sonic5397 commented Oct 23, 2012

Duh! I have discovered my issue. For anyone who may be experiencing the same problem, I forgot to go to Edit -> Preferences -> Views and actually click the "Text Beside Icons" check box. Stupid mistake! This is actually working for me under Ubuntu 12.10. Sorry for the silly runaround!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment