I recently upgraded to Ubuntu 17.10 once again since Ubuntu 17.04 seems out of support.

I wanted to manually edit the entries in my dock, and expected to find a list in ~/.local/share/applications.

The list does not match my current favorites, meaning that (I assume), it's located somewhere else.

The /usr/share/applications directory features a huge list of .desktop entries which, again do not match what's in my dock.

I need to edit one of those favorites to add a command-line parameter to the Exec entry.

So simply put: what is the location of .desktop files added as favorites to my Ubuntu dock?


Open Terminal and run

gsettings get org.gnome.shell favorite-apps

You should see the list of .desktop files associated to the applications added to the dock in the correct order.

Then look for the .desktop file you want to edit in /usr/share/applications/ or in ~/.local/share/applications/.


Your favourites are just "shortcuts" that point to some .desktop files in /usr/share/applications/ or in ~/.local/share/applications/.

If you want to add a parameter (or modify in another way) to a desktop file, locate the file in the two applications/ directories:

  • if the file is only located in /usr/share/applications/, copy it to ~/.local/share/applications/ and edit the copy as you like (you can directly edit without copying, but do prefer to make changes only in your home directory) ;
  • if the file is located in ~/.local/share/applications/, you can edit it directly, but if you want to keep a unchanged version, make a copy in the same directory before editing.

If you edited a copy, you'll need to remove your current favourite and re-add the edited one (since you made a copy, you'll have two desktop file in your applications list).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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