![]() Registered Member ![]()
|
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 =) |
![]() Administrator ![]()
|
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] |
![]() Registered Member ![]()
|
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 =) |
![]() Administrator ![]()
|
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] |
![]() KDE Developer ![]()
|
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.
|
![]() Registered Member ![]()
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft