LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How making your appli appears in the K-menu??? (https://www.linuxquestions.org/questions/linux-desktop-74/how-making-your-appli-appears-in-the-k-menu-603282/)

robux 11-29-2007 10:34 AM

How making your appli appears in the K-menu???
 
Hello,

I have a project in .sh which is installed in the /bin directory after execute it. But I want also it to appear in the K-menu.
So since it is not a native/system project how can I do this? is there a configuration file?

At this time I have seen those 3 files but it seems that it is not the good :

/usr/share/app-install/desktop/kmenuedit.desktop

/usr/share/apps/kmenuedit/kmenueditui.rc

~/.config/menus/applications-kmenuedit.menu

Have you got an idea?
Thanks
Robux

reddazz 11-29-2007 11:11 AM

You can use the entries in /usr/share/applications as templates to create your own entry for your application.

robux 11-30-2007 02:48 AM

Quote:

Originally Posted by reddazz (Post 2974613)
You can use the entries in /usr/share/applications as templates to create your own entry for your application.

Hello Reddazz thanks for responding.

I do not understand what .desktop are? it means that I have to add a file but which one. I only have a binary of my application?
maybe I have to create a .desktop file?
could you explain in what consist those file and how make appear a new application.

great thanks

Robux

reddazz 11-30-2007 04:50 AM

*.desktop text files that are used for menu entries. You need to create a new *.desktop file for your application and thats why I suggested you look into the existing files in /usr/share/applications for an idea on what you need to do. For example if your app is called foobar and its somewhere in your path such as /usr/local/bin, you can create something like
Code:

[Desktop Entry]
Encoding=UTF-8
GenericName=Some Application
Name=FooBar
Exec=/usr/local/bin/foobar
Icon=/usr/local/share/icons/foobar.png
Terminal=false
Type=Application
Categories=Qt;KDE;

For the catergory part, look at entries for other apps in the same category and use that in your *.desktop file. If its a terminal program, make sure Terminal is set to true.

robux 11-30-2007 07:04 AM

Thanks Reddazz I was writting the .desktop file But One question. I do not understand how indicate the localisation in the K-menu. for example firefox in located like this K-menu->Internet->firefow or Konsole like this K-menu->System->Konsole. Where must I indicate this kind of "path"? Is it in the Desktop file?

All the more, how modification are taken into account? Must I restart to look my app apprear in the K-menu?

thanks

Robux

nx5000 11-30-2007 07:06 AM

This comes from freedesktop standard which KDE follows.

One way to run shell scripts:

Exec=/bin/sh -c /path/to/my/scripts/script.sh

robux 11-30-2007 07:20 AM

Quote:

Originally Posted by nx5000 (Post 2975512)
This comes from freedesktop standard which KDE follows.

One way to run shell scripts:

Exec=/bin/sh -c /path/to/my/scripts/script.sh

Hello nx5000 but I do not understand your response. Maybe I have not explain goodly.
I would like to know how to indicate the localisation in the K-menu. I have seen *.desktop file like for firefox and wireshark but it is not indicated the path "K-menu->internet" in the .desktop file (firefox case) so where must I indicate this information?

And how these modification are taken into account?

Thanks

Robux

nx5000 11-30-2007 08:28 AM

http://standards.freedesktop.org/men...sions-examples

You need to play with categories.

http://www.linuxquestions.org/questi...ion...-567811/

update-menus on debian, this can vary from distro to distro

robux 12-04-2007 03:54 AM

Quote:

Originally Posted by nx5000 (Post 2975577)
http://standards.freedesktop.org/men...sions-examples

You need to play with categories.

http://www.linuxquestions.org/questi...ion...-567811/

update-menus on debian, this can vary from distro to distro

Ok! Thanks all coders!

I wrote a *.desktop file and wrote the "Categorie" field like a similar application appering in the same K-menu place. I place this file in usr/share/application and have restarted. My app appears in the K-menu.

Thnaks

Robux


All times are GMT -5. The time now is 09:18 PM.