2

I have written my first unity launcher shortcuts and places them in ~/.local/share/applications/.

The problem is that the shortcuts won't update on any of the commands I trigger in the terminal.

$ sudo updatedb
$ update-desktop-database

Only when I log out and log back in then the shortcuts will update.

I have tried putting the shortcuts in root directories /usr/share/applications/ and then the shortcuts are being updated instantaneously.

What is the problem here ? What is triggered on log out that trigger the update ?

EDIT

I have tried this answer https://askubuntu.com/a/353216/23006 to launch

$ unity --replace 

but it won't help.

What will help is to go to AltCtrlF1-6 and restart lightdm by

$ sudo service lightdm restart

But let's be honest - that's not really a solution to restart the whole DE for one unity launcher...

4
  • 1
    I am not sure what your problem is. The default situation is that the launcher "reads" from the desktop files in /usr/share/applications. On log in, the possible desktop file(s) in ~/.local/share/applications` overrule the global ones. Standalone desktop files can be added to the launcher as well. If you copy a global desktop file to the local directory, the system still links to the global one, until next login. from then on, changes yo make in the local one should be applied at once. is that not the case? Mar 14, 2014 at 16:54
  • @Jacob I had no idea about this. Can you provide a link to information on this? You can also answer that question so that I can accept it.
    – Patryk
    Mar 14, 2014 at 18:32
  • I will try to find a link about this. If I find some usefull information I'll post it back. Mar 14, 2014 at 18:51
  • 1
    here is some, no doubt good, information: help.ubuntu.com/community/UnityLaunchersAndDesktopFiles . The practical procedure about logout/login is not described however, but I assume it is similar to all global settings, themes etc, which are overruled by their local equivalents. Mar 14, 2014 at 19:13

2 Answers 2

3

the "standard" situation is that the launcher reads it's information from the .desktop files, located in /usr/share/applications. That is, unless the same application is represented by a local version of the .desktop file in ~/.local/share/applications.

However, when you copy a .desktop file to ~/.local/share/applications/ directory, the system still links to the global one, until next login.

From then on, the launcher links to the local .desktop file, and the changes you make in that local .desktop file take effect instantly. A Standalone quicklist (a "home made" .desktop file, not calling an existing installed application in its native execute line) is best located in the local directory.

0

Have you tried the following?

update-desktop-database ~/.local/share/applications/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .