Subject: FVWM: Automatic application menus

From: Uwe Pross <[email-masked]>
Date: Mon, 2 Feb 2004 13:45:53 +0100

Hi there,

I wondered if there is already a solution to generate fvwm
menus for all (or say most) applications installed on a
system. 

I am looking for a script or a little program which scans
the search paths of my linux installation and makes fvwm
menu definitions for starting these programs.

Cheers, Uwe
-- 
  ,_,   For personal reply/mail put "fvwm"
 (O,O)  in the subject.
 (   )  Otherwise I won't receive your mail.
--"-"----------------------------------------
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 2 Feb 2004 13:32:05 +0000

> menu definitions for starting these programs.

I don't think you want to have one large menu with all thousands of
commands found in /usr/bin and similar places. You probably want to
organize them somehow, and this is a distribution specific thing.

Script fvwm-menu-desktop is designed for such work although it does not
automate the prefix searching, this may be done with a separate wrapper.
fvwm-menu-directory may be useful too with appropriate options passed.
Both are installed on your system with man pages.

Regards,
Mikhael.

---

From: Uwe Pross <[email-masked]>
Date: Mon, 2 Feb 2004 14:50:40 +0100

Hi there,

On 02 Feb 2004 at 13:32:05 +0000, Mikhael Goikhman wrote:

> I don't think you want to have one large menu with all
> thousands of commands found in /usr/bin and similar
> places. 

Right ;-)

> You probably want to organize them somehow, and this is a
> distribution specific thing.

It should not be distribution specific. A perl or awk
script which accesses a application database and checks if
the programs a installed would be nice.

> fvwm-menu-desktop 

DESCRIPTION
     This is a perl script which parses GNOME or KDE menus
     defin- itions to build corresponding FVWM or FvwmGtk
     menus. The script can also build icon and mini-icon
     style commands for the applications.

There is no gnome or kde on my box ;-)

> fvwm-menu-directory

NAME
     fvwm-menu-directory - builds a directory browsing menu
     for FVWM

DESCRIPTION
     A perl script which provides an output to read in with
     PipeRead to build an fvwm menu containing a directory
     listing. Almost everything can be configured.

Also not what I am looking for.

I am looking for a solution which scans _all_ search paths,
say at start time, looks for certain applications, defined
in a database, and sorts them to a set of fvwm menu
definitions. If such a database is available the script
would be quite simple.

Cheers, Uwe

---

From: Mikhael Goikhman <[email-masked]>
Date: Mon, 2 Feb 2004 14:19:55 +0000

> the programs a installed would be nice.

You should first define "database". If it follows the standard format,
then fvwm-menu-desktop should parse it without problems (theoretically).

> There is no gnome or kde on my box ;-)

It parses .desktop files orgamized in directories regardless of whether
it is GNOME or KDE. Is this "database" you speak about?

> Also not what I am looking for.

Depends on the needs. If you know the location of your applications then:

  fvwm-menu-directory --dir /usr/local/bin --exec-app '' --exec-file 'IGNORE_NON_APP' | grep -v IGNORE_NON_APP

> definitions. If such a database is available the script

There is a "database" definition problem here. If your distribution
defined such "database of applications", then describe it.

Regards,
Mikhael.

---

From: Ruslan Kosolapov <[email-masked]>
Date: Mon, 02 Feb 2004 20:48:22 +0600

UP> DESCRIPTION This is a perl script which parses GNOME or KDE menus
 UP> defin- itions to build corresponding FVWM or FvwmGtk menus. The
 UP> script can also build icon and mini-icon style commands for the
 UP> applications.  There is no gnome or kde on my box ;-)

  At first - sorry for very very very bad english :(

  I use Debian GNU/Linux at home, and I have such menu out of the box
  for fvwm too, not for KDE/Gnome only.

  Now I'm at work (and I have there a RedHat clone), so I can't see
  how this feature implemented in Debian.  But I think, if some
  package add itself to KDE menu, this package is not looking for KDE
  installation, and add itself anyway.  Maybe I'm wrong, but you can
  try. 

  In /usr/lib/menu I have an some files like next:

$ cat /usr/lib/menu/vim-X11 
?package(vim-X11):command="/usr/X11R6/bin/gvim" needs="X11" \
icon="gvim.xpm" section="Applications/Editors" \
title="GVim editor" longtitle="All-purpose text editor
  
  I have no KDE/Gnome installed.  So, my suggestion seems right.

 UP> I am looking for a solution which scans _all_ search paths, say
 UP> at start time, looks for certain applications, defined in a
 UP> database, and sorts them to a set of fvwm menu definitions. If
 UP> such a database is available the script would be quite simple.

  Hmmm...  I think, creation of such database is extremly hard task.

  More simply way - parse /usr/lib/menu/* files, or list of installed
  packages.

  Anyway, I don't know any ready solutions of your problem.

-- 
=[ Windows 95/NT - 32 bit extensions and a graphical shell for a 
=[ 16 bit patch to an 8 bit operating system originally coded for a 
=[ 4 bit microprocessor, written by a 2 bit company that can't stand 
=[ 1 bit of competition.
--
Visit the official FVWM web page at <URL: http://www.fvwm.org/>.
To unsubscribe from the list, send "unsubscribe fvwm" in the body of a
message to [email-masked].
To report problems, send mail to [email-masked].

---

From: Uwe Pross <[email-masked]>
Date: Mon, 2 Feb 2004 16:23:01 +0100

Hi there,

> title="GVim editor" longtitle="All-purpose text editor

I have a look at these files at home. I have been pointed
to this already by a privat mail. This seems to be debian
specific. Anyway I have sarge running at home so this might
be a solution.

> Hmmm...  I think, creation of such database is extremly hard task.

Right. That's why I wanted to know if somebody is already
working on such database. 

I have got an old suse installation which has such a
database, which could I use to start with. 

I posted this question to list since I don't want to make
something already exist.

Cheers, Uwe

---

From: Gert Brinkmann <[email-masked]>
Date: Mon, 02 Feb 2004 16:36:08 +0100

> specific. Anyway I have sarge running at home so this might

debian automatically generates the menu named "/Debian" that you can 
include in your fvwm-Menu-definitions using the "menu" utility.

Check out and "Read" this file in your prefs:
/etc/X11/fvwm/menudefs.hook

------- SNIP --------
# Automatically generated file. Do not edit (see 
/usr/share/doc/menu/html/index.
html)

DestroyMenu "/Debian/Apps/Editors"
AddToMenu "/Debian/Apps/Editors" "Editors" Title Top
+ "&Gedit%/usr/share/pixmaps/gedit-icon.xpm%" Exec exec /usr/bin/gedit
+ "G&limmer" Exec exec /usr/bin/glimmer
+ "gv&im%/usr/X11R6/include/X11/pixmaps/vim.xpm%" Exec exec /usr/bin/gvim
------- SNIP --------

Regards,

Gert

---

From: Uwe Pross <[email-masked]>
Date: Mon, 2 Feb 2004 16:43:12 +0100

Hi there,

On 02 Feb 2004 at 16:36:08 +0100, Gert Brinkmann wrote:

> debian automatically generates the menu named "/Debian"
> that you can include in your fvwm-Menu-definitions using
> the "menu" utility.
> 

I'll have a try tonight. Thanks for the hint.

Cheers, Uwe

---

From: Uwe Pross <[email-masked]>
Date: Mon, 2 Feb 2004 21:55:49 +0100

Hi there,

> I'll have a try tonight. Thanks for the hint.

Great :-) After installing the debian fvwm package I got a
file /etc/X11/fvwm/DebianMenu which contains all the menu
definitons I wanted.

Thanks a lot for the hint and thanks to the one who built
the deb-package - great work! 

Cheers, Uwe