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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
11-12-2004, 02:11 PM
|
#1
|
LQ Newbie
Registered: Nov 2004
Posts: 2
Rep:
|
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.
|
|
|
11-12-2004, 02:25 PM
|
#2
|
Moderator
Registered: Mar 2003
Location: Scotland
Distribution: Slackware, RedHat, Debian
Posts: 12,047
Rep:
|
Just put the application or a a symlink to it in one of the directories in your PATH:
echo $PATH
|
|
|
11-12-2004, 04:50 PM
|
#3
|
Member
Registered: Oct 2004
Distribution: Slackware
Posts: 376
Rep:
|
The program file itself is named "firefox". If you don't know where that file is, do "updatedb" (as root) followed by "locate firefox".
|
|
|
11-12-2004, 08:08 PM
|
#4
|
Member
Registered: May 2004
Location: Philadelphia
Distribution: Fedora Core 3
Posts: 98
Rep:
|
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)
|
|
|
11-12-2004, 11:15 PM
|
#5
|
LQ Newbie
Registered: Nov 2004
Posts: 2
Original Poster
Rep:
|
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????
|
|
|
11-13-2004, 01:11 AM
|
#6
|
Member
Registered: May 2004
Location: Philadelphia
Distribution: Fedora Core 3
Posts: 98
Rep:
|
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?
|
|
|
11-13-2004, 01:18 AM
|
#7
|
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
|
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
|
|
|
11-13-2004, 01:25 AM
|
#8
|
Member
Registered: Nov 2004
Distribution: Red Hat Version 9 / Attempting to use Gentoo
Posts: 48
Rep:
|
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
|
|
|
11-13-2004, 03:07 AM
|
#9
|
Senior Member
Registered: Nov 2003
Location: Perth, Western Australia
Distribution: Ubuntu, Debian, Various using VMWare
Posts: 2,088
Rep:
|
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
|
|
|
All times are GMT -5. The time now is 12:40 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|