Bug 5225 - 'wmconfig' confused by ".directory" files in GNOME (which have'name' but no 'exec')
'wmconfig' confused by ".directory" files in GNOME (which have'name' but no '...
Status: CLOSED CURRENTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: wmconfig (Show other bugs)
6.0
All Linux
low Severity low
: ---
: ---
Assigned To: Cristian Gafton
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-09-19 11:06 EDT by Jeff Morriss
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 1999-10-05 02:16:03 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Jeff Morriss 1999-09-19 11:06:56 EDT
After installing GNOME on my Redhat 6.0 system I noticed
that a lot of the the menus in 'fvwm2' had an entry with the
same name as the title of the directory but which didn't do
anything when clicked on.

Investigation showed this in the (generated) fvwmrc file:

# The following is added by package: Games
AddToMenu       AUTO_WM_CONFIG.Games    "Games" Exec    &


Further investigation showed that this line was being added
by 'wmconfig'(v 0.9.5) when it parsed
"/usr/share/gnome/apps/Games/.directory".  That
file, I guess, contains info that GNOME uses when it
generates menu titles.

I think the easiest (and probably correct) fix is to change
(in "input-gnome.c" in 'read_gnome_file()'):

    if (!dentry->name && !dentry->exec[0]) {
        gnome_desktop_entry_free(dentry);
        return -1;
    }

to:

    if (!dentry->name || !dentry->exec[0]) {
        gnome_desktop_entry_free(dentry);
        return -1;
    }

That way if, in general, there is some config file out there
which gives no 'exec' line, it won't be added to the menu.

ps.  I noted that this has not been changed in 'wmconfig'
0.9.7, either.
Comment 1 Cristian Gafton 1999-10-05 02:16:59 EDT
I recompiled wmconfig to ignore the dot  entries in a directory. The
wmconfig binary out of 6.1 should work okay (and continue to work with
6.0, fwiw)

Note You need to log in before you can comment on or make changes to this bug.