PLEASE NOTE: This article is for earlier versions of Ubuntu running on Gnome 2.x, so will not work in Unity (the default desktop environment) or Gnome Shell, both of which are based on Gnome 3.
If you’ve created custom toolbar buttons for Ubuntu’s file manager, Nautilus, you might find them gone after a system upgrade. This is simply because the file nautilus-navigation-window-ui.xml has been overwritten with a fresh copy with default settings.
To save having to edit that file each time this happens, you can backup the edited file by copying it somewhere safe, which you can do quickly via the terminal. Then when you need to restore your settings, another command will quickly do this for you.
In the example, nautilus-navigation-window-ui.xml will be copied to a folder called Settings inside your home folder, but you can change that to whatever you like.
Backup Modified Nautilus Settings
sudo cp /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml ~/Settings/nautilus-navigation-window-ui.xml
Restore Modified Nautilus Settings
sudo cp ~/Settings/nautilus-navigation-window-ui.xml /usr/share/nautilus/ui/nautilus-navigation-window-ui.xml
For the changes to take effect, you’ll need to restart Nautilus, which you can do with:
in a terminal or via Alt+F2.
Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!