LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
LinkBack Search this Thread
Old 11-12-2004, 01:11 PM   #1
wepakis
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
How to register a program for command line??


Hi guys,
My question might be lame but please bare with me as I am a linux newbie. I insatlled RedHat Fedora Core 2 as a dual-boot. So far, I've been able to fix overall OS problems.

My problem is that I downloaded and installed FireFox. I have made a launcher on Desktop. But I want to be able to launch it from the terminal. For example, right now, I can type "Mozilla" in terminal and it will launch Mozilla browser. Is there any way, I can type "Firefox" in terminal and it will launch the browser.

I don't even know what it is called. Right now I'm calling it "registering an application" I'd appreciate it if someone can tell me the proper term for this .


Thanks In advance.
 
Old 11-12-2004, 01:25 PM   #2
david_ross
Moderator
 
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047

Rep: Reputation: 64
Just put the application or a a symlink to it in one of the directories in your PATH:
echo $PATH
 
Old 11-12-2004, 03:50 PM   #3
zhangmaike
Member
 
Registered: Oct 2004
Distribution: Slackware
Posts: 376

Rep: Reputation: 31
The program file itself is named "firefox". If you don't know where that file is, do "updatedb" (as root) followed by "locate firefox".
 
Old 11-12-2004, 07:08 PM   #4
borrrden
Member
 
Registered: May 2004
Location: Philadelphia
Distribution: Fedora Core 3
Posts: 98

Rep: Reputation: 15
Or better yet, here is a simpler option.

Put a soft link (ln -s) to firefox in /usr/bin or /usr/local/bin.

Again, run updatedb as root and slocate (yes, slocate is correct it's a faster version of locate) firefox and that will show you where it is.

So if firefox is in your home directory the command will look like this

go to /usr/bin or /usr/local/bin and type "ln -s /home/borrrden/firefox-1.0/firefox" (without the quotes)
 
Old 11-12-2004, 10:15 PM   #5
wepakis
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
Quote:
Originally posted by borrrden
Or better yet, here is a simpler option.

Put a soft link (ln -s) to firefox in /usr/bin or /usr/local/bin.

Again, run updatedb as root and slocate (yes, slocate is correct it's a faster version of locate) firefox and that will show you where it is.

So if firefox is in your home directory the command will look like this

go to /usr/bin or /usr/local/bin and type "ln -s /home/borrrden/firefox-1.0/firefox" (without the quotes)
Excellent work guys. Thanks so much. I used Symbolic link like borrrden said. But just out of curiousity, how do I do it using the $path. All I know is that I have to append to the path file. But I don't know how????
 
Old 11-13-2004, 12:11 AM   #6
borrrden
Member
 
Registered: May 2004
Location: Philadelphia
Distribution: Fedora Core 3
Posts: 98

Rep: Reputation: 15
from your home directory, open up the following with a text editor (vim, emacs, etc) ".bash_profile" (no quotes) and in it there will be a line that says $PATH=blah blah blah - just add on whatever you want to the end of that line in the same fashion (put a colon, then a directory, then a colon, then a directory, etc)

simple eh?
 
Old 11-13-2004, 12:18 AM   #7
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
In ~/.bash_profile, add the lines:
Code:
PATH=/path/to/new/directory:$PATH

export PATH
Not that there must be no spaces around the = sign.

now run the command "source .bash_profile", and the new directory will be added to your path.

It is a good idea to use the symbolic link when you want to add only one executable to your path - eg firefox, but if there is a directory with lots of executables then use the path option (Eg the java execuatbles - java, javac, javaw ...) This will avoid cluttering your path up too much.

I have a directory /home/iball/bin, which is where I put shell scripts and symbolic links to programs that I want only me to have access to. Obviously, I added this directory to my path as shown above.

I hope this helps
--Ian
 
Old 11-13-2004, 12:25 AM   #8
blazted
Member
 
Registered: Nov 2004
Distribution: Red Hat Version 9 / Attempting to use Gentoo
Posts: 48

Rep: Reputation: 15
I had just installed Firefox and could not get it to run. But creting the sym link and allowed me to run it from command line.

My question is how do I get programs to run from the GUI interface. I ahve installed several programs that wer RPMs. They all installed correctlly but I have no idea on how to use them now. One program which I really want to use is Webmin which I have installed but I cannot bring up the Interface. Other programs I would like to know how to run them once they have been installed.

Thanks
 
Old 11-13-2004, 02:07 AM   #9
IBall
Senior Member
 
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088

Rep: Reputation: 61
Most programs that you install will place and executable in /usr/bin. Therefore, you should be able to run the program simply by typing the name of the program at the command line.

If you want to create a launcher on the desktop, simply right click on the desktop and select "New Launcher" The path of the executable should be just the name of the executable as you type it at the command line. Eg, if you run firefox by typing "firefox" at the command line, then the executable is "firefox"

After installing programs, you can find them by running, as root:
"updatedb" and then "locate nameOfProgram"

I hope this helps
--Ian
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
need a command line email program paperdiesel Linux - Software 10 09-05-2006 06:32 AM
command-line program removal DJOtaku Linux - Software 7 11-21-2004 07:20 PM
kill program command line demmylls Linux - General 7 02-09-2004 08:55 PM
Viewing program messages when program isn't run from command line? Locura Linux - Software 1 09-27-2003 08:19 AM
command line program installation popcorn5714 Linux - Newbie 4 09-14-2002 03:22 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration