Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm developing a program in Qt that will help users to manage (create, edit and delete) their quicklists in Unity launcher.

I got to a point where I created .desktop file and I don't know how to programmatically place that file on Unity launcher.

I found two (bad) ways to do this:

  1. Manually drag and drop created .desktop file to unity launcher
  2. Edit favorites key with "gsettings set com.canonical.Unity.Launcher favorites" and force unity to reload with "unity --replace"

So, I'm searching for a function or a system command that is called on first 'drag and drop' method so I can do it in my program without need for user to do it manually.

I don't even know where (or how) to search for my solution so any suggestions will be helpfull.

share|improve this question
I was also looking for it and found it here:… – user73819 Jun 28 '12 at 14:42

You can add dynamic quicklists at runtime by using DbusMenu. You can read more about that here: That page also describes adding counters, progressbars and setting urgency.

share|improve this answer
I checked that page out but I haven't found what I'm looking for. I need to find out how to emit the same signal that 'drag and drop' action emits to unity process. I can see that DbusMenu is api for IPC but I still don't know if this can be done with it. – Ivan Lučin Feb 26 '12 at 23:13

I would do it this way:

  1. Drop the .desktop file in ~/.local/share/applications. This way it will appear in the application section as well.
  2. Fetch the list of favorites with gsettings get ....
  3. Insert the path to the desktop file in the array using gsettings set.

The dbus idea by Jo seems nicer though. :)

share|improve this answer
This is what I already did but the problem is that unity has to be reloaded with "unity --replace" after a change and that is really ugly. – Ivan Lučin Feb 26 '12 at 19:33

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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