I would like to know which command is executed when I click on a given XFCE menu item.

For instance, in my menu, Applications contains an item Users and Groups, but clicking on it does nothing. I would like to run the same program in the command line to see if there are any error messages, but I do not know which command it is.

2 Answers 2


The easiest way to do this is to drag the menu item onto your desktop. Once the icon appears there, right click it, then go to properties, then go to the launcher tab. It will tell you the command there.

Either that or you can grep for the displayed name of you application in /usr/share/applications (location may vary with distro). Then the Exec= line of the file(s) found should contain the command. Eg:

$ grep -rl 'Application Finder' /usr/share/applications/
$ grep '^Exec=' /usr/share/applications/evince.desktop
Exec=evince %U

See here for what the entries in the .desktop files mean.

  • 1
    There is also a menu editor for XFCE. I'm not sure how well it works these days though since it might be a bit outdated.
    – peterph
    Mar 5, 2014 at 16:54

In XFCE, I wan't able to drag a menu item from the applications menu onto the desktop per @Graeme's nifty trick. Grepping around, I found the application menu items are all defined in /usr/share/applications/*.desktop . Grepping that dir for e.g. Name[en_GB]=Screenshot (I suspect that the en_US is just the entry with no langtag: Name=Screenshot), I found that xfce4-screenshooter.desktop has Exec=xfce4-screenshooter. Sure enough, /bin/xfce4-screenshooter was in my path and strongly resembled what I got when I clicked the button.

Voila, a solution at one point in time for one window manager, but the dir /usr/share/applications/ gives me some hope that it will apply to multiple versions of multiple window managers. Good luck out there.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .