Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm new to OS level programming so apologies for the noobness.

Ultimately I would like to change the behaviour of clicking on "Change Desktop Background" from the desktop context menu. It would appear the Nautilus package contains the source and I have even found the line which calls the Desktop Control Panel after clicking on "Change Desktop Background".

Is it possible to re-compile the modified version of Nautilus, test it, and install it on my own system? This could be ultra noob asking a question like this but I just don't know yet!

share|improve this question

In order to download the source and re-build it, do this:

  1. Install all build-dependencies for nautilus: sudo apt-get build-dep nautilus
  2. Run apt-get source nautilus in a directory you want the source.
  3. cd into the nautilus- directory.
  4. Run debuild -uc -us. This creates an unsigned source, unsigned changes file and one or more binary packages. You'll find these one level of a folder lower.
  5. Install the package(s) using sudo dpkg -i /path/to/binary-package1.deb /path/to/binary-package2.deb [...].
  6. Make changes to the source, and rebuild/install as many times as you like.

You can apply this recipe to any Debian/Ubuntu package.

To undo the installation of your modified version, simply revert to the main upstream Ubuntu version of the package by reinstalling and selecting that version in your package management. This keeps your system clean without files everywhere unmanaged by your package management.

share|improve this answer

You can pull the source by simply running apt-get source nautilus. This will create a directory called nautilus-. You can then cd into there, make your changes, then ./configure, sudo make, and then sudo make install

share|improve this answer
No! Don't just install it like that. It will install files everywhere and potentially break your package management! See my answer for a more elegant Debian/Ubuntu-way of doing this. – gertvdijk Nov 15 '12 at 20:53

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.