LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 11-29-2007, 10:34 AM   #1
robux
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Rep: Reputation: 0
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

Last edited by robux; 11-29-2007 at 10:42 AM.
 
Old 11-29-2007, 11:11 AM   #2
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
You can use the entries in /usr/share/applications as templates to create your own entry for your application.
 
Old 11-30-2007, 02:48 AM   #3
robux
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by reddazz View Post
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
 
Old 11-30-2007, 04:50 AM   #4
reddazz
Guru
 
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 73
*.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.

Last edited by reddazz; 11-30-2007 at 05:17 AM.
 
Old 11-30-2007, 07:04 AM   #5
robux
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
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

Last edited by robux; 11-30-2007 at 07:21 AM.
 
Old 11-30-2007, 07:06 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
This comes from freedesktop standard which KDE follows.

One way to run shell scripts:

Exec=/bin/sh -c /path/to/my/scripts/script.sh
 
Old 11-30-2007, 07:20 AM   #7
robux
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nx5000 View Post
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

Last edited by robux; 11-30-2007 at 07:26 AM.
 
Old 11-30-2007, 08:28 AM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 52
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
 
Old 12-04-2007, 03:54 AM   #9
robux
LQ Newbie
 
Registered: Oct 2007
Posts: 14

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by nx5000 View Post
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Making the gnome menu button nice elispiro Linux - Software 1 06-20-2006 08:49 PM
making a menu item in suse9.2 invinciblegod Linux - Newbie 2 07-20-2005 07:09 PM
making select show its menu in a bash script? zidane_tribal Programming 6 05-02-2005 05:52 AM
Making Menu in Wmaker hexx Linux - Newbie 10 08-20-2003 07:03 PM
Making GRUB menu Squick Linux - Newbie 1 08-08-2003 09:35 PM


All times are GMT -5. The time now is 06:44 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration