Add export DISPLAY=127.0.0.1:0 to your ~/.profile and hgmerge will find kdiff3 if it's on the path. teki