LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Program Links (https://www.linuxquestions.org/questions/linux-newbie-8/program-links-233482/)

ImpactDNI 09-21-2004 03:14 PM

Program Links
 
Well, I need a bit of help. Never had to before, but would like to make what I would consider a "global command"
I installed the new Firefox 1.0pr, for some reason it wanted to be in a folder named "firefox-installer", so the file to run, to launch firefox is:
/home/impact/firefox/firefox-installer/firefox
obviously, its a bit much to type, so I'd like to be able to just type "firefox" from anywhere, and have it boot up.
I know I could add it to my .bashrc, but it seems like theres another way...
I use gaim, and wherever I am, if I type "gaim" it opens up, and its not in my bashrc file...
How would I go about it?

Komakino 09-21-2004 03:19 PM

Why not just move it?
As root:
Code:

mv /home/impact/firefox/firefox-installer /usr/local/firefox
ln -s /usr/local/firefox/firefox /usr/local/bin/firefox

should move firefox to /usr/local/firefox and put a symlink to the firefox binary in /usr/local/bin which should be in your path. i.e. you can type firefox to run it.

serz 09-21-2004 03:30 PM

Re: just dumb I guess!
 
Quote:

Originally posted by ram007
1. How do you access the command line?
2. Do you have to build everything that you install and then re-configure the kernal?

1. You could just open up a terminal if you're in X. If you're not in X the you're in the command line...

2. No.

ImpactDNI 09-21-2004 03:32 PM

Whats this "Path" stuff I'm hearing about?

Komakino 09-21-2004 04:13 PM

Quote:

Originally posted by ImpactDNI
Whats this "Path" stuff I'm hearing about?
Oh dear....ok, the path is the list of directories that are checked when you type a program name to run it. Type:
Code:

echo $PATH
to see the directories in your path. If a program, or a symbolic link (symlink - like a windows shortcut (kind of)) to a program is in a directory listed in the path, then it will be run when you type the program name. For example, /home/impact/firefox/ is not in the path, so at the moment typing firefox will not load Firefox...but /usr/local/bin is (or should be) in the path, so if you have a symlink to firefox in there then just typing firefox will load it.

ImpactDNI 09-21-2004 04:21 PM

you = win
perfect explanation.
Question #2: I assume the order in which they are checked is the order in which #echo $PATH prints them?

Komakino 09-21-2004 04:31 PM

Quote:

Originally posted by ImpactDNI
you = win
perfect explanation.
Question #2: I assume the order in which they are checked is the order in which #echo $PATH prints them?

Spot on!

ImpactDNI 09-21-2004 04:46 PM

Awesome, 5 points to Komakino


All times are GMT -5. The time now is 06:14 AM.