Ubuntu – How to remove folder shortcuts from Dash files

nautilusshortcutsunity-dash

How can I remove folder shortcuts from nautilus dash shortcut??

You can see that some way I managed to add two new shortcuts to this menu and I do not know how to get rid of them.

enter image description here

Here is the list of files in application directory

 chrome-aohghmighlieiainnegkcijnfilokake-Profile_2.desktop
chrome-apdfllckaahabafndbhieahigkjlhalf-Default.desktop
chrome-apdfllckaahabafndbhieahigkjlhalf-Profile_2.desktop
chrome-apdfllckaahabafndbhieahigkjlhalf-Profile_3.desktop
chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Default.desktop
chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Profile_2.desktop
chrome-blpcfgokakmgnkcojhhkbfbldkacnbeo-Profile_3.desktop
chrome-coobgpohoikkiipiblmjeljniedjpjpf-Default.desktop
chrome-coobgpohoikkiipiblmjeljniedjpjpf-Profile_2.desktop
chrome-coobgpohoikkiipiblmjeljniedjpjpf-Profile_3.desktop
chrome-pjkljhegncpnkpknbcohdijeoejaedia-Default.desktop
chrome-pjkljhegncpnkpknbcohdijeoejaedia-Profile_2.desktop
chrome-pjkljhegncpnkpknbcohdijeoejaedia-Profile_3.desktop
mimeapps.list
mimeinfo.cache
owa-blockthepig-69332f0881265d1bad4b167b12e3144f.desktop
owa-soundcloud-musicaudio-515e62acb4534adf9d67bd67c3aef5e8.desktop
wine-extension-application.desktop
wine-extension-appref-ms.desktop
wine-extension-chm.desktop
wine-extension-compositefont.desktop
wine-extension-crd.desktop
wine-extension-crds.desktop
wine-extension-gif.desktop
wine-extension-hlp.desktop
wine-extension-htm.desktop
wine-extension-ini.desktop
wine-extension-jfif.desktop
wine-extension-jpe.desktop
wine-extension-msp.desktop
wine-extension-png.desktop
wine-extension-rtf.desktop
wine-extension-txt.desktop
wine-extension-url.desktop
wine-extension-vbs.desktop
wine-extension-wri.desktop
wine-extension-xaml.desktop
wine-extension-xbap.desktop
wine-extension-xml.desktop
wine-extension-xsl.desktop
levan@Commodore64:~$ 

This is how my list config/gtk-3.0/bookmarks looks but the shortcut is still there

file:///home/levan/Documents Documents
file:///home/levan/Music
file:///home/levan/Pictures
file:///home/levan/Videos
file:///home/levan/Downloads

Best Answer

Different shortcuts

The bookmarks you see in the Nautilus launcher are divided into different sections. Some are stored in the nautilus.desktop file (static section), others are added automatically from the file ~/.config/gtk-3.0/bookmarks.
The last file is automatically edited and updated if you add bookmarks via the (nautilus) bookmarks menu.

The "Open a new Window" shortcut

This one is part of the static section. To get rid of it, you will have to edit the nautilus.desktop file:

  1. First copy the file nautilus.desktop to your local directory (~/.local/share/applications):

    cp /usr/share/applications/nautilus.desktop ~/.local/share/applications/nautilus.desktop
    
  2. Open the local copy with gedit; drag it over an opened gedit window or run:

    gedit ~/.local/share/applications/nautilus.desktop
    
  3. Find the line, starting with:

    Actions=
    
  4. remove the string Window;

  5. remove the referring shortcut section:

    [Desktop Action Window]
    Name=Open a New Window
    Exec=nautilus --new-window
    OnlyShowIn=Unity;
    
  6. Save and close the file, log out and back in

The other shortcuts in your example

The other shortcuts in your example are automatically added from the file: ~/.config/gtk-3.0/bookmarks. You can remove those links in two ways:

  1. via GUI: Open Nautilus, from the menu, choose "Bookmarks". Remove the bookmarks you'd like to get rid of.
  2. ALternatively: edit the file : ~/.config/gtk-3.0/bookmarks; remove the referring line(s).
Related Question