in reply to Re: Re: How script can add new entries to "Programs" menu on MacOSX?
in thread How script can add new entries to "Programs" menu on MacOSX?

I want to pose the same question, only also for Windows, KDE and GNOME. But let me put it in context. When on Windows I click Start->All Programs and then put my mouse cursor over "Games", I can then see the different games I have installed. Each company that wrote the games I see had to come up with code such that, once installed, their game would show up there. That is my end goal. I want the user to be able to find the program I am writing by navigating under the Start menu. Does perl have any facilities to ease this? Can you think of any keywords I can search for? Things like "Add Program to Windows Start Menu" are coming up with "by hand" methods, not script methods. Thanks
  • Comment on Re^3: How script can add new entries to "Programs" menu on MacOSX?

Replies are listed 'Best First'.
Re^4: How script can add new entries to "Programs" menu on MacOSX?
by Anonymous Monk on Sep 20, 2004 at 18:13 UTC
    I have the answer for Windows XP, 98 and ME. Quite simply, have your script create a shortcut in the proper directory as shown below

    On Windows XP:
    C:\Documents and Settings\All Users\Start Menu\Programs
    C:\Documents and Settings\loginname\Start Menu\Programs (individual user)

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

    The program named by the shortcut will automagically show up under the Windows Start menu

    I still do not know how to do it on Linux KDE, FVWM, Gnome, etc.,
    Anyone out there know?
    ------------------------------------
      I can write the program I need. I only needed to know what needed done. Here are the answers I needed for Linux:


      ---------------------------------
      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, before deciding what to do. At least now I know what has to be done.