41

How can a user determine the path to an application being showed in launcher?

This is meant for non-programmers or experts, so terminal commands are not really suited for them. Why: we need to make our users able to drag files/folders on our applications, a standard OS feature entirely missing in Ubuntu.

1
  • You ask for answers for non-programmers or experts. Pilot6's answer is pretty close to what you want - typically .desktop files for each app are located in /usr/share/applications but not always. Would you consider a shell script that I can write and show how to set up , or you do not want to deal with command-line at all ? The script can determine each file's location and exact location of the executable binary Jul 31, 2016 at 13:01

3 Answers 3

34

Go to /usr/share/applications or ~/.local/share/applications, right-click the application icon and click on "Properties".

I do not see a reason why a person who can't run a command in terminal would need a path.

10
  • 2
    There might also be user-specific .desktop files in ~/.local/share/applications.
    – Byte Commander
    Jul 31, 2016 at 12:48
  • It is a rare case, mostly when manually installed or wine related.
    – Pilot6
    Jul 31, 2016 at 12:49
  • Upvoted, but I agree with Byte Commander - you should mention other possible locations. For instance, Microchip's MPLAB IDE installs all of its files into /opt directory Jul 31, 2016 at 12:56
  • 1
    thanks, the reason for no terminal: being able to drag files/folders on a application, a standard OS feature totally absent in Ubuntu.
    – xamiro
    Jul 31, 2016 at 15:21
  • 1
    The reason why people need paths is that even when a developer goes through the trouble to make a GUI they will still put a text field in there asking users to provide e.g. "the path to Google Chrome". It sucks, but it's still infinitely better than a terminal.
    – Andreas
    Oct 18, 2017 at 11:55
22

In 18.04 and later launch an application by clicking on its icon in the Dash which is accessed by clicking the 9 dots icon in the lower left corner of the dock. Launch the System Monitor and make a note of the exact spelling of the name of the application that you just opened. Open the terminal and type:

type application-name

It takes only a few seconds to get the path to an application in Ubuntu 14.04 and later. Search for the application in the Dash and then drag the application's icon into the terminal. The application's full path will be shown in the terminal automatically. Dragging the icon into the terminal will also show the path to any file, folder, archive or anything else that has an icon.

In Ubuntu 20.04 and later drag and drop of files or directories doesn't work from the desktop, but does work in other locations including dragging from the desktop in Files file manager.

2
  • 2
    great answer! works well.
    – Nathan B
    May 23, 2019 at 19:22
  • Not working for me in 19.10, first of all i can't drag the app to the terminal since the launcher is full screen. Also it doesn't show in the terminal when I drag it from the dock. Jan 2, 2020 at 3:24
13

You have to go to a terminal, I fear... Here's an example:

whereis gedit

which gives as output:

gedit: /usr/bin/gedit /usr/share/gedit /usr/share/man/man1/gedit.1.gz

where the /bin/ path is where the executable file is, the /share/ one is a folder containing some accessory file to the application and the /man/ one is the manual of gedit.

I hope this answers your question

2
  • 2
    This tells you the location of gedit files that you could access from the terminal, but it does not tell you what command would be run by a Launcher item.
    – Byte Commander
    Jul 31, 2016 at 12:47
  • 1
    Hi, as far as I understand, the question was about the path where the application is located in the system. xamiro did not mentioned he wanted to know the command used to run the program.
    – Matteo S.
    Jul 31, 2016 at 12:53

You must log in to answer this question.

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