211

Until now I was using a "traditional" version of Nautilus: that that comes with Ubuntu 10.10. Now I'm using 3.6.3, included with Ubuntu 13.04 (most likely any recent version is equivalent for the scope of my question, anyway).

One major difference between the two is the search-as-you-type behavior: in classic versions of Nautilus, when you typed an input, the file with the closest alphabetical match would become the selected one, the eligible files/folders being restricted to the current directory.

The new behavior is to perform an optionally-global search instead.

Can one configure Nautilus to provide the previous functionality ?

Organic Marble
  • 23,641
  • 15
  • 70
  • 122
deprecated
  • 2,149
  • 64
    I think that this change is outrageously stupid. Be sure to join the bug to push for improvement. https://bugs.launchpad.net/ubuntu/+source/nautilus/+bug/1164016 – Justin Force Jun 12 '13 at 00:54

8 Answers8

212

Ubuntu 17.10 and later

As the type-ahead search was a Ubuntu-specific patch, it got dropped together with Unity in 17.10. However there is a package called nautilus-typeahead in the Arch repository. Someone took it, compiled for Ubuntu and made a PPA. You can install it by these three commands:

sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
sudo apt dist-upgrade
nautilus -r

There is an issue on Launchpad about bringing this behavior back to official Ubuntu.


Ubuntu 14.04 to 17.04

Since the Ubuntu 14.04 LTS release type-ahead-find was the default behaviour in Nautilus again.

You can use a dconf key to switch between the different search modes:

  • enable type-ahead-find:

    gsettings set org.gnome.nautilus.preferences enable-interactive-search true

  • disable type-ahead-find in favor of recursive search:

    gsettings set org.gnome.nautilus.preferences enable-interactive-search false


Ubuntu 13.04 and 13.10

Nautilus 3.6.X cuts many features from the 3.4 and older versions. Canonical decided to keep using nautilus 3.4.2 in Ubuntu 12.10 because if this even though Nautilus 3.6 was already released. I don't think it is possible to get the old search behaviour in 3.6 but what I did was to install the SolusOS patched Nautilus (also works for Ubuntu 13.04) which includes all the features from 3.4.2 (it really is Nautilus 3.4.2) while maintaining the Nautilus 3.6 skin. I've tested this particular package and it works fine in Ubuntu 12.10 and 13.04.

Alternatively you could install the Nemo File Explorer which is a fork of Nautilus 3.4 that was made due to the Cinnamon dev team being disappointed with Nautilus 3.6, you can get the install instructions here.

Making it your default file browser is a bit more tricky, this blog post worked for me in Ubuntu 12.10 but some users reported the method not to work properly.

There are alternative methods however. See the following question:

pomsky
  • 68,507
  • As a complement, like explained by Fernando, here is a link for installing SolusOS patched Nautilus for Ubuntu 13.04. I checked it and it works fine on my system : http://www.webupd8.org/2013/04/get-nautilus-34-features-back-in-ubuntu.html – Raphaël Titol May 11 '13 at 20:26
  • The SolusOS patched Nautilus doesn't work at all for me. When I add the PPA, and do a dist-upgrade, no packages are upgraded. I am using the gnome-staging ppa, is there any way to use the patched nautilus with that? – daboross Jun 16 '13 at 01:50
  • 19
    GNOME in their infinite dictatorial wisdom have seemingly decided that we do not want this preference anymore, therefore it doesn't exist. Thanks again, GNOME. – underscore_d Apr 09 '16 at 21:37
  • 1
    @fernando-domínguez on nautilus 3.24 this option is no longer available. Can you update your answer? (as I have a feeling that this question will have a lot of hits in the near future) – shil88 May 02 '17 at 13:20
  • I'm offering a bounty for a solution working with 3.25 and 17.10 – mxdsp Sep 11 '17 at 08:33
  • 5
    I get: No such key “enable-interactive-search”. I got gsettings and also nautilus --version is GNOME nautilus 3.26.0. – Guillaume Chevalier Sep 24 '17 at 23:20
  • I get "gpg: unknown option 'show-only' ; gpg: invalid import options ; Got '0' fingerprints, expected only one ; Failed to add key." – Joshua Fox Aug 14 '18 at 09:29
  • 20
    nautilus -r shows Unknown option -r for me on 18.04 so I just did nautilus -q and then open Files from the launcher. Rest all worked perfect, thanks! Back to normal life. – Siddharth Pant Sep 13 '18 at 08:44
  • same here, nautilus -r does not work!? – Matifou Oct 04 '18 at 16:57
  • 7
    Urgh... I really don't want to add a PPA for this very basic behaviour. – Martin R. Feb 05 '19 at 17:34
  • Cannot add PPA: 'ppa:~lubomir-brindza/ubuntu/nautilus-typeahead'. ERROR: '~lubomir-brindza' user or team does not exist. – Vertexwahn Feb 24 '19 at 21:41
  • 1
    @MartinR. - luckily, there are alternatives out there like Nemo, but I'm too attached to Nautilus :P – lubomir.brindza Feb 27 '19 at 09:21
  • @Vertexwahn - what exact command are you trying to run? Did you manage to figure it out in the meantime? – lubomir.brindza Feb 27 '19 at 09:22
  • 1
    This doesn’t seem to work anymore on Ubuntu 19.04. Running sudo apt dist-upgrade does nothing. – kleinfreund Apr 23 '19 at 18:12
  • 1
    @kleinfreund have you tried running nautilus -q after the dist-upgrade command? Just tried it in 19.04 and it worked. – Gus Jun 23 '19 at 14:07
  • Confirm, it works for ubuntu 19.10 (gnome-shell 3.24) – Rochdi Boudjehem Nov 19 '19 at 21:19
  • 1
    I'm so thankful for this tip you can't imagine. Ubuntu 20.04 and it works (had to nautilus -q and then re-start it because -r doesn't work) – shinobody Mar 18 '21 at 08:52
  • 1
    This worked for me on Ubuntu 21.10, but I cannot get it to work on 22.04. – laur34 Apr 28 '22 at 09:41
44

Ubuntu 22.10 and newer

Installation still works the same as with previous versions. However, after installing, you'll need to open nautilus preferences (ctrl + ,) and disable the new Search on type ahead option that is checked by default - this way you have the option to return to the default search behavior later if you wish.

These versions also do away with the text field that used to pop up in the bottom right corner when typing.

Ubuntu 18.04 until 22.04

Well, this issue has motivated me enough to finally check out Ubuntu's PPA submission process; you can find Nautilus packages with the Arch community patch applied here: https://launchpad.net/~lubomir-brindza/+archive/ubuntu/nautilus-typeahead and install it by running:

sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
sudo apt upgrade
# or, if you don't want to upgrade any other packages:
sudo apt install nautilus

I'd just like to clarify the "Someone took it, compiled for Ubuntu and made a PPA" part in the top post - that's really not how PPA works. The actual way this works is that you provide a patch that adds/changes the desired functionality (typeahed in this case), and add it on top of all the other Ubuntu-specific patches you get when you download the source package using apt-get source nautilus. Once that's done and you've updated the changelog, debuild will create digitally signed files that describe what exactly changed with regards to the upstream source package. Only those are ever uploaded to Launchpad, which then attempts to compile and build the package. The changes to the upstream are reviewable in the Launchpad interface.

TL;DR: one does not upload the complete source code nor binaries directly to Launchpad nor PPA repository. Just wanted to clarify that, in case anyone was wary of something shady happening.

  • 2
    Glad you did it! Thank you for this PPA :) – G. Demecki Jun 09 '18 at 18:55
  • 2
    Just tried it on 18.10: nautilus -r responds Unknown option -r – Mene Oct 29 '18 at 14:54
  • 1
    FYI: I've added deb http://ppa.launchpad.net/lubomir-brindza/nautilus-typeahead/ubuntu bionic main as line to my sources and they get hit by apt, but no effect so far on cosmic. Don't know enough about Ubuntu I guess. But thanks for you work! – Mene Oct 29 '18 at 15:14
  • 1
    @Mene - try switching the PPA repo back to cosmic; I've finally figured out what was preventing me from uploading packages for 18.10 - they should be live in a few minutes – lubomir.brindza Oct 31 '18 at 11:19
  • Nice! I'm afraid I had to switch to windows temporarily, as the device seems to have a hardware failure and we need to figure out if it actually is. But I'll switch back once that's sorted out and come back to report – Mene Oct 31 '18 at 11:26
  • 1
    Back on 18.10 and everything works! – Mene Nov 18 '18 at 13:42
  • works on latest ubuntu 18.04 LTS, who ever was envolved, THX! – Cutton Eye Jan 12 '19 at 14:51
  • Hi, I tried to add your ppa, run apt dist-upgrade, and relaunched Nautilus - no change in behavior. Running 19.04 cosmic, am I missing something? – mauek unak May 19 '19 at 23:30
  • @mauekunak - No idea; what's the output of your dpkg -l | grep nautilus and apt-cache madison nautilus? – lubomir.brindza May 24 '19 at 08:39
  • @Halka output: nautilus 1:3.32.0-0ubuntu2ppa1 and from the second command: nautilus | 1:3.32.0-0ubuntu2 – mauek unak May 24 '19 at 15:06
  • Build for 20.04 was added to the PPA. – lubomir.brindza Apr 08 '20 at 08:12
  • Build for 20.10 was assed to the PPA. – lubomir.brindza Oct 27 '20 at 11:12
  • Is it possible to set this up without running dist-upgrade? I don't want to upgrade the entire system – Andy Jan 20 '21 at 09:42
  • 1
    Yeah, it's a bit misleading, just running an update via apt upgrade or even apt install nautilus should work as well. – lubomir.brindza Jan 20 '21 at 14:12
  • Build for 21.04 was added to the PPA. – lubomir.brindza Jun 04 '21 at 16:59
  • Build for 21.10 was added to the PPA. – lubomir.brindza Oct 21 '21 at 13:36
  • FYI, a recent(?) update has done something with repo priorities so the default nautilus is installed over this now. Probably need to add something to etc/apt/preferences.d but I'm not experienced with this. Will report back after some fiddling. – Andy Nov 11 '21 at 09:54
  • 1
    Hi, you should be able to update to a patched version again. A new nautilus release came out for 20.04, and I only noticed it after another user pointed it out to me. – lubomir.brindza Nov 11 '21 at 15:40
  • Hey, I think 1:3.36.3-0ubuntu1.20.04.2 is shadowing your version again? I have the PPA added, but an unattended-upgrade seems to have installed that new version over yours. – snwflk Jan 05 '23 at 17:02
  • You're right, new patched version for 20.04 should be available within the hour. Same goes for 22.04. Haven't gotten round to 22.10 as of yet. – lubomir.brindza Jan 10 '23 at 10:06
15

In Ubuntu Gnome 14.04, open dconf-editor. Go to
org>gnome>nautilus>preferences.

Check the box next to enable-interactive-search. Restart nautilus

bolzano
  • 1,570
viveks
  • 151
  • Thanks! In order to restart nautilus, either relogin or give nautilus -q and then nautilus -n in the Alt+F2 box. – hytromo Oct 26 '14 at 19:11
  • 8
    this key doesn't exist in nautilus 3.25 anymore. How to active interactive search again ? – mxdsp Sep 09 '17 at 08:27
  • Nice, it combines well with the chosen answer (actually install a Nautilus with type-ahead search) in case I want to disable type-ahead search later. – hsandt Jan 05 '19 at 19:56
10

Ubuntu 18.04+, Nautilus native solution

You can get a close behavior to search-as-you-type if you change the following options in the Nautilus Menu -> File -> Preferences -> Search & Preview:

  • Change "Search in subfolders" to "Never"
  • Uncheck the "Full Text Search": "Set as default" option

Now the visual interface will still be as the new Nautilus (tested with v3.26.4), while the functionality will be similar to the search-as-you-type as in the older Nautilus.

pomsky
  • 68,507
elomage
  • 1,400
  • 1
    In this case, while typing, it filters and only show the results, instead of move the selection to the 1st file containing the typed expression. – Sigur Jul 31 '19 at 18:44
  • 1
    @Sigur It does show only the filter results, however, it also does move the selection to the first file in the results. I use this search followed by Enter, or arrow keys and Enter for fast finding of the directory or file that I need. Just like with the old Nautilus. – elomage Aug 03 '19 at 07:55
  • 4
    It's very slow and I hate it but at least it's better now, thanks. – Lambart Oct 25 '19 at 18:45
  • When you close the search after selecting the result, there is no selection at all, so this is completely useless for me. (I need to navigate to a file alphabetically, and extend the selection to the end of the file list) – Mark Jeronimus Jun 27 '20 at 22:53
  • @MarkJeronimus When I type letters, the selection moves to the first file name that matches the entered pattern. If I want to expand to the full file list with the found match still selected - I press ESC and have the full list of files and directories with the last found item selected. Just tested, works for the version 3.26.4. – elomage Jun 29 '20 at 04:30
  • I found the recursive seach an annoyance. Thanks for the hint. – Chris Oct 12 '21 at 10:39
5

There is actually a way to get this in Nautilus 3.26 (the current version in Ubuntu 17.10). Which is building your own version from source, using a patch provided by the awesome arch-linux community. Luckily, the great build system in Ubuntu makes this quite easy. Here's the steps. I'll assume you'll be working in ~/bld-nautilus-typeahead. Start a console and do the following:

# install some necessary tools
sudo apt-get install git

# Create your work directory and go there
mkdir bld-nautilus-typeahead ; cd bld-nautilus-typeahead

# Clone the repository holding the needed patch: 
git clone https://aur.archlinux.org/nautilus-typeahead.git

# Make sure the source repositories for the main archives are available:
sudo nano /etc/apt/sources.list

# If the deb-src line for the main repository (usually around line 6) is commented out (starts with a #), un-comment it (remove the #) and save the file
sudo apt-get update

# Install the build dependencies
sudo apt-get build-dep nautilus

# Retrieve the sources for Nautilus
apt-get source nautilus

# Source should now be in the 'nautilus-3.26.0/' folder. Go there
cd nautilus-3.26.0/

# and Apply the patch from arch-linux
patch -p0 < ../nautilus-typeahead/nautilus-restore-typeahead.patch

# Build the package from source
dpkg-buildpackage -rfakeroot -uc -b

# This will take a little time. If everything goes well, the related packages will end up in the parent directory. Go there
cd ..

# and install the required packages
sudo dpkg -i nautilus_3.26.0-0ubuntu1_amd64.deb nautilus-data_3.26.0-0ubuntu1_all.deb

Start a new Nautilus. Type some letters. Experience that feeling of joy that happens whem the file you intended gets selected.

SFG
  • 161
  • 2
  • 3
  • 1
    Applying the patch, I get "can't find file to patch at input line 5 // Perhaps you used the wrong -p or --strip option? // Text leading up to this was ... " and an option to choose file to patch. Any suggestions? – Rasmus Feb 20 '18 at 09:43
  • @Rasmus manually entering the path worked for me. If the .patch file references a/some/path enter ./some/path. I'm pretty sure this isn't the smart way to do it but it worked... – 0x539 Apr 04 '18 at 01:09
  • 1
    The answer above for using the Arch patch works, but I had to specify -p1 instead of -p0. – Juraj Apr 27 '18 at 14:53
1

Not quite what I wanted but the following limits the search to the current directory and is a very lightweight compromise:

# Get the previous setting in case I want to revert.
gsettings get org.gnome.nautilus.preferences recursive-search &&

# Only search the current directory. Do not go deeper.
gsettings set org.gnome.nautilus.preferences recursive-search 'never'

Tested on Ubuntu v18.10.

1

Ubuntu has updated the Nautilus repository, as a result the accepted answer no longer works. Use the command below to get the correct version of PPA Nautilus.

sudo add-apt-repository ppa:lubomir-brindza/nautilus-typeahead
sudo apt-get install nautilus=1:3.26.4-0~ubuntu18.04.4.ppa1 libnautilus-extension1a=1:3.26.4-0~ubuntu18.04.4.ppa1 nautilus-data=1:3.26.4-0~ubuntu18.04.4.ppa1
sudo apt-mark hold nautilus libnautilus-extension1a nautilus-data
nautilus -q

This works on Ubuntu 18.04, if you are using another version use the apt-cache policy nautilus to find the correct version of PPA.

0

The answer for Nautilus 3.25 and above is it's gone & not coming back unless someone totally rewrites the ubuntu patch & odds of that are extremely slim to none.

It is not something that can be configured in nautilus itself.

doug
  • 17,026