Adding applications to the Favorites menu, GNOME Shell 3.2

Have a CentOS 7 machine I rarely use (and yeah, it's well secured behind firewalls and is rarely online in any case). Getting applications to appear in the Favorites menu in GNOME Shell was ... not as straightforward as it should be. (Drag and drop? Right-click and "add to"? No? Really?) This is for:

gnome-shell-3.28.3-34.el7_9.x86_64

First, find the existing contents:

$ gsettings get org.gnome.shell favorite-apps
['firefox.desktop', 'vmware-workstation.desktop', ... ] 
Next, find the applications you want to add (specifically, their ".desktop" file(s)) , under:
/usr/share/applications/

Now, add those applications to the value (which must be wrapped in " characters) for the favorite-apps key in the org.gnome.shell schema:

$ gsettings set org.gnome.shell favorite-apps "['firefox.desktop', 'vmware-workstation.desktop', 'org.gnome.Screenshot.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Terminal.desktop', 'rhythmbox.desktop', 'libreoffice7.2-writer.desktop', 'libreoffice7.2-calc.desktop', 'org.gnome.Calculator.desktop', 'slack.desktop']" 
Finally, kill gnome-shell with a SIGHUP signal to reload the menu.
$ ps ax | grep "bin/gnome-shell" | grep -v grep
25679 pts/0    Sl     0:28 /usr/bin/gnome-shell
$ sudo kill -SIGHUP 25679
Screenshot showing new items added to Favorites menu in Gnome Shell

 

Comments