Ubuntu – How to move icons in the Unity Launcher permanently, i.e. it survives a reboot

12.04iconslauncherrebootunity

There are plenty of answered questions regarding this subject but how on earth can icons be moved permanently so that after the next boot they are where they were left? Some icons to programs I use a lot were installed the most recently, so consequently their Unity launcher icons are at the bottom of the bar, neatly "folded away." The machine is an old Sempron-powered HP/Compaq NX6325 so its grossly under spec'd for 12.04LTS with Unity – which I like – but this makes it frustrating.

I have found that newly installed programs' icons are placed at the bottom, so yes, I can remove lesser used programs which are near the top of the launcher and then reinstall them but this seems a ridiculous way to have to organise it.

I can't be the only one with more than 16 launchers in Unity!


To Rinzwind:

…the normal action after that is to drag it to another place. Is
that not working!?

Yes it works fine. But after a reboot the menu goes back to how it was before I dragged them to new locations. Sorry if that's not clear from my original post but I don't know how to elaborate on it. See my response below to chaskes, maybe that will help.

This is a permanent action.

Not on my machine it isn't. I used to be able to move the icons permanently but now I can only change their positions until I reboot. I couldn't say for sure when the problem first presented.

To chaskes:

I know how to do all this stuff but, from my original post:

…how on earth can icons be moved permanently so that after the next
boot they are where they were left?

I'm trying to say that I have the following icons, in this order:
Dash Home, Chromium, Firefox, Thunderbird, Blue Fish, Filezilla, Picasa etc. I can move them wherever I want. But if I reboot they are back in the order shown above, as though this is a default order. It's not alphabetical, as you can see.

To blvdeer:
Yes, you understand what I want and you are getting near, I think. If I run the command you gave:

gsettings get com.canonical.Unity.Launcher favorites

I get this:

['chromium-browser.desktop', 'firefox.desktop',
'/home/Scooby2/.launcher/Thunderbird.desktop', 'bluefish.desktop',
'filezilla.desktop', '/home/Scooby2/.launcher/Picasa 3.desktop',
'gimp.desktop', ....]

(The four dots represent the rest of the file, omitted for simplicity.) It is slightly different in its content, I don't know why. However I can then drag the icons to where I want them. If I run the same command again, the list shows the new order – which I can save to a file or script. However if I run

gsettings set com.canonical.Unity.Launcher favorites
"['/usr/share/app-install/desktop/dvdstyler-data:dvdstyler.desktop',
'kde4-kdenlive.desktop', 'gimp.desktop', 'vlc.desktop',
'ssvnc.desktop', ....]"

(The four dots represent the rest of the file, omitted for simplicity) I get this:

Usage: gsettings [–schemadir SCHEMADIR] set SCHEMA[:PATH] KEY VALUE

Set the value of KEY to VALUE

Arguments: SCHEMADIR A directory to search for additional schemas
SCHEMA The name of the schema PATH The path, for relocatable
schemas KEY The key within the schema VALUE The value to
set

If this command would run I could put it in a script to run at start-up to rewrite the Unity Launcher order – problem not solved but a work around effected. Looking at the man page for gsettings and Googling for help makes me realise how complex this is and how little I know. Does anybody have any ideas?

Best Answer

To change the order of icons in the Launcher, you can drag them to a new position. Just left click the icon and hold, drag it to where you want it to be, then release。

A note on the click and hold: You can immediately drag the icon to the right; that is, off the launcher before dragging it back to a new position. Before you can move the icon vertically without dragging it off the launcher, you need to wait a second or two before moving it. Otherwise, you will scroll the launcher icons. (Thanks to Catskul for this point.)

To remove icons from the Launcher, right click the icon and choose Unlock From Launcher

To prevent newly installed programs from automatically being added to the Launcher, change the the setting in the Software Center. Click View in the menu, then uncheck 'New Applications in Launcher'

In response to a comment from the OP:

If these changes do not persist after a reboot, try reinstalling libdconf0, a suggestion from Unity reset after restrarting.

sudo apt-get install --reinstall libdconf0