With the ever-changing world of Linux, you can expect things to be different for no apparent reason. Some changes are good, and some just cause trouble for users. In this case, it can just flat-out be annoying. Most people will instinctively look to the left of the file manager for navigation links, such as back and forward. In Nautilus 3+, that’s not where you will find them. Instead, they were moved to the right side of the address bar. That’s not a very natural place for them to be, so today, I’ll show you one way to move them back to the left.
If you are not comfortable with compiling from source code, you should probably avoid this tutorial. I have not seen any other method available to do the job.
The first thing to do is enable the source code repository. In Ubuntu, you can do this by opening your application menu and search for Software Sources. Here, all you need to do is check the box for “Source Code” and click close. This will enable the source code repositories along with some other features that will help you along the way.
Open your home directory and create a new folder. For the purpose of this tutorial, I’ll call it “nautilus-custom“. Now, it’s time to open the terminal and do the rest of the work.
Since all we did in with the Software Sources editor was enable the Source Code repository, the repository listing still needs to be updated, so run:
sudo apt-get update
Move to the “nautilus-custom” folder before downloading the source:
Now that it’s updated, we need to download the source code for nautilus. This part does not need to be done as root, so you won’t need to use “sudo” in the command:
apt-get source nautilus
It will download the source packages for Nautilus and you will see some text flowing. Once it is finished, you may want to check to make sure that the source package was extracted by going into the nautilus-custom folder in your file manager. There should be a folder in there called “nautilus-3.2.1″, or whatever version is current. If it is not there, right-click on the “nautilus_3.2.1.orig.tar.bz2″ file and click “Extract Here”. That will extract the source files in the “nautilus-3.2.1″ folder I mentioned.
Back to the terminal. If you haven’t compiled anything from source before, you will need some extra packages installed to allow you to do so. Even if you have compiled from source before, you should probably run this to make sure you have everything needed to compile Nautilus.
sudo apt-get build-dep nautilus
That installs everything needed to compile Nautilus. Now that you have everything needed, it’s time to move to the source code folder. You should already be in the “nautilus-custom” folder in the terminal, so you can use:
The folder will be named differently if it is a different version, so it could be “nautilus-3.2.5″ in the future. Change the command accordingly. The code needs to be changed slightly to move the navigation buttons to the left. You neeNautilusNav-buttonsd to open the source file for the toolbar:
You can either scroll down to line 132 (in version 3.2.1), or search for “gtk_toolbar_insert (GTK_TOOLBAR (self->priv->toolbar), item, 0)” (without quotes). At the end of that line, it has a “0″. Change it to a “2″, as in this picture:
Save the file and close Gedit. Now, it’s time to compile and install.
The first step in compiling the source code is to configure the build:
Than to build it:
Since in can’t be installed while it is already running (which could cause some problems), you need to stop all nautilus processes:
sudo killall nautilus
Now to install:
sudo make install
Once it finishes, it’s time to check that it worked:
The navigation buttons should be on the left side like this:
To prevent problems, you should either logout and back in, or just restart the computer. If at some point you want the navigation buttons moved back to the right side, just run:
sudo apt-get --reinstall install nautilus
That will install the stock Nautilus from the Ubuntu repositories. If Nautilus gets updated with the regular software updates, you will lose the positioning, so you will need to repeat this process every time for future versions.
This isn’t exactly a convenient way to do this job, but hopefully it will become an option in either the standard settings or even with Ubuntu Tweak in the near future.
Did this work for you? Do you have an easier way to do it? Let us know in the comments.