LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-04-2006, 03:01 AM   #1
JungleNut
LQ Newbie
 
Registered: Dec 2005
Location: Australia
Distribution: Fedora Core 8
Posts: 17

Rep: Reputation: 0
Setting default programs


Hi, I have been toying with linux for a year or so but have only just started using it on a permanent basis, so I am at the stage where I know just enough about it to be quite dangerous!

My question relates to setting the default programs. I installed FC4 which included Firefox 1.0.7. Since there is no rpm for the latest version of FF I downloaded FF 1.5 as a tar.gz file and installed it into the /opt directory and then created a link on the desktop to it. OK so far.

The problem is that when I click on a link in another application (eg Thunderbird) AND if firefox is not already running, the link will open in FF 1.0.7, but if I have FF 1.5 open the link will open in that.

I have noticed in KDE that if I right click the browser icon in the panel, the command is set to "htmlview %u". I presume this refers to the default program to open links??? Can I change it to "open with" my preferred program like in windoze?
 
Old 02-04-2006, 03:09 AM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
I think that you should uninstall the RPM version of Firefox and make sure that the new version is added to your path.
As root: rpm -e firefox
 
Old 02-04-2006, 04:57 AM   #3
JungleNut
LQ Newbie
 
Registered: Dec 2005
Location: Australia
Distribution: Fedora Core 8
Posts: 17

Original Poster
Rep: Reputation: 0
OK, I've removed the old version, now how do I add the new one the the path?
 
Old 02-04-2006, 05:24 PM   #4
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Add the directory location where the firefox program is at to the PATH variable.
Edit either your $HOME/.bash_profile or $HOME/.profile file.
Check if one of them already exists. Sometimes one will check for the other and source
it if it exists. The .bash_profile is bash specific and what bash checks for first. The .profile file is checked for second if .bash_profile doesn't exist.

These files are run when you log into the computer, not every time a new shell is started. ( Unless you start bash with the "-l" option. )

See if there is a line such as PATH=$PATH:/usr/bin .
If there is, add :<firefox bin directory> to the end of the line. For example, this may mean adding:
":/opt/MozillaFirefox/bin"

Make sure there is a line that says: export PATH
There could be a line that has more export targets after the export command. That would be fine. If none of these lines exist, then add lines like this:
PATH=PATH:/opt/MozillaFirefox/bin
export PATH
(note: your path to add may be different)

One other thing to note. You don't want to add this to the .bashrc file. This is because this file is sourced every time a new shell is opened. So a subshell will have the path variable extended again, once for each time a subshell is run.

There are a couple of things to mention. If there is a link from /usr/bin/firefox to the firefox executable, then you may not need to add the firefox bin directory to your path variable. ( unless you mucked something up earlier, /usr/bin is in your path. ) Also, the link may be to a script rather than to a binary program. If that is the case, then the script will add the firefox library load path automatically. If not, you may need to add the firefox lib directory to the end of the /etc/ld.so.conf file and execute "ldconfig" as root. For the RPM installation, the startup script would change the value of the LD_LIBRARY_PATH instead. If you wanted, you could do the same thing in your .bash_profile script rather than editing /etc/ld.so.conf. This is what you would have to do, for instance, if you had an account on a machine, but not root access.

Code:
## Set LD_LIBRARY_PATH
##
if [ "$LD_LIBRARY_PATH" ]
then
  LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB:$LD_LIBRARY_PATH
else
  LD_LIBRARY_PATH=$MOZ_DIST_LIB/plugins:$MOZ_DIST_LIB
fi
export LD_LIBRARY_PATH

Last edited by jschiwal; 02-04-2006 at 05:34 PM.
 
Old 02-05-2006, 01:50 AM   #5
JungleNut
LQ Newbie
 
Registered: Dec 2005
Location: Australia
Distribution: Fedora Core 8
Posts: 17

Original Poster
Rep: Reputation: 0
Excellent, thank you. I just added :/opt/firefox to the path and it works fine.

And I have learned something today so it is a good day
 
Old 02-05-2006, 07:36 AM   #6
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654Reputation: 654
Glad I was able to help.
 
  


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 On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Debian w/ KDE 3.3.2: setting default programs, and mp3 support audiorevolution Linux - Newbie 1 06-03-2005 09:55 AM
need to change default programs for mp3 joel b Fedora 1 02-27-2005 07:34 PM
setting programs as default in mandrake 9.1 rybing Linux - Newbie 1 05-11-2004 04:14 PM
setting default page size and default tray lived4eva Linux - General 1 11-04-2003 02:39 PM
Making some programs default and another questions... Mega Man X Linux - General 4 07-19-2003 05:12 AM


All times are GMT -5. The time now is 02:48 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration