I have been wanting to inspect the executable lines from these application shortcuts for several applications as I am having trouble opening each, or would like to know what settings they use by default to start the program.

Any way, I would like to know how to do this. It is a common flow for me to see how the program was set-up and inspect where it is failing at each step in the process. I do this in Windows a lot and end up right-clicking the shortcut in the Start Menu or Taskbar, with or without modifier keys being held down at the same time so that I can get the correct context menu items to show up, and select "Properties".

I would like the equivalent in Linux-based OS distributions, for at least Ubuntu, Mint, and elementaryOS.

For more information: I am still learning how things are usually for these types of operating systems, but through some non-trivial amount of effort, have found that the information I am looking for is usually stored as *.desktop files, and they can be found under at least these 3 directory paths:

  • /usr/local/share/
  • /usr/share/applications/
  • ~/.local/share/applications/

For example, I want to create a shortcut to the "Remote Desktop Viewer" application that comes with elementaryOS, so that it opens a connection to a certain host automatically, without having me to click buttons and enter in connection information into the dialog. I would like to avoid having to do guesswork for internet searching for the matching command line executable.

Edit: Found out the application executable file's name was "Vinagre"; who would have thought of that..
This is the trouble I would like to avoid in the future :)

  • In these distributions, you can install alacarte which lets you edit menu entries. Otherwise, as you noted, the information is in .desktop files in the given locations (in particular, the Exec line). – muru Aug 5 '15 at 20:09
  • Excellent! That does provide the link in the specific direction I was needing: With you first looking at the application shortcut menu entry, then having it open the appropriate shortcut file, and showing (at least some) of that information. How about you add that comment as an answer instead so I can accept it? :) – Pysis Aug 5 '15 at 20:13

You can install alacarte to you edit menu entries.

In Debian-based distributions:

sudo apt-get install alacarte

Otherwise, as you noted, the information is in .desktop files in the given locations (in particular, the Exec line).

I just do:

grep -iR "name that shows up in menu"  ~/.local/share/applications /usr/share/applications

Then just look the the Exec lines of the files which seem to be likely candidates.

| improve this answer | |
  • The grep approach is certainly one way of doing it, once you are familiar with the usual shortcut paths of course, but the alacarte tool seems to accomplish the best approach, among other functionality, so thanks! – Pysis Aug 5 '15 at 20:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.