LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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 07-22-2004, 04:10 PM   #1
Balkman
Member
 
Registered: Jan 2004
Location: USA, Pa
Distribution: Slackware 10
Posts: 65

Rep: Reputation: 15
commands, some work some dont?


This has been puzzleing me for a while now. I run fluxbox, and when i open a console window and type a one word command like "kwrite" it opens the program kwrite. But if i want to open firefox, how come i have to cd into the firefox directory and then type "firefox".

Like for the mozilla browser, i can just type "mozilla" and it will work, same with any other kde program (just type one word command to open).

Anyway, im sure there is a way to link the firefox command to open in one word then having to write "/home/jay/firefox/firefox" right?

PS: i also have to cd into the winex directory to run winex, along with a few other programs that are not comming to mind too, it's not just firefox

Last edited by Balkman; 07-22-2004 at 04:11 PM.
 
Old 07-22-2004, 04:36 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

Rep: Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958Reputation: 1958
It's probably because the Firefox program is not listed in your Path. The Path is the list of directories Bash automatically searches when you request a program. Type echo $PATH to see which folders are in your path and what order they are searched in.

The easiest way to correct the problem is simply to create a symlink to the Firefox exec inside one of the Path directories. usr/bin is generally the recommended location, I believe.
 
Old 07-23-2004, 12:33 PM   #3
Balkman
Member
 
Registered: Jan 2004
Location: USA, Pa
Distribution: Slackware 10
Posts: 65

Original Poster
Rep: Reputation: 15
Of course nothing is that simple in linux.....

I cp firefox excu to /usr/bin/ and tried to run the command "firefox" from my home directory:
Code:
Cannot find mozilla runtime directory. Exiting.
And now the entire thing is messed up, I can't even run firefox from the /home/jay/firefox/firefox directory now without it saying
Code:
Cannot find mozilla runtime directory. Exiting.
 
Old 07-23-2004, 12:56 PM   #4
Corona4456
Member
 
Registered: Jul 2004
Distribution: SuSE 9.1
Posts: 66

Rep: Reputation: 15
There's two things you can do to resolve this issue:

1. Make sure the Firefox path is in your PATH environment, or
2. Create a symbolic link to the firefox executable by typing ln -s <TARGET> <LINKNAME>. This will create a link in the current directory so if you want you can go to /usr/local/bin and put it in there. Hope this helps
 
Old 07-23-2004, 12:57 PM   #5
enygma
Member
 
Registered: Mar 2003
Distribution: CentOS 5.2
Posts: 43

Rep: Reputation: 15
instead of copying what you need to /usr/bin, delete the firefox directory and re-extract the tarball to where it was. As root, use the following command and give that a shot:

ln -s /home/jay/firefox/firefox /usr/bin/firefox

This will create a symbolic link in the /usr/bin directory that will redirect all requests for that file over to "/home/jay/firefox/firefox", and run the application from that directory.

EDIT: Damn... beat me to it...
 
Old 07-23-2004, 12:58 PM   #6
Corona4456
Member
 
Registered: Jul 2004
Distribution: SuSE 9.1
Posts: 66

Rep: Reputation: 15
Quote:
Originally posted by Balkman
Of course nothing is that simple in linux.....

I cp firefox excu to /usr/bin/ and tried to run the command "firefox" from my home directory:
Code:
Cannot find mozilla runtime directory. Exiting.
And now the entire thing is messed up, I can't even run firefox from the /home/jay/firefox/firefox directory now without it saying
Code:
Cannot find mozilla runtime directory. Exiting.
The reason you are getting this is because the /usr/bin/firefox overrides the command in your local directory... try typing ./firefox in /home/jay/firefox/firefox directory... or where ever it is located
 
  


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
keyboard commands and mozilla dont work Lleb_KCir Linux - Software 2 10-13-2004 07:55 PM
'make' and 'make install' commands dont work on my system? ginda Linux - Newbie 9 04-18-2004 12:17 PM
Commands dont work, even as root king_nothingzzz Linux - General 2 01-22-2004 04:07 PM
My commands dont work. ifconfig ? slice4e Linux - General 5 05-09-2003 12:51 AM
Things dont work when you dont understand withoutaclue Linux - Newbie 3 03-12-2003 10:51 AM


All times are GMT -5. The time now is 09:04 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