LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-23-2006, 01:50 PM   #1
pir
LQ Newbie
 
Registered: Oct 2005
Posts: 3

Rep: Reputation: 0
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).
 
Old 01-23-2006, 02:17 PM   #2
saman007uk
Member
 
Registered: Dec 2003
Location: ~root
Distribution: Debian
Posts: 364

Rep: Reputation: 33
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.
 
Old 01-23-2006, 04:28 PM   #3
Flesym
Member
 
Registered: Aug 2005
Location: Germany
Distribution: Ubuntu, Debian
Posts: 189

Rep: Reputation: 31
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/

Last edited by Flesym; 01-24-2006 at 01:15 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
can not run any program yumener Linux - Software 3 01-14-2006 10:05 AM
Is it possible to run ethereal remotely via the commandline? abefroman Linux - Security 5 05-09-2005 11:10 PM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 08:19 AM
please help me run this program joe blow Linux - Newbie 4 08-08-2003 10:07 AM
How do I run a program? rtstar Linux - Newbie 2 07-25-2003 09:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 04:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration