3

I'm trying to improve my knowledge in all Ubuntu environments, searching and learning how to write bash and python scripts to customize my Bionic Beaver machine.

I therefore would like to know how to change the pinned applications in my dock via command line. I've found some similar questions here, but most of them were answered for old Ubuntu versions.

This one, that and another describe the list I'm looking for would be stored at com.canonical.Unity.Launcher favorites, however I couldn't find this schema searching through dconf-editor.

Do someone has a clue where could I find it at Ubuntu 18.04 Bionic Beaver? Or perhaps some other way to manage this list via command line?

K7AAY
  • 17,202
artu-hnrq
  • 705

1 Answers1

6

you should know the .desktop file names of your applications..

once you know them.. you can use gsettings command like below

Example:

gsettings set org.gnome.shell favorite-apps "['chromium-browser.desktop', 'google-chrome.desktop', 'org.gnome.Nautilus.desktop', 'org.gnome.Software.desktop', 'audacious.desktop', 'mpv.desktop', 'spotify_spotify.desktop', 'org.gnome.Terminal.desktop', 'libreoffice-writer.desktop', 'gnome-calculator_gnome-calculator.desktop', 'libreoffice-calc.desktop', 'gnome-control-center.desktop', 'org.gnome.tweaks.desktop', 'firefox.desktop']"

what ever order you will give in gsettings command, it will have same order in dash-to-dock

enter image description here

PRATAP
  • 22,460