LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   run new program from commandline? (https://www.linuxquestions.org/questions/linux-newbie-8/run-new-program-from-commandline-407044/)

pir 01-23-2006 01:50 PM

run new program from commandline?
 
Hi!

The question is more generally:
-How do I make a newly installed program runnable from the commandline?
(like writing "emacs" in the terminal will start up emacs)

I suppose this question is answered somewere, but I can't find it since I have absolutely no qlue what to look for. I am using Suse10 and know very little about Linux.

I have installed Qt and want to make a program with the command "qmake". The problem is that the command can't be found if I write this in the terminal. I suppose I have to do something with ldconfig or something like that. (qmake is installed and I can run it if I am in the same folder as it, so it is working allright).

saman007uk 01-23-2006 02:17 PM

Run this (as root):
Code:

echo "PATH=$PATH:/path/to/folder/containing/qt" >> /etc/profile
echo "export PATH" >> /etc/profile

Then logout and log back in.

Flesym 01-23-2006 04:28 PM

Like saman007uk suggested you usually have make sure that the file you want to execute is in one of the directories of your PATH environment variable. To list all these directories, type:
Code:

echo $PATH
If your desired file is not part of this you have at least three options:

First: Run the file direct with the full absolute or relative path:
Code:

/path/to/qt/executable
Second: Add the directory of the file to your PATH variable -> See saman007uk's post

And third (maybe the most common!): Simply set up a link to the file in one of PATH's directories (usual '/usr/bin' or '/usr/local/bin')
(as root)
Code:

ln -s /path/to/qt/executable /usr/bin/


All times are GMT -5. The time now is 05:34 AM.