LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions
User Name
Password
Linux - Distributions This forum is for Distribution specific questions.
Red Hat, Slackware, Debian, Novell, LFS, Mandriva, Ubuntu, Fedora - the list goes on and on... Note: An (*) indicates there is no official participation from that distribution here at LQ.

Notices


Reply
  Search this Thread
Old 06-03-2004, 07:15 PM   #1
swmcquig
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Rep: Reputation: 0
adding menu items


I am trying to find a way to add a menu item with submenu items to the main menu
during application installation. I was wondering if Mandrake, TurboLinux, SuSE, Debian use(s) an approach
similar to other flavors (.desktop, .directory and .menu) (and where the files would
be dropped) or if a unique approach is used under the particular vendor. I was also hoping someone
would be kind enough to provide me with, or direct me to, more information on adding
menu items under said flavors.

Summing my issue, I would like my installer to load the application, place an icon
on the desktop, and add menu items to the menu. The last being the outstanding
issue at the moment.

Thank you so much in advance for your time in responding. Your help will be
sincerely appreciated.

Regards,
Scott
 
Old 09-20-2004, 08:11 PM   #2
nooninm
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
adding menu items

Hello Scot,

I have exactly the same needs. Have you found where to get started? All keyword searches so far show how to manually add a new name to the "Start" menues. As I am sure you know, that does not help at all. I have found out how to do it on Windows. It is really easy. Simply have your program add a shortcut in the proper directory and the shortcut name automagically appears in the Start menu system.
On Windows XP:
C:\Documents and Settings\All Users\Start Menu\Programs\YourAppName (all users)
C:\Documents and Settings\loginname\Start Menu\Programs\YourAppName (individual user)

On Windows 98 and Windows ME: c:\Windows\Start Menu\Programs\YourAppName

Have you gotten any answers for in the Linux world yet?

For KDE, I found http://pdx.freedesktop.org/Standards...-spec-0.7.html
It is well over 600 lines and it looks like I'll have to read most of it. I am guessing there are many thousands of pages of documentation to be digested in order to be able to do this for Gnome, FVWM, and others? What are the documents that I need to read that would lead me to answers? What have you found? Any keyword seach tips? Any other thoughts on this.

Thanks
 
Old 09-20-2004, 09:24 PM   #3
swmcquig
LQ Newbie
 
Registered: Jun 2004
Posts: 2

Original Poster
Rep: Reputation: 0
I have spent a lot of time on this subject and I was able to automate the process for both KDE and Gnome. KDE is much much simplier! Instead of following the standards ( from freedesktop ) I did the following:

1. make a directory in /home/(user)/.kde/share/applnk/(appname)
2. create a .directory file in this directory, you can find info about .directory via search its like 5 lines of code with type=directory
3. add .desktop files for each of your programs to be launched.

you can also follow the same procedure for creating sub-directories, etc. The advantage of this is that the menu will not require root privileges.

Hope that gives you a solid start, if you run into problems re-post and i will reply!

Good Luck!
-scott
 
Old 09-21-2004, 03:28 PM   #4
nooninm
LQ Newbie
 
Registered: Sep 2004
Posts: 3

Rep: Reputation: 0
adding menu items

Thanks Scot. That guided me to a lot of the answers I needed. Windows answers are listed in a prior thread. Here are some Linux answers.

---------------------------------
For Lindows ( I think Lindows is Debian based)
use /usr/share/applnk/Applications
Example: OpenOffice spreadsheet:
/usr/share/applnk/Applications/Business/OpenOffice/spreadsheet.desktop
Just use the spreadsheet.desktop as a guide.
--------------------------------

For Mandrake KDE
use /home/loginname/.kde/share/applnk-mdk
Example: xemacs editor
/home/loginname/.kde/share/applnk-mdk/Applications/Editors/xemacs.desktop

--------------------------------
For Mandrake Gnome
use /home/loginname/.gnome2/apps-mdk/Applications/Editors/Xemacs.desktop

BTW: I copied
/home/loginname/.gnome2/apps-mdk/Applications/Editors/Xemacs.desktop
to
/home/loginname/.kde/share/applnk-mdk/Applications/Editors/xemacs.desktop
and it worked without modification!

--------------------------------
For Mandrake IceWM
use /home/loginname/.icewm/menu
Example: xemacs editor
Besides the file name being "menu", there are a lot of sections within it such as "menu "Editors"" below.
I added the line "prog "Xemacs" - /usr/local/bin/xemacs"

menu "Editors" /usr/share/icons/mini/editors_section.png {
prog "Emacs" /usr/share/icons/mini/emacs.png emacs
prog "GEdit" /usr/share/icons/mini/gedit.png /usr/bin/gedit
prog "KHexEdit" - khexedit
prog "KWrite" - kwrite
prog "Kate" - kate
prog "Xemacs" - /usr/local/bin/xemacs
}
--------------------------------

Now it is clear the types of things to look for on different platforms. I will be downloading other window managers and looking for the same sorts of things. The script that gets written must search out the directory structures as above and add/change the stated files accordingly. The new application will automatically appear in the "Start" menu.

A note of caution. There is a .gnome and a .gnome2 local directory. Any script will have to look in any and all .gnomeX.Y directories for a valid directory structure, and/or valid .desktop files. Or maybe just add to each such directory found. Whatever, but at least now I know what has to be done.

Thanks again
 
  


Reply



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
Adding items to the start menu hongman Linux - Newbie 1 02-21-2005 03:43 PM
Adding Menu Items hiteshmaisheri Linux - Software 3 04-09-2004 04:41 AM
adding gnome menu items abs Slackware 4 02-14-2004 03:50 AM
Adding menu items seeone Slackware 2 12-15-2003 09:51 PM
adding items to fluxbox menu..... calvinchan2 Linux - Newbie 3 08-23-2003 01:37 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration