Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Good day to all,

I was wondering how to unpinned desktop icons from terminal.

Yes, It is easier to do it with the buttons mouse, the but is that the right one is not working and for my own needs I don't need that button at all.

This is why I am looking for any suggestion to do it through the terminal.

Thanks in advance

share|improve this question
    
Which Desktop Environnement are you using (Unity, Gnome, XFCE, ...)? –  MrVaykadji Jan 5 at 15:59
    
ubuntu saucy amd64 –  Alejandro Jan 5 at 16:11

2 Answers 2

up vote 0 down vote accepted

.desktop files : a shortcut.desktop file is a text-file placed in the Desktop directory (~/Desktop) that is used to provide clickable shortcuts on the Desktop.

  1. Check which ".desktop" files are used in your desktop :

    ls ~/Desktop

  2. Identify the ".desktop" you want to remove.

  3. Remove the ".desktop" file you want to remove (replace nameofthefile by the name of the file, ending with .desktop):

    rm ~/Desktop/nameofthefile.desktop


D-conf keys : it's a key stored in d-conf that is used to provide clickable shortcuts on the Unity Launcher bar.

  1. Get the list of launcher items:

    gsettings get com.canonical.Unity.Launcher favorites

  2. This will return something like ['nautilus-home.desktop', 'gnome-terminal.desktop', 'gedit.desktop'] which you can manipulate to remove unwanted shortcuts.

  3. Set the launcher item list with only the launcher you want, example:

    gsettings set com.canonical.Unity.Launcher favorites "['nautilus-home.desktop']"

Don't forget the quotes !

share|improve this answer
    
Thanks!!! It works smoothly! –  Alejandro Jan 5 at 16:18

The easiest was would be to use the dconf-editor and remove the unwanted apps from the desktop->unity->launcher->favorites section.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.