Gnome Nautilus Extensions
the quick but hopefully clean tutorial … in pure C.
by Heiko Voigt, Oktober 2009 (updated January 2016)
A simple Example
So you want to write a simple nautilus extension but do not know where to start? First of all: There is a small github repository where you can get the current code to get started. It might even be the only thing you need.
become root or give yourself write access to the
/usr/lib/nautilus/extensions-X.0/
folder and:
For debugging and getting the actual output on the commandline it helps to kill nautilus and manually start it from the Terminal with
again.
For the example I basically plugged everything from
Nautilus Extensions together in a project, wrote a simple
Makefile and compiled it. So now you find only two files in there:
the Makefile
itself and a plugin.c
which
are pretty much explained by the link above.
To keep things short I will stop here so you can play around with the example and let the source speak for itself.
I created this tutorial and example because I needed a starting point to port the git plugin git-cheetah to nautilus.
Links
Here are the resources I used to assemble this example:- Nautilus Extensions - This seems to be the original reference specification
- Thread on the mailinglist - A little insight about the documentation situation
- Extending Nautilus - A page on the Gnome Website about Nautilus Extensions
- Nautilus Extensions - Another page from the Gnome Website about Nautilus Extensions
- nautilus-vcs - The official example of a nautilus extension in C (although not compiling for me)
- The GTK+ tutorial - A good resource about general GTK programming