Finding the command line to launch an application from a terminal.
Is there a way to find out the currently installed packages and the corresponding command line to launch the package from a terminal. For example, I know that I have openoffice installed but I do not know how to find the command line to launch it.
|
OO is an odd one in that a start up script launches it
but for most programs it is just the name for example The Gimp 2.6 is " gimp " Firefix 3.5 is " firefox" OO 's "word" is = " openoffice.org -writer %U ", or the program name -- " oowriter " |
If you are using ubuntu you can find installed applications by using
Code:
dpkg -l Code:
dpkg -l > /tmp/dpkg.out Code:
apt-file update The apropos command finds many commands but not all and you have to be inventive about the keyword. If it lists some commands related to what you are interested in you could use the type command to find their location and then list files in the same place. guessing some part of the name as in this example Code:
c@CW8:~$ apropos office Code:
man soffice Code:
c@CW8:~$ ps -f -uc |
I assume you can still right click the menus and launchers on kde or gnome to see where a given icon or item is pointing to, so that's a way to find the right command for a given program, however I don't use any DE myself so I am not sure :p
|
for RPM based systems:
rpm -qa |
Thanks guys. The suggestions really helped. I now have a fair idea. I tried two methods to get the command line and both worked. That is,
Ran the application from GUI and then ran ps -f -uc command (where c is the username) I also right clicked on the icon of the application on my desktop and looked at the properties. It also gave me the command line that launched the application. Thank you all once again. |
All times are GMT -5. The time now is 11:13 AM. |