← Back to team overview

c4c-dev team mailing list archive

Re: Application for Generating / Customizing Menu Entries

 

Guys,

I haven't actually tries to install and run menu yet - though I did
download it. I thought I'd try once more to follow the freedesktop
standard. This *should* provide the base on which to build upon.

I created christian.menu in /etc/xdg/menus/applications-merged/ with the
following contents:

<!DOCTYPE Menu PUBLIC "-//freedesktop//DTD Menu 1.0//EN"
     "http://www.freedesktop.org/standards/menu-spec/1.0/menu.dtd";>
    <Menu>
      <Name>Applications</Name>
      <Menu>
        <Name>Christian</Name>
        <Directory>Christian.directory</Directory>
        <Include>
            <Category>Christian</Category>
        </Include>
      </Menu> <!-- End christian -->
    </Menu>

And Christian.directory in /usr/share/desktop-directories/ with the
following contents:

[Desktop Entry]
Type=Directory
Encoding=UTF-8
Name=Christian
GenericName=Christian
Name[AF]=Christian
Name[en_GB]=Christian
Name[KA]=Christian
Name[MK]=Christian
Name[ST]=Christian
Name[TG]=Christian
Name[TS]=Christian
Name[en_US]=Christian
Name[UZ]=Christian
Name[en_ZA]=Christian
Name[ZU]=Christian
Comment=C4C SubMenu
Comment[AF]=C4C SubMenu
Comment[en_GB]=C4C SubMenu
Comment[KA]=C4C SubMenu
Comment[MK]=C4C SubMenu
Comment[ST]=C4C SubMenu
Comment[TG]=C4C SubMenu
Comment[TS]=C4C SubMenu
Comment[en_US]=C4C SubMenu
Comment[UZ]=C4C SubMenu
Comment[en_ZA]=C4C SubMenu
Comment[ZU]=C4C SubMenu
Icon=/usr/share/christian/icons/Christian-Menu.png

And 12_apostles.desktop in /usr/share/applications/ with the following
contents:

[Desktop Entry]
Name=12 Apostles
Exec=gnash /usr/share/christian/12-apostles/The_Twelve_Apostles.swf
Comment=Quiz & Memory Game
Icon=/usr/share/christian/icons/The12.png
NoDisplay=false
Categories=Christian;
Type=Application
GenericName=12 Apostles
Name[AF]=12 Apostles
Name[en_GB]=12 Apostles
Name[KA]=12 Apostles
Name[MK]=12 Apostles
Name[ST]=12 Apostles
Name[TG]=12 Apostles
Name[TS]=12 Apostles
Name[en_US]=12 Apostles
Name[UZ]=12 Apostles
Name[en_ZA]=12 Apostles
Name[ZU]=12 Apostles
Comment[AF]=Quiz & Memory Game
Comment[en_GB]=Quiz & Memory Game
Comment[KA]=Quiz & Memory Game
Comment[MK]=Quiz & Memory Game
Comment[ST]=Quiz & Memory Game
Comment[TG]=Quiz & Memory Game
Comment[TS]=Quiz & Memory Game
Comment[en_US]=Quiz & Memory Game
Comment[UZ]=CQuiz & Memory Game
Comment[en_ZA]=Quiz & Memory Game
Comment[ZU]=Quiz & Memory Game

But alas; it doesn't work. It should, but it doesn't. I remember trying
a very similar approach with the LXDE menu before. What finally did work
(at least up until Lubuntu 15.04) was the method described here:
https://lkubaski.wordpress.com/2012/11/02/adding-lxde-start-menu-sections/
and this is and what I based the Christian menu (and Christian Games
sub-menu before) on in the C4C Lubuntu ReSpins. Maybe it's (a) specific
file(s) Lubuntu adds that overrides the freedesktop standard way? Or,
I'm not adding these files in the correct places?

Eric

On 05/27/2015 07:53 PM, Israel wrote:
> Hi,
> Yeah it is unfortunate in some ways, but it also gives us a lot of
> Liberty.  Which is something I know we are big fans of :).  Wherever the
> Spirit of the Lord is, there is freedom/liberty.  So having the liberty
> to install a variety of Desktops is great!  It means I can run the same
> OS on a computer that has 128MB RAM as on a computer that has multiple
> Gigs of RAM.
> I can also use a flashy neat looking DE, or a very nice looking minimal
> DE, etc...
>
> I can also hack around and build my own distribution :)  With custom
> menus and great content!
>
> On 05/27/2015 04:57 PM, KI7MT wrote:
>> Hi Israel,
>>
>> Yes, this will take some testing to figure out the best route for each
>> Desktop as they all do things slightly different, which is annoying,
>> as that is what the freedesktop standard was written to try and
>> prevent :-) .. So much for a standard way of doing things ey' :-)
>>
>> best regards,
>>
>> Greg.
>>
>> On 5/27/2015 2:37 PM, Israel wrote:
>>> Hi,
>>> Menu xdg is probably more appropriate since LXDE uses xdg menus, though
>>> I could be wrong...
>>> I think testing out how this would work is going to be the best first
>>> step.
>>> I install both menu and menu-xdg in ToriOS.  But, menu xdg may only be
>>> needed for things like xdg-user-dirs (ie. ~/Music, ~/Videos, ~/Pictures,
>>> etc..)
>>> It has been a long time since I last looked at all of that, and I needed
>>> the XDG portion to create a Places menu plugin for JWM, that would be
>>> localized to the user's language.
>>>
>>> I think you may be on to something!
>>>
>>> On 05/27/2015 03:29 PM, KI7MT wrote:
>>>> Hi Israel,
>>>>
>>>> I don't think menu, the package, is on the default manifest for either
>>>> Ubuntu or Lubuntu. I had to install it on my main Ubuntu development
>>>> box. I believe there's only one or two dependencies that are not on the
>>>> default manifest ( install-info and l10n ), both are minor. Another
>>>> tool
>>>> to look at is: menu-xdg
>>>>
>>>> So yes, each desktop that supports menu-enable would possibly have a
>>>> different requirement, but once the basics ( the core ) are figured
>>>> out,
>>>> it should not take allot of effort to port it to the various Desktops.
>>>>
>>>> Maybe a PPA for each supported distro would be an easy route, thus
>>>> reusing most of the primary code then adding just the menu / package
>>>> tweaks for the desktop in question.
>>>>
>>>> Time for another Blueprint it seems; mapping out the menu requirements
>>>> for each desktop we plan to support :-)
>>>>
>>>>
>>>> best regards,
>>>>
>>>> Greg
>>>>
>>>>
>>>> On 05/27/2015 02:04 PM, Israel wrote:
>>>>> Hi Greg!
>>>>> I use this in ToriOS.
>>>>> I use update-menus to run my script to generate the JWM specific
>>>>> menus.
>>>>> Menu files are problematic, as many many many (maybe most?)
>>>>> programs do
>>>>> not create a menufile.
>>>>> Most menu generation programs rely heavily on the desktop files in
>>>>> /usr/share/applications.
>>>>> These files also contain the name, icon, category, etc..  The
>>>>> advantage
>>>>> with desktop files is the ability to have icons with no extention, or
>>>>> path... so various themes can use various icons.
>>>>> For example, Lubuntu uses Rafel's Box icon theme, this is much
>>>>> different
>>>>> from the default Ubuntu Humanity/ubuntu-mono theme.
>>>>> ToriOS uses Numix.
>>>>> If I install Xiphos in ToriOS the icon is a big red circle with a
>>>>> cross.  This is different from Ubuntu, which uses many 'default'
>>>>> icons.
>>>>> Those icons *should* be installed in either hicolor/scalable/apps
>>>>> or hicolor/48x48/apps.  Many programs do not know/do this... either.
>>>>>
>>>>> So, after saying all that... the menufile portion might be
>>>>> helpful.  Is
>>>>> it installed by default in Lubuntu?
>>>>> I don't currently have a running Lubuntu (all my old PCs are running
>>>>> ToriOS right now).
>>>>>
>>>>> On 05/27/2015 11:16 AM, KI7MT wrote:
>>>>>> Hello All,
>>>>>>
>>>>>> While working on another project, I ran into a package they may
>>>>>> assist
>>>>>> in menu management for C4C, appropriately named "menu" :-) Note, the
>>>>>> package says "Debian menu system" but that also applies to Ubuntu
>>>>>> menu-aware Desktops.
>>>>>>
>>>>>> Package Info:
>>>>>> http://packages.ubuntu.com/trusty/menu
>>>>>>
>>>>>> * install-menu
>>>>>> Description
>>>>>> update-menus(1) computes the list of menu entries and passes it in
>>>>>> turn
>>>>>> to  the  menu methods in /etc/menu-methods/. The task of a menu
>>>>>> methods
>>>>>> is to generate menus  for  a  specific  window  manager.  
>>>>>> install-menu
>>>>>> provides  a  generic and customizable way to do that. The
>>>>>> documentation
>>>>>> of the install-menu definition language is available in the Debian
>>>>>> Menu
>>>>>> manual, a local copy being available in /usr/share/doc/menu/html.
>>>>>>
>>>>>> Link:
>>>>>> http://manpages.ubuntu.com/manpages/trusty/man1/install-menu.1.html
>>>>>>
>>>>>> * update-menus
>>>>>> Description:
>>>>>> Before the advent  of  update-menus,  when  the  system 
>>>>>> administrators
>>>>>> installed  a  package  onto  a  Debian  system, they would need to
>>>>>> edit
>>>>>> various window manager configuration files to make the new program
>>>>>> show
>>>>>> up  on, for example, fvwm's menus. The menus could easily become
>>>>>> out of
>>>>>> sync with what programs were actually available, with some  menu 
>>>>>> items
>>>>>> that didn't work, and other programs that lacked a menu entry. 
>>>>>> update-
>>>>>> menus and Debian's menu package aim to solve this problem.
>>>>>>
>>>>>> http://manpages.ubuntu.com/manpages/trusty/man1/update-menus.1.html
>>>>>>
>>>>>> * menufile
>>>>>> Description:
>>>>>> Menu files  add  entries  to  the  Debian  menu  system.  The  system
>>>>>> administrator can place menu files in /etc/menu/ to override menu
>>>>>> files
>>>>>> that  packages add to /usr/share/menu/ .  The user can place menu
>>>>>> files
>>>>>> in ~/.menu/ to override all other menu files.
>>>>>>
>>>>>> Link http://manpages.ubuntu.com/manpages/trusty/man5/menufile.5.html
>>>>>>
>>>>>>
>>>>>> best regards,
>>>>>>
>>>>>> Greg.
>>>>>>
>>>>>>
>>>
>



Follow ups

References