Subject: Re: pkgsrc automagic menu generation using .desktop files (was Re:
To: None <firstname.lastname@example.org>
From: Julio M. Merino Vidal <email@example.com>
Date: 06/14/2005 18:26:32
On Tue, 2005-06-14 at 18:07 +0200, Geert Hendrickx wrote:
> On Tue, Jun 14, 2005 at 05:35:16PM +0200, Julio M. Merino Vidal wrote:
> > [ discussion about including a .desktop file in distcc-gtk ]
> > The thing is that we will add a framework to pkgsrc to generate menus
> > for whichever window manager you have installed. So, if someone
> > chooses distcc-gtk, he will want to see it in the menu (be it fluxbox,
> > wmaker or whatever); hence, the need for it. (Or for example, if you
> > are a KDE user, you'll probably prefer distcc-gtk over distcc-gnome,
> > and you'll want your application to appear in the menu.)
> Well, I'm all PRO the idea of having window manager menus automatically
> generated by pkgsrc (in a consistent way across window managers) !
> But would we rely on .desktop files provided by the packages source
> itself? This would imply adding one when there is none, or patching it
> if it doesn't meet our requirements, etc...
Yes, that's the plan. .desktop files are rich in content and are
becoming a de-facto standard in menu generation, like it or not. This,
together with the menu specification (both at freedesktop.org), you can
achieve nicely laid menus from a set of .desktop files (and handle
icons, mime-types, locale names, et al).
Search the tech-pkg@ archives. There was a thread with reed@ and me
(at least) this year about which could be the procedure to follow.
> I would opt for an abstract pkgsrc framework. Some extra variables in
> the packages Makefile, or a MENU (or call it DESKTOP) file in each pkg
> directory, containing all the necessary information. We could define
> the structure of it ourselves, and package maintainers could stil
> consult the package's own .desktop file when generating the MENU file
> (this could even be automated?).
But we'd be reinventing the wheel and adding more work to maintainers.
As a data point, Debian is planning (or already doing, I'm not sure) a
new menu system based on .desktop files rather than its own thing.
I guess other distributions already do it.
> I volunteer to help developing such thing. But not alone. Were there
> volunteers for the menu-generation framework already?
I already have some code in place to ease the installation of .desktop
files from packages that don't provide them. I think I'll commit this
when the freeze ends (though I've had it for a very long time).
The next step could be to adapt some of the existing menu-processing
utilities to do what we need. (Creating one from scratch is not worth
it, I'd say.)
Julio M. Merino Vidal <firstname.lastname@example.org>
The NetBSD Project - http://www.NetBSD.org/