LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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, 03: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 03:11 PM.
 
Old 07-22-2004, 03:36 PM   #2
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
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, 11:33 AM   #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, 11:56 AM   #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, 11:57 AM   #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, 11:58 AM   #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



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

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

All times are GMT -5. The time now is 06:19 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
Open Source Consulting | Domain Registration