How do I add an icon to the unity dock (not drag and drop)?
You need to change defaults for gsettings key named com.canonical.Unity.Launcher favorites
You can get it's contents with gsettings get com.canonical.Unity.Launcher favorites
and then replace get
with set
and add new favorites enclosing them in "
.
For example:
gsettings set com.canonical.Unity.Launcher favorites "['gnome-terminal.desktop', 'firefox.desktop', 'chromium-browser.desktop' ]"
Related videos on Youtube
samtygier
Updated on September 18, 2022Comments
-
samtygier almost 2 years
I am creating a custom ubuntu live cd and I want to add a few items to the default dock. I think there must be something i can put in /etc/skel so that when the 'ubuntu' user is created at boot time it already has a customised dock.
There are several posts about creating a .desktop file and putting it in .local/share/applications and then dragging it into the dock. This does not help me as it would mean that the livecd user would have to do the dragging and dropping.
Is there a setting file that lists what is currently shown in the dock?
Ideally I want something that works on unity and unity-2d.
-
samtygier almost 12 yearsthanks. thats pretty much what I need. so i can that to run at login. i'll have a play and see if i can put the modified gstetting file into the skel.
-
samtygier almost 12 yearsthat looks like something the user would have to do after booting. I want something that will aready be there when the user first logs in.
-
samtygier almost 12 yearsok, so that change gets stored in ~./config/dconf/user . if i make the changes using gsettings, then copy that file to skel, it works for new users. thanks
-
int_ua almost 12 yearsAFAIU there is an alternative: changing the .xml file containing default value. But it'll be rewritten after update...