Monday, April 20, 2009

Fix Your Crap 1: Want Tracker Support in Nautilus?

Nautilus ubuntuImage by gigasoft via Flickr
Open up your Ubuntu Hardy (or later version) file manager and press CTRL+F to start a search. You'll notice that it's slow and only searches by name. Sure, you've got the deskbar (unless you're using a recent version of Ubuntu) and can get Tracker full text search, but why wouldn't you want Tracker integrated with Nautilus? Well, it turns out that a lot of people didn't want it and the integration was stopped after Gutsy (what a bone-headed decision that was!). Don't bother trying to report this as a bug, even though the Nautilus project and the Tracker project both claim integration with each other -- it'll just be marked "Invalid" or "Won't fix." Wake up. Modern desktops have this kind of integration.

So what's a person to do? Are you going to run off to another Gnome distro which doesn't do this? You have the power of the source. Use the source, Luke! Fix your crap. It's an easy cut and paste job for you. Just open a terminal and paste the following in (I'll explain later what each part does):

sudo apt-get build-dep nautilus
sudo apt-get install build-essential libtrackerclient-dev \
libtracker-gtk-dev fakeroot
apt-get source -b nautilus
sudo dpkg -i libnautilus-extension*.deb nautilus*.deb
killall nautilus

You should now have a near-instant search via full-text Tracker. Have fun.

The explanation
  1. We're going to need to recompile nautilus, so we need to get the build dependencies for Naultilus. The first line does this automatically without having to work through everything manually.
  2. Since the Tracker dependencies weren't installed, we need to include those. We also need fakeroot since we don't want to build as root -- fakeroot is a package which keeps us from needing to use those priveledges while building the package. Build-essential makes sure that we have all the build tools installed. I normally have them, and I'm not sure whether you actually need to have this package on the second line or not (due to build-dep above), but it doesn't hurt to have it and I don't want anyone's build failing. The backslash in the middle of that line makes a carriage return possible without executing the command.
  3. We retrieve the source for Nautilus and automatically build it. Since Nautilus checks for Tracker during compilation, we don't need to mess with any compilation flags -- that's handled automatically.
  4. We install the new packages.
  5. We need to kill Nautilus to restart it.
Sometimes, changing your system to meet your needs is more difficult than this. I'll introduce you to one of those next week in Fix Your Crap 2.
Reblog this post [with Zemanta]

6 comments:

  1. Hi Daengbo,
    I'm the author of the howto thread on Ubuntu forums that you linked to. Unfortunately my experience with tracker wasn't near-instant full-text search it was broken non-functioning search. I personally don't think that completely removing tracker integration was the right way to go but from what I understand it was the only option available at the time to get nautilus search functional again. I can't comment on whether things have improved with regard to searching the current directory/non-indexed areas etc as I don't use tracker but what I would like to see is an option to disable/remove tracker and still have working name based file search. This is what initially motivated me to investigate the compilation options and create the howto.

    Indexing files takes up a lot of resources and for someone like myself who doesn't use search very often the benefits aren't significant enough to justify that sort of overhead. Like you I don't want to have to install all the build-deps and spend the time recompiling every time the package is updated. I would much prefer a configuration option to the current situation, even if it's buried in the less than fantastic gconf-editor.

    ReplyDelete
  2. I wasn't bitching at you, actually. I like choice and would prefer something other than a compile-time inclusion. Some people want filename search, obviously, but I think that the Ubuntu devs listened to a few loud voices (yours included, I guess, but there's no accusation in that statement) and moved the search-based desktop back a couple of years. I've seen a number of people who think that Linux is years behind Mac and Windows because of the search issue.

    Deskbar was cited as an easy alternative at that time, mitigating the need for full-text search in Nautilus, but Deskbar is no longer installed by default and doesn't do Tracker by default even after it IS installed.

    Tracker is significantly better than it was in Gutsy (not surprising), and doesn't use up a lot of resources these days. The results are accurate and near-instant.

    Of course, a GConf switch would be the perfect solution, but since Brasero broke Nautilus completely on the Jaunty RC, I'm not expecting any Naultius/Tracker resolution from Ubuntu until after Gnome 3.0 is out.

    Meh.

    ReplyDelete
  3. Many thanks! I like nautilus integration with tracker in my Fedora install. It would be good to have that in Ubuntu.

    If I do that on Ubuntu, should I disable updates of some packages, e.g. nautilus, tracker, ...?

    ReplyDelete
  4. Thanks again: works as advertised (Jaunty).

    I verified that I have to stop beagle though before starting nautilus:

    http://projects.gnome.org/tracker/faq.html#point7

    ReplyDelete
  5. I use karmic and i follow the 5 steps.

    Right after the successful installation, the update-manager installs again the nautilus package without the tracker integration.

    ReplyDelete
  6. DamNick,

    It's possible that the source and binary packages aren't in step with each other and the problem will be worked out soon. Otherwise, deselect the nautilus packages in the Update manager. You'll need to manually recompile when an update occurs.

    ReplyDelete

Other I' Been to Ubuntu Stories

Related Posts with Thumbnails