LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 09-21-2004, 04:14 PM   #1
ImpactDNI
Member
 
Registered: Jun 2004
Posts: 124

Rep: Reputation: 15
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?
 
Old 09-21-2004, 04:19 PM   #2
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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.
 
Old 09-21-2004, 04:30 PM   #3
serz
Member
 
Registered: Apr 2003
Location: Buenos Aires, Argentina
Distribution: Slackware, Gentoo
Posts: 397

Rep: Reputation: 30
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.
 
Old 09-21-2004, 04:32 PM   #4
ImpactDNI
Member
 
Registered: Jun 2004
Posts: 124

Original Poster
Rep: Reputation: 15
Whats this "Path" stuff I'm hearing about?
 
Old 09-21-2004, 05:13 PM   #5
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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.
 
Old 09-21-2004, 05:21 PM   #6
ImpactDNI
Member
 
Registered: Jun 2004
Posts: 124

Original Poster
Rep: Reputation: 15
you = win
perfect explanation.
Question #2: I assume the order in which they are checked is the order in which #echo $PATH prints them?
 
Old 09-21-2004, 05:31 PM   #7
Komakino
Senior Member
 
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
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!
 
Old 09-21-2004, 05:46 PM   #8
ImpactDNI
Member
 
Registered: Jun 2004
Posts: 124

Original Poster
Rep: Reputation: 15
Awesome, 5 points to Komakino
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to add custom program links in Applications with icons? crash_override_me Ubuntu 2 10-01-2005 08:31 AM
links (hard links and soft links..) sachitha Programming 1 08-10-2005 01:10 PM
Clicking on links in email program emer_son Slackware 2 08-22-2004 10:13 PM
how to change relitive links to specific links? wolfe2554 Linux - General 4 07-03-2004 01:40 AM
Links Section updated - Please add your Linux links. jeremy Linux - General 2 11-24-2001 12:35 PM

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

All times are GMT -5. The time now is 02:22 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration