Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 62531 - net-analyzer/nmap 3.70 : broken .desktop entry (won't execute on click)
Summary: net-analyzer/nmap 3.70 : broken .desktop entry (won't execute on click)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Michal Januszewski (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-09-01 10:11 UTC by Stephane Loeuillet
Modified: 2004-09-03 06:34 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Stephane Loeuillet 2004-09-01 10:11:44 UTC
when clicking on NmapFE in the gnome 2.6 menu,
i've got a window saying :

"Impossible de lancer l'entr
Comment 1 Stephane Loeuillet 2004-09-01 10:11:44 UTC
when clicking on NmapFE in the gnome 2.6 menu,
i've got a window saying :

"Impossible de lancer l'entrée"
"Détails : Aucune commande (Exec) à lancer"

which means :
impossible to launch this entry, details: no Exec line in .desktop file

the .desktop file is stored there :
/usr/share/gnome/apps/Utilities/nmapfe.desktop
when all other modern desktop files are in :
/usr/share/applications/
(looks like it was the location in gnome 1 times)

there is this line :
TryExec=nmapfe

but the following is missing :
Exec=nmapfe

Reproducible: Always
Steps to Reproduce:
1.
2.
3.
Comment 2 robertc96 2004-09-01 10:51:21 UTC
I believe that if you want nmap to build the nmapfe executable you should have +gtk in your USE variable set in /etc/make.conf. If gtk isn't in your USE variable it won't build nmapfe.

Try recompiling nmap as shown below and see if you still have the same problem, 

USE="gtk" emerge nmap 
Comment 3 Stephane Loeuillet 2004-09-01 11:20:36 UTC
hum, either you misread what i wrote, or i wrote it badly

the nmapfe executable exists and is in an accessible path
-rwxr-xr-x  1 root root 82196 sep  1 19:01 /usr/bin/nmapfe

i used +gtk & +gnome to compile it

nmapfe launched from terminal works
nmapfe launched from gnome 2.6 menu won't, but would display the warning i spoke about
Comment 4 robertc96 2004-09-01 11:39:45 UTC
sorry I misunderstood/misread what you said.
Comment 5 Michal Januszewski (RETIRED) gentoo-dev 2004-09-01 14:22:02 UTC
Does changing "TryExec" to "Exec" in the desktop file work for you (even though it's in /usr/share/gnome/apps and not in /usr/share/applications)?
Comment 6 Stephane Loeuillet 2004-09-01 14:53:23 UTC
having both Exec & TryExec lines works, having Exec alone works, having only TryExec line fails

as a side note, i just saw that nmapfe was present in 2 areas of the menu :
network
system tools

because it interprets this line :
Categories=Application;Network;System;Security;GTK

was it done on purpose ?

i did not have a look at .desktop files spec for a while, so i don't know if this Categories line is really correct. but that's a different issue


the actual location of the file (/usr/share/gnome/apps) is not a problem. gnome 2.6 looks at both /usr/share/gnome/apps (old gnome 1 times) and in /usr/share/applications/ (i don't know if never gnome would do it that way)

for compatibility, as it is a gtk 1 app, it could be good to let it where it is. (for people that still run gnome 1 if they exist). for the future, moving it to the good location should be better (as well as someone porting this app to gtk 2.x)

other apps i have installed that put their desktop file in the old dir are :
/usr/share/gnome/apps/Utilities/nmapfe.desktop
/usr/share/gnome/apps/Applications/gnotime.desktop
/usr/share/gnome/apps/Multimedia/mplayer.desktop
/usr/share/gnome/apps/Internet/pan.desktop
/usr/share/gnome/apps/Internet/gftp.desktop

pan, gftp & gnotime are gtk 2
nmapfe & mplayer still use gtk 1
Comment 7 Stephane Loeuillet 2004-09-02 05:03:14 UTC
from the latest .desktop file specification :
http://freedesktop.org/Standards/desktop-entry-spec/0.9.4/ar01s04.html

TryExec	 Filename of a binary on disk used to determine if the program is actually installed. If not, entry may not show in menus, etc. 	string	NO	NO	1

Exec	Program to execute, possibly with arguments. 	string	NO	YES	1

so, Exec is mandatory, TryExec is not. they don't have the same purpose at all

===========

for the Categories value, we shoud look at the latest menu spec :
http://www.freedesktop.org/standards/menu-spec/0.8/

registered categories are there :
http://www.freedesktop.org/standards/menu-spec/0.8/apa.html

actual value is :
Categories=Application;Network;System;Security;GTK

it should be :
Categories=GTK;Application;Network
or
Categories=GTK;Application;System;Security
or
Categories=GTK;Application;System;Monitor

=========

for the location of the .desktop file itself, the menu spec only talks about /usr/share/applications :
http://freedesktop.org/Standards/menu-spec/0.8/ar01s02.html
and does not speak about legacy old directory structure. (where it is actually)
Comment 8 Stephane Loeuillet 2004-09-02 08:36:35 UTC
as a side note, to be compliant, the Categories line *MUST* end with a ';'

or desktop-file-validate (from desktop-file-utils) would complain :
/usr/bin/desktop-file-validate /usr/share/gnome/apps/Utilities/nmapfe.desktop
/usr/share/gnome/apps/Utilities/nmapfe.desktop: error: value of key "Categories" is a list of strings and must end with a semicolon
Comment 9 Michal Januszewski (RETIRED) gentoo-dev 2004-09-03 06:34:11 UTC
I've left the file where it is (it should be up to the upstream maintainers to move it to /usr/share/applications/) and I've added fixes for the bugs in the .desktop. Thanks for all the hints :)