ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
What is the code that will set the extension (say .html) to use (say Mozilla) instead of the default (say Konqueror)? I would like to put that script in my .bash_profile script so I wouldn't have to change it back everytime I login :-)
What program gets activated when you click on a file has nothing to do with your shell (e.g. "bash") and everything to do with your desktop GUI and your choice of "File Explorer" tool.
For example, I have a KDE desktop and use "Konqueror" as both my web browser and File Explorer. I can change file mappings from inside of Konqueror. When I do so, it invokes the executable "/usr/bin/keditfiletype", which in turn updates the MIME types on my machine. This may or may not be what you want to do.
When Kopete says I have a new email, I click on it then it opens Konqueror and loads my email inbox. I have to change the default application from Konqueror everytime I login to Mozilla Firefox, and I just wanted to know what the command to do that is, so I can add it to .bash_profile.
Meaning, login, click the new email thing from Kopete, Mozilla Firefox loads my inbox instead of Konqueror (without having to go in and change the default application manually).
Your original question was quite vague with respect to:
a) What you were trying to do
b) What you hoped to accomplish
I'm inferring from your subsequent responses that the actual problem is this:
1) You're using Kopete from your desktop
2) You're unhappy with the file associations Kopete is giving you:
When you double-click on something with an .html suffix, you'd prefer
to get "Mozilla" instead of "Konqueror" (for example).
I'm not familiar with Kopete, and I certainly don't know how Kopete manages "file associations". For example, "File Explorer" under Windows lets you manage "file types" directly from the File Explorer GUI (specifically, "Tools, Folder Options, File types"), but the actual associations are stored on a system-wide basis in the Windows registry. As another example, Konqueror also supports "file associations", and also lets you manage these associations from the Konqueror GUI - but it uses the Apache-level "MIME types" mappings (see the URL I forwarded you yesterday for more details).
Under no circumstances can you easily set some environment variable to change these mappings - I think it's extremely unlikely you'll find some "magic command" to insert into your .bash_profile.
Instead, I'd strongly suggest going back and looking closer at "Kopete" and working your way backwards from there.
To get Kopete to use Firefox you have to go to the kde control panel -> kde-components -> file associations -> text -> html and move Firefox above Konqueror.
Of course this solution is system-wide, but if you're trying to use Firefox in Kopete, you probably want it that way system-wide. I don't believe however that the writer's of Kopete gave Kopete the option of what browser to bring up. It is a kde project, so they probably relied on KDE's file-extension gui within the control panel.