Lando Posted July 10, 2006 Report Share Posted July 10, 2006 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. Quote Link to comment Share on other sites More sharing options...
camelrider Posted July 10, 2006 Report Share Posted July 10, 2006 You could either start the new version by typing the full path, such as /usr/local/firefox, or create a symlink to the new version in a directory in your PATH. If the latter, be sure the symlink has a unique name to avoid conflict with existing commands. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 10, 2006 Author Report Share Posted July 10, 2006 where can I see an example ( the new path is /home/lando/Firefox1.5/firefox and the old one is /usr/local/firefox ) ? I Quote Link to comment Share on other sites More sharing options...
pmpatrick Posted July 11, 2006 Report Share Posted July 11, 2006 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 Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 11, 2006 Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 It doesn't work.......... [lando@localhost ~]$ su Password: [root@localhost lando]# ln -s /home/lando/Firefox1.5/firefox /usr/bin/firefox1.5 [root@localhost lando]# firtefox bash: firtefox: command not found Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 11, 2006 Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 No...firefox1.5 is the folder containing the folder "firefox" that contains the "firefox" script ln -s /home/lando/Firefox1.5/firefox /usr/bin/firefox1.5 couldn't be correct ? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 11, 2006 Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 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/ Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 11, 2006 Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 Our settings are equals.....To do working all the stuff I have added in .bashrc > PATH=$PATH:/usr/bin/FIREFOX_1.5 export PATH I don't know why...every thing in /usr/bin isn't searched first of all ...? Quote Link to comment Share on other sites More sharing options...
ianw1974 Posted July 11, 2006 Report Share Posted July 11, 2006 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. Quote Link to comment Share on other sites More sharing options...
Lando Posted July 11, 2006 Author Report Share Posted July 11, 2006 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 .......... Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.