Ubuntu: Manually edit .desktop files in dock on Ubuntu 17.10



Question:

I have a rather simple question I couldn't find any appropriate solution by searching here or elsewhere.

I recently upgraded to 17.10 once again since 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/application 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: where is the location of my dock favorite .desktop files?


Solution:1

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/.


Solution:2

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).


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »