3

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.

2 Answers2

6

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' ]"
int_ua
  • 8,574
  • thanks. 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 Jun 28 '12 at 20:51
  • ok, 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 – samtygier Jun 28 '12 at 21:03
  • AFAIU there is an alternative: changing the .xml file containing default value. But it'll be rewritten after update... – int_ua Jun 29 '12 at 13:50
0

You can use Ubuntu Tweak for this . Then launch it , Under Admins menu , in Personal , Scripts , here

enter image description here

Drag the Create Launcher option from Disabled scripts to Enabled scripts column, then go to the folder where you have the file to be added to the launcher and right click anywhere on the folder and select Scripts -> Create Launcher from the context menu.

Create Launcher dialog box will pop up. Enter the desired name, browse for the file, Add an icon and comment if you need.

The launcher is created in the current folder so drag the launcher to the Unity Launcher panel and you are done.

If the script doesn’t show up in the context menu restart Nautilus (File manager) using the following command

nautilus -q

Source

atenz
  • 12,772
  • that 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 Jun 28 '12 at 20:55