How to find executable?

Okay, this is an easy one hopefully!

I have an application that is crashing, so I want to run it from a terminal to see the output… however, I don’t know what the command is to run it.

Everything I’ve read says to find the .desktop file, but I can’t find it… and I don’t even know the file name I’m looking for, so that isn’t too helpful.

Linux is getting so user friendly it’s hard to use. :slight_smile:

1 Like

Below should give you some ideas.

https://discussion.fedoraproject.org/t/how-can-i-locate-the-desktop-of-an-existing-gnome-app-so-that-i-can-copy-and-modify-it/74200/2?u=sampsonf

2 Likes

Hey, thanks for that link! Unfortunately, I don’t know what the package name is, so I can’t search for it.

1 Like

What desktop environment are you using?
Fedora Workstation (GNOME), KDE/Plasma, XFCE, etc.?

1 Like

The desktop icons (other than user-customized ones) are stored under /usr/share/applications. I typically use the grep command with the recursive (-r) and ignore-case (-i) options to search that directory.

grep -r -i <keyword> /usr/share/applications
4 Likes

In the case you need a task-manager. I find Htop very handy.

2 Likes

Oh, sorry I didn’t include that!

Fedora Workstation 34
Gnome

Installed via “Software” from Fedora (Flatpak)

1 Like

Good idea, thanks! I tried that, but couldn’t find any results, so I’m not sure how the desktop entry/icon is created.

1 Like

I’ll try this, but it’ll be tough with the application crashing so soon instead of staying running. Htop looks nicer than top. :slight_smile:

1 Like

So, the crashes are normally reported to … ?

flatpaks aren’t like traditional tools, since they run in a sandbox etc. So they don’t have an executable in /usr/bin etc. as something installed using an rpm would have.

To run a flatpak from the command line, you’d use flatpak run ... See man flatpak-run for more information. For the complete list of man pages related to flatpak, try: apropos flatpak.

If the flatpak is from Fedora, you’d file bugs on the Fedora bugzilla. If it’s from Flathub though, you’ll file bugs there, since the Fedora community does not maintain Flatpaks on Flathub.

4 Likes

I’m not if I’m misunderstanding the question:
You ran a app, but you don’t know the name for running it in the terminal? I recently recognised a few apps without the app Name in the graphical representation of the app.

So you want to run the crashing app in the terminal with a verbose output of the errors messages that happen during runtime, right?

2 Likes

Thanks for that info about how the flatpaks work, that was very helpful.

I treid to do
flatpak run <my best guess at the name>

but it failed, so I used

flatpak list

This showed me a lsit of installed programs and their ID, which is what I needed to give run to get it to work.

2 Likes

Yes, that’s right. I got it with
flatpak list

Wasn’t quite obvious for me, but in general I find forums more confusing than helpful. :grinning:

There is the environment variable $XDG_DATA_DIRS.
Your .desktop files are in one of the directories listed in this variable (in a sub-directory applications).
In case of an applicaton installed as Flatpak it is most likely /var/lib/flatpak/exports/share/applications/. The line starting with Exec= in the .desktop file specifies what exactly is being run when starting the application.

Troubleshooting tip:
If you want to change something in the .desktop file make a copy to ${HOME}/.local/share/applications/. This will overrule the original package .desktop file.

If your application is crashing you might also find a report about it in the Problem Reporting application (CLI: gnome-abrt or sudo abrt-cli list).

3 Likes

Thank you, this is really helpful information!

Can I mark this as a secondary solution or something?

I marked my own post as the solution, because it has flatpak list, which is the command that I was looking for, and so likely others will want that too… but this is such a great post, I don’t want it to be overlooked.

1 Like

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.