Is there a different way.......

Jan 26, 2005
120
0
0
I just installed Firefox on my Linux box. To start it, I have to enter a few console commands. Is there a way I can make an executable file so I don't have to type them out all the time? Here is what I use to start Firefox:

[root@localhost] cd /root/firefox-installer
[root@ localhost firefox] ./firefox


Thanks for any help
 

stars

Golden Member
Feb 27, 2002
1,068
0
0
You can edit the .bashrc and add something like

alias fire='/path/to/firefox'

Then in a terminal you simply type fire to run firefox. Also you probably have other options depending on the window manager and/or desktop enviroment that you use.
 
Jan 26, 2005
120
0
0
I am running Red Hat 9 and I admit I am a total Linix noob. Could you explain to me exactly how one would do this? Thank you very much.
 

stars

Golden Member
Feb 27, 2002
1,068
0
0
Sure, by using a text editor such as pico, nano, vim or whatever comes with red hat open the .bashrc file which is located in your home directory. Add a line to the file similar to:

alias fire='/path/to/firefox'

The word "fire" can be replaced with whatever you would like to use to run firefox. The /path/to/firefox section is the path to the actual location of firefox. After adding this line and saving the file you can issue a second command that will allow the changes to take effect. This command would be issued from your home directory:

source ~/.bashrc

Also note the reference to "home directory" means the actual user directory such as /home/username

Hope this helps.
 

bersl2

Golden Member
Aug 2, 2004
1,617
0
0
Usually, prepending or appending to $PATH is preferable to making an alias. So, in ~/.bashrc, add the following line (assuming /path/to is the path to the firefox executable*):

PATH="/path/to:$PATH"

* To be technically correct, firefox is merely an executable script; ${FF_ROOT}/lib/firefox-bin is the true executable, but you're supposed to call it through the previously mentioned shell script.
 

AnonymouseUser

Diamond Member
May 14, 2003
9,943
107
106
Why are you running Firefox as root?

Install it to your non-priviliged user account and create a symlink (to the firefox executable) in the home directory.
 

drag

Elite Member
Jul 4, 2002
8,708
0
0
Originally posted by: inspiron8200guy
I am running Red Hat 9 and I admit I am a total Linix noob. Could you explain to me exactly how one would do this? Thank you very much.


Unless you have to stop running Red hat 9 and upgrade some something new. Redhat 9 is completely obsolete and should be avoided, support for that OS has been dropped for a long time now.

That is unless you have to run Redhat 9 for some odd reason.

Take a look at Ubuntu, Fedora Core 4, or Suse Linux 10 and there are a few others. They'll offer big improvements over RH 9. If you want to stick to something very Redhat-like look at Fedora, which is the no-cost OS that Redhat engineers work on and is basicly the replacement of the 'Redhat' releases. Fedora Core 4 basicly is the same as saying "Redhat 13" if Redhat kept the same versioning numbers and names.

Those will have Firefox installed by default and some decent package management also.
 

n0cmonkey

Elite Member
Jun 10, 2001
42,936
1
0
Don't run firefox as root.
It looks like firefox was installed in the wrong spot, you should think about fixing that...