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?

3
  • 2
    The questions you linked are for the Unity Launcher for the Unity environment. They are not applicable to Ubuntu Dock (or Dash to Dock) in GNOME 3 environment. Possible duplicate of Cannot add custom launcher to Dock (*Add to Favorites*) – pomsky Oct 22 '19 at 18:29
  • 2
    I think we were right to close this as a duplicate of that question, but if it does not tell you what you need to know, then you can edit this to mention that (and clarify the reason it does not) and your edit will automatically get the question reviewed for possible reopening. – Eliah Kagan Oct 22 '19 at 18:38
  • 2
    Right, the linked question really take my doubts out. And PRATAP answer bellow have helped too. Thanks to everybody! – artu-hnrq Oct 22 '19 at 19:52
4

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.