It happens every now and then that there's an application installed in my system which I don't know how to run from the command-line.
To find out, I usually Google or search the output of lsof
(not always successfully) after running the application from the GUI.
There has to be an easier way. What is it?
Best Answer
Applications which you can start from your desktop environment are described by
.desktop
files, which are stored in/usr/share/applications
and~/.local/share/applications
(strictly speaking, the corresponding XDG directories, but those are the default settings). Given an application name, as shown by your desktop environment, you can look for it in those files and find the correspondingExec
line.To do this, you can use GUI menu editors such as GNOME’s Alacarte or MenuLibre, or search on the command line.
Alacarte (“Main Menu” in GNOME) shows all available applications, and the properties of each entry show the corresponding command:
In a terminal window, this “Users” application can be found using
This shows
and true enough,
on the command line opens the corresponding panel.
For DB Browser, you’d run
In some cases the
Exec
line will have additional arguments, e.g.%f
; those are placeholders for arguments such as files.