1. Yuki Kodama
  2. thg-ja


Clone wiki

thg-ja / nautilus

Gnome/Nautilus Integration

The TortoiseHg nautilus extension has been tested successfully on Ubuntu 7.10, 8.04 and Fedora 8. In theory it should work on any Gnome/Nautilus desktop.


You should find RPM and DEB packages for the nautilus extension on the Downloads tab.

Source Install

Installation steps:

  1. Install mercurial (1.3 or later)
  2. Install python-nautilus (or equivalent package for your system, such as nautilus-python for Fedora and Centos).
  3. Clone the stable tortoisehg repository on your machine
  4. Symlink the nautilus extension file into your local python-extensions directory

Steps 1 and 2 (for debian or ubuntu) as a shell command:

sudo apt-get install mercurial python-nautilus

Step 3 as shell commands:

mkdir -p ~/src/ && cd ~/src
hg clone https://bitbucket.org/tortoisehg/stable tortoisehg

Step 4 as shell commands:

mkdir -p ~/.nautilus/python-extensions/
ln -s tortoisehg/contrib/nautilus-thg.py ~/.nautilus/python-extensions/

To use the extension without restarting nautilus, you can launch a separate instance of nautilus using the following script (create a link to the script on your desktop for easy access):

TMPDIR=`mktemp -d -p /tmp/` nautilus --no-desktop

nautilus -q will restart your desktop nautilus process, so you do not have to re-login after each change to the extension file.

Common problems

  • Unable to import mercurial package. Ensure it is in nautilus python path
  • Unable to import tortoise package. Use symlink method for development

Note that error messages from nautilus are typically piped to ~/.xsession-errors. While debugging the extension it's common to keep an xterm open with tail -f ~/.xsession-errors