Jump to content

starting command [solved]


Lando
 Share

Recommended Posts

I've an old Firefox in /usr/bin that start typing "firefox" on a terminal . Now I've installed the last firefox version and I'd wish to start it

from the terminal . What have I to change to do that ? ( I want to keep also the old version...) .

Thanks.

Link to comment
Share on other sites

This:

 

/home/lando/Firefox1.5/firefox

 

is not in PATH which means you would have to give the above full path in a console to start your updated firefox. That will probably get old in a real hurry. You can handle that in two ways - you can edit your ~.bash_profile file to add /home/lando/Firefox1.5/ to PATH or you can craeate a link to /home/lando/Firefox1.5/firefox to some directory that is already in PATH. The second is a little easier:

 

$ su
<enter root password>
# ln -s /home/lando/Firefox1.5/firefox /usr/bin/firefox1.5

 

After running the above you can launch your new firefox with:

 

$ firefox1.5

Link to comment
Share on other sites

I've added the link below in /usr/bin , but typing "firefox" I get "command not found"

 

ln -s /home/lando/Firefox1.5/firefox/firefox

 

Still I get "command not found" with the .bashrc below >>>>>

 

**************************************************

# .bashrc

 

# User specific aliases and functions

 

# Source global definitions

if [ -f /etc/bashrc ]; then

. /etc/bashrc

fi

 

export PATH=$PATH:.

 

PATH=$PATH:/home/lando/FIREFOX_15/firefox

export PATH

 

******************************************************

 

Where is my mistake ?

Thanks.

Link to comment
Share on other sites

You didn't type the ln -s command correctly. Therefore, it would have attempted to create a symlink called firefox, and of course, one already probably exists in this directory. As pmpatrick said, it should be created as this:

 

ln -s /home/lando/Firefox1.5/firefox /usr/bin/firefox1.5

 

then it would have worked, because you forgot to put "/usr/bin/firefox1.5" at the end of your ln -s command. It can't overwrite /usr/bin/firefox if it already exists, as this is what it tried with your command.

Link to comment
Share on other sites

That's because you should type:

 

firefox1.5

 

to get it to work. The symlink says firefox1.5, thats why when you type firefox it doesn't work! Or firtefox from your text above is incorrect also.

Link to comment
Share on other sites

Yes, because the first part of the ln command is where firefox 1.5 exists, and therefore it shows firefox1.5/firefox. The /usr/bin/firefox1.5 is so that you can execute it.

 

When you type firefox1.5, it looks at /usr/bin and then this symlink knows that firefox1.5 isn't here, but in /home/lando/firefox1.5/firefox and it will run this command.

 

So yes, it's correct. Type:

 

firefox1.5

 

if it doesn't work, your symlink hasn't been created properly:

 

ls -l /usr/bin/firefox*

 

and see what it says for symlinks in this directory that follow the firefox pattern plus any other detail after when using the asterisk.

Link to comment
Share on other sites

It works only if I do : cd /usr/bin /FIREFOX_1.5

then firefox

But it's not what I wanted...it has to work typing "firefox" on any directory the terminal is opened.

 

Below your request >>>>>

 

[root@localhost bin]# ls -l /usr/bin/FIREFOX_1.5

lrwxrwxrwx 1 root root 31 lug 11 10:20 /usr/bin/FIREFOX_1.5 -> /home/lando/FIREFOX_1.5/firefox/

Link to comment
Share on other sites

You've set the symlink up wrong then, if you have to go into a directory called firefox_1.5 in /usr/bin.

 

For it to work, it HAS to be in /usr/bin. Here is a sample for you from my system, and you can use this on yours, and it should work.

 

[root@europa firefox]# ln -s /usr/local/mozilla/firefox/firefox /usr/bin/firefox
[root@europa firefox]# cd /
[root@europa /]# ls -l /usr/bin/fire*
lrwxrwxrwx  1 root root 34 Jul 11 14:36 /usr/bin/firefox -> /usr/local/mozilla/firefox/firefox*

 

replace /usr/local/mozilla/firefox with the path to your version of Firefox 1.5. I installed Firefox 1.5 on my system in /usr/local/mozilla/firefox as you can see from my example.

 

If it still fails after this, then you're definitely not following it properly.

Link to comment
Share on other sites

It should be, mine searches perfectly fine by just putting the symlink in /usr/bin. I think your problems are occurring because you're trying to put them in a sub-directory called firefox_1.5 in /usr/bin. I would suggest putting the symlink in /usr/bin like I did.

Link to comment
Share on other sites

It should be, mine searches perfectly fine by just putting the symlink in /usr/bin. I think your problems are occurring because you're trying to put them in a sub-directory called firefox_1.5 in /usr/bin. I would suggest putting the symlink in /usr/bin like I did.

 

Your is >>>> /usr/bin/firefox

mine is >>>> /usr/bin/FIREFOX_1.5

 

[root@europa /]# ls -l /usr/bin/fire*

lrwxrwxrwx 1 root root 34 Jul 11 14:36 /usr/bin/firefox -> /usr/local/mozilla/firefox/firefox*

 

 

root@localhost bin]# ls -l /usr/bin/FIREFOX_1.5

lrwxrwxrwx 1 root root 31 lug 11 10:20 /usr/bin/FIREFOX_1.5 -> /home/lando/FIREFOX_1.5/firefox/

 

It seems much the same ..........

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...