Add a Custom App
From: https://askubuntu.com/questions/1026528/adding-custom-programs-to-fav
ourites-of-ubuntu-dock
Adding a Custom App to Ubuntu
Works great on 22.04 pt
This question already has answers here:
https://askubuntu.com/questions/966740/how-do-i-pin-my-favorite-folders-in
-ubuntu-dock-like-in-windows
How do I pin my favorite folders in Ubuntu dock like in Windows? (7answers)
I want to add a custom program to the favourites of Ubuntu dock, but there
is no option for that.
Translating the text in this image (same as above) only says:
All windows
Quit
It also doesn't appear in "Show Applications":
Is there a way for adding the program to both Favourites and Applications
menus?
gnome-shellinstalled-programsubuntu-dock
pomsky
asked Apr 19, 2018 at 21:38
Elgirhath
I want to do the same thing, but it appears this is some war crime. –
Steve3p0
May 7, 2022 at 0:58
Answer 1
This is fairly easy. First, make a desktop application file that follows
the
freedesktop.org spec, e.g.
[Desktop Entry]
Type=Application
Encoding=UTF-8
Name=MyApplication
Comment=My fancy new application
Exec=my_application
Icon=my_application.png
Terminal=false
If you want this to be usable by anyone on your system, put it in
/usr/share/applications.
For personal use only, you can put it in
~/.local/share/applications.
Look in /usr/share/applications for other examples.
Add your icon image to
/usr/share/icons directory,
or I assume the ~/.local/share/icons, although I have not tried that
last location myself.
Then, you can search for the application by name and drag it to the
launcher
in the usual way!
8
This doesnt work anymore on 18.04 :( –
Shervin Asgari
Oct 14, 2018 at 10:19
5
Shervin: I can verify that this still works on 18.04, both using
/usr/share/applications or ~/.local/share/applications. You may need to
restart gnome to update the cache. –
Martin W
Oct 16, 2018 at 21:54
18
One step is missing from the description to make it work: the .desktop
file needs to be executable, so run e.g. chmod a+x eclipse.desktop, see
askubuntu.com/questions/1082340/how-to-add-eclipse-to-favorites –
dariok
Jul 17, 2019 at 10:11
22
For anyone looking to do this from the command line, run dconf read
/org/gnome/shell/favorite-apps, and you will get a list which starts like
['firefox.desktop', 'org.gnome.Nautilus.desktop']. Add your new .desktop
file to the list and run the appropriately-modified command dconf write
/org/gnome/shell/favorite-apps "['firefox.desktop',
'org.gnome.Nautilus.desktop', 'my-app.desktop']". (Be careful since you'll
lose your existing favorites if you forget to include them with the dconf
write command.) –
Ben Mares
Feb 17, 2020 at 14:31
1
This answer misses that you have to set the executable bit + mark it as
trusted: askubuntu.com/a/1152748/37881 –
Robert
May 25, 2020 at 11:59
Answer 2