Command for updating or refreshing desktop menu

jupiter jupiter.hce at gmail.com
Mon Nov 26 01:21:05 PST 2012


Thanks Samuli for your kind response. I tried the commands of
"update-desktop-database" and "update-mime-database", they were no
errors, but it did not work.

It is my fault, I apologize for not being clear about the issue. After
having a deep look at the problem, I've just realized it is not
package installation problem, but the "TreExec" issue. Let me try it
again

I have a Linux package designed by someone. The package has two
applications in /usr/share/applications, p1.desktop and p2.desktop.
The p2.desktop actually contains an item of
"TryExec=/usr/local/bin/callback.sh". The /usr/local/bin/callback.sh
would not be available until the application in p1.desktop was
clicked.

According to the xdg spec, once the TryExec path and executable file
is satisfied, the application in p2.desktop should be shown on menu,
but I could not get the application p2.desktop displayed on menu even
the TryExec file was present and was executable.

I've actutally just figured out if I ran "touch
/usr/share/applications/p2.desktop", the application p2.desktop came
to the menu. It seems to me there were something either clearning
cache or triggering event to update menu. Appreciate any clues how to
trig the menu updating without running "touch
/usr/share/applications/p2.desktop".

Thank you.



On 11/23/12, Samuli Suominen <ssuominen at gentoo.org> wrote:
> On 23/11/12 13:02, Sergio wrote:
>>
>>
>> --- Em sex, 23/11/12, jupiter <jupiter.hce at gmail.com> escreveu:
>>
>>> De: jupiter <jupiter.hce at gmail.com>
>>> Assunto: Command for updating or refreshing desktop menu
>>> Para: "xdg" <xdg at lists.freedesktop.org>
>>> Data: Sexta-feira, 23 de Novembro de 2012, 6:38
>>> Hi,
>>>
>>> Is there any command which can be used to updating or
>>> refreshing desktop menu?
>>> When I install my applications which were added to xfce
>>> desktop menu
>>> on CentOS 6.2, showing the application icon on menu were
>>> not
>>> immediately, sometime I have to close the desktop and start
>>> it again
>>> to see new icons showing on the menu. Not clear if there was
>>> cache to
>>> hold the update or if I need to run some commands to force
>>> the menu
>>> update to be effected immediately. Appreciate any helps.
>>>
>>> Thank you.
>>>
>>> Kind regards.
>>>
>>> Jupiter
>
> It's a job for the package maintainer / package manager to take care of
> running update-desktop-database when a .desktop file contains a
> MimeType= line
> And update-mime-database when /usr/share/mime file is installed
> But you can run those too, just run them both, as root to
> /usr/share/applications and /usr/local/share/applications and possible
> as a user to ~/.local/share/applications, or whatever $XDG_DATA_DIRS
> paths you are using
> Then if your kernel is properly configured to include INOTIFY support,
> and the system glib is compiled properly with a support for inotify,
> file changes are immediately picked up
>
> - Samuli
> _______________________________________________
> xdg mailing list
> xdg at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xdg
>


More information about the xdg mailing list