GNOME Shell - how to add a custom favorite app / change favorite's path?
Solution 1
If the application appears in "Activities" overview, then it probably has an associated .desktop
file either in /usr/share/applications/
or in ~/.local/share/applications/
.
Look for the asociated .desktop
file in those two locations. If you find it in /usr/share/applications/
first copy it to ~/.local/share/applications/
. Then edit the copied file using a text editor. Look for an Exec=
line inside the .desktop
file. Change it to a command you prefer.
If you just want to add another command without replacing the current one, you may add a custom [Desktop Action]
in the .desktop
file. Then the second command will be accessible from the context menu (right-click menu). See this answer for reference.
Alternatively, you may create a new .desktop
launcher for the second command which will appear as a separate entry in "Activities" overview. One simple example:
[Desktop Entry]
Comment=A comment to describe the application
Terminal=false
Name=Application name to be shown
Exec=command (with full path) to launch the application
Type=Application
Icon=/path/to/icon/image
If you wish to use a GUI tool to edit application launchers, you may try alacarte
(aka "Main Menu"). You can install it by running
sudo apt install alacarte
Solution 2
1) sudo apt install alacarte
2) Then start alacarte and add a new menu item (in "Applications" folder, the main one),
Name: your_choice
Command: sh -c 'some_command'
some_command could for example be wine ./.wine/drive_c/Program\ Files\ \(x86\)/Siber\ Systems/AI\ RoboForm/identities.exe
or whatever you want to add to the Favorites bar and Activities menu.
3) Add an icon (click on the black/red no access image in the edit view) - use some image as an icon
4) Now go to 'Activities' (top left, Ubuntu) type part of your new item name as the search term (i.e. "your_choice" above). The newly created item (check it's the the right icon), right-click it and say "add to favorites". Adding it once it is started by right-clicking it on the favorites bar often DOES NOT work, especially with wine shortcuts. It has to be this original one.
5) Close the Activities menu and test the new icons in the favorites bar. Enjoy!
Related videos on Youtube
Ondra Žižka
I am. (See my LinkedIn profile. Open to job offers for USA, Germany, Austria, Switzerland). 2012 update: I'm a company-man, a team-player, a paradigm-shifter and a core-competancy-synergizer. :) PS: I worked for Red Hat / JBoss, so my answers may be biased. Currently work for Swiss Re.
Updated on September 18, 2022Comments
-
Ondra Žižka over 1 year
Due to a bug/glitch, I can't use GNOME Flashback for a while. I am forced to use the new GNOME Shell layout. I'm finding it a large leap back in usability. I am not able to customize it the way I can with Flashback. It tries to pretend I am on a tablet. But that's a different story.
I have 2 versions of IntelliJ IDEA installed. When I find "idea" in the screen under Windows key ("Activities" overview), only the older version is found. I can add that through context menu. However, I haven't found a way to add the newer one. Or change the old one's path. I have tried various combinations of Alt, Shift, Ctrl and Super with both mouse buttons, but none gave me the "edit" menu item to change what the icon launches.
How can I add a custom command, or how can I change the path of an existing one?
-
Ondra Žižka about 6 yearsIndeed, I found
/usr/share/applications/jetbrains-idea.desktop
. What puzzles me though - how come there is no editor for these desktop files? Or is it, just not invoked from the menus? -
Ondra Žižka about 6 yearsI have
alacarte
already installed. Do I need to do anything else to make the menu appear? Or is it the button with three bars in the notification area? That resembles the menu, in terms, it has a tree structure. -
Ondra Žižka about 6 yearsNot in Activities. Just the windows, icons and search bar.
-
pomsky about 6 years@OndraŽižka Sorry, I don't get it. Have you managed to launch alacarte? If you have, then you can create a new launcher by clicking the "new item" button. You can also look for an existing launcher in the correct category and edit it. See this screenshot for reference: i.stack.imgur.com/AlruV.png
-
Ondra Žižka about 6 yearsAh, I see, I thought
alacarte
will appear somewhere as a widget, something like a Start button in Windows. Launching it works and I could edit the menu. However, there is no category/group which would map to the bar with icons on the left. (Sorry I lack the words for these UI parts). But at least something :) -
pomsky about 6 years@OndraŽižka If you want to add the launcher to the bar on the left (i.e. Ubuntu Dock) first search for the application in the "activities" search bar, then right click on the launcher icon and select "Add to favourites" .
-
Derrell Durrett about 2 yearsThis answer has the crucial element for me: noting the way to "add to favorites."