Ubuntu – Why are there two icons in the Unity launcher for Nautilus

iconsunity

Okay, so I installed Ubuntu 11.10.

The thing is, when I click the home folder icon in the launcher (Win + 1), the home folder opens and a new icon appears in the launcher.

I want the windows to be highlighted in the first icon only if you catch my drift (4th icon).

I thought if I could remove the first icon and then right-click on the other icon and keep it in the launcher, it may work – but then folders open and the icon remains blank without any indication that a window is open (looks same as first icon).

Also, the icons numbered from top to bottom exclude the dash icon.

Best Answer

Disclaimer: I am not a Linux programmer, and this answer contains modifying files out of your home folder. It works for me, but do it on your own risk.

This problem appears when you configure your Home icon to have a quicklist for your favourite places the way it is described here.

The way to solve it, as written on the Bug 842257 page, is instead of creating a copy of /usr/share/applications/nautilus-home.desktop in ~/.local/share/applications and modifying this copy, rather modifying the original file. So the steps are:

  1. Delete the copy, if there is any: ~/.local/share/applications/nautilus-home.desktop

  2. Open a terminal and write:

    gksu gedit /usr/share/applications/nautilus-home.desktop
    
  3. Add this text at the bottom of the file, save and close.

    X-Ayatana-Desktop-Shortcuts=Videos;Documents;Music;Pictures;Downloads
    [Videos Shortcut Group]
    Name=Videos
    Exec=nautilus Videos
    TargetEnvironment=Unity
    
    [Documents Shortcut Group]
    Name=Documents
    Exec=nautilus Documents
    TargetEnvironment=Unity
    
    [Music Shortcut Group]
    Name=Music
    Exec=nautilus Music
    TargetEnvironment=Unity
    
    [Pictures Shortcut Group]
    Name=Pictures
    Exec=nautilus Pictures
    TargetEnvironment=Unity
    
    [Downloads Shortcut Group]
    Name=Downloads
    Exec=nautilus Downloads
    TargetEnvironment=Unity
    
  4. Reboot. It should work now, only one icon, with the quicklist.

If it still doesn't work, you can try Alt+F2, then run

unity --reset-icons

This will reset the icons of the original install on your launchbar, so you will have to repopulate it the way you want.

For getting the original nautilus-home.desktop file back, you can reinstall Nautilus and have the default settings and files:

sudo apt-get install --reinstall nautilus