This forum has been archived. All content is frozen. Please use KDE Discuss instead.

KMenu process

Tags: None
(comma "," separated)
brigante
Registered Member
Posts
5
Karma
0

KMenu process

Fri Jul 23, 2010 8:51 am
Hola guys =)

please guys, i'm working on a "stuff" for a specific GNU/Linux distro, based on a KDE-3.5.

if possble I would like to know after an installation, which process, or application, insert the launcher and the icon in the K-Menu.

in other words...

if i install the VLC, after i can find in the K-Menu --> Multimedia --> VLC the icon and the launcher of the VLC.

which process or application allow this ?

thanks to all KDE community =)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KMenu process

Fri Jul 23, 2010 11:26 pm
This is done by the placement of a *.desktop file in $PREFIX/share/applications or one of it's subdirectories.

$PREFIX is normally /usr. Once placed in that folder, KDE will pick it up and display it in the menu, at the latest after having logged out and back in again. Please look at the content of one of those files as an example.

This will also add the application to other Desktop Environment menus too.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
brigante
Registered Member
Posts
5
Karma
0

Re: KMenu process

Sat Jul 24, 2010 5:53 am
heya bcooksley,

first of all, thanks for your reply ;-)

yes, i know what you mean, i know how the *.desktop's stuff work.

if i cp, only for an example, kate.desktop on kate_2.desktop and kate_3.desktop, i got 3 entries on my menu like:

kate advanced text editor
kate advanced text editor
kate advanced text editor


and ok.

but, the thing that i want to know is, how this is possible?

all seems based on a daemon that read the content in a specific directory like /usr/share/applications.

pratically i want to know the thing behind the *.desktop's, how KDE read the contents of this specific directory and make his changes on the K-Menu.

another great thanks =)
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: KMenu process

Sat Jul 24, 2010 8:32 am
The KDE Menu is cached by the Sycoca, which contains data on all applications, plugins, protocols, etc. installed on the system. The Sycoca is maintained by "kbuildsycoca4" which is invoked by KDE Daemon (kded4) when it detects changes to the directories used to store the data held in the Sycoca.

KDE applications then use the KService and KServiceGroup classes, which are part of kdelibs to read the data from the Sycoca, and construct a menu from it.

You can see the KServiceGroup documentation here - http://api.kde.org/4.x-api/kdelibs-apid ... Group.html


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
User avatar
anda_skoa
KDE Developer
Posts
783
Karma
4
OS

Re: KMenu process

Sat Jul 24, 2010 11:13 am
On KDE 3.5 this is implemented to some extend withing the panel application "Kicker" (module kdebase).

Cheers,
_


anda_skoa, proud to be a member of KDE forums since 2008-Oct.
brigante
Registered Member
Posts
5
Karma
0

Re: KMenu process

Sat Jul 24, 2010 1:39 pm
great guys =)

can thanks all enough ;)

good work @all


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft