How to get default browser name and mail client name by programmatically?
ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
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.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
The concept of 'default applications' is a part of other applications and desktops. How it is stored and configured within the domain of those applications is at best a documented API supported by each of those applications. You will not find any global or general defaults, and this explains why you haven't been able to find any such information.
--- rod.
The concept of 'default applications' is a part of other applications and desktops. How it is stored and configured within the domain of those applications is at best a documented API supported by each of those applications. You will not find any global or general defaults, and this explains why you haven't been able to find any such information.
--- rod.
Hi thanks for reply.
I didn't understand completely but if i create a test.htm and tried to double click on it, how Linux decide to open the (which firefox or opera??) browser.
I think there should be a configuration file for the same.
I found a command 'mailsetting'on fedora 9 gives me a mailclient name.
but its not available on some below versions.
I didn't understand completely but if i create a test.htm and tried to double click on it, how Linux decide to open the (which firefox or opera??) browser.
I think there should be a configuration file for the same.
Your misunderstanding is what I tried to say in my earlier post. The concept of 'default applications' is not a Linux-wide concept, but is limited to some other application. When you say 'tried to double click on it', this means nothing at the Linux core level. 'Double-clicking' implies that there are any number of layers which may play a part in launching other applications. There are two major desktop managers, KDE & Gnome, and a long list of less popular ones as well as simpler window managers. Each of these may have, and probably do have, their own mechanism for selecting and launching default applications. In addition to this, individual applications will often have their own concept of default helper applications, and the mechanism for configuring and accessing each of these will differ according to the application.
It would probably be nice if there was some global mechanism that was common to all applications and desktop managers, but I don't think any such thing exists at present.
--- rod.
Your misunderstanding is what I tried to say in my earlier post. The concept of 'default applications' is not a Linux-wide concept, but is limited to some other application. When you say 'tried to double click on it', this means nothing at the Linux core level. 'Double-clicking' implies that there are any number of layers which may play a part in launching other applications. There are two major desktop managers, KDE & Gnome, and a long list of less popular ones as well as simpler window managers. Each of these may have, and probably do have, their own mechanism for selecting and launching default applications. In addition to this, individual applications will often have their own concept of default helper applications, and the mechanism for configuring and accessing each of these will differ according to the application.
It would probably be nice if there was some global mechanism that was common to all applications and desktop managers, but I don't think any such thing exists at present.
--- rod.
Even these Window Managers need to store the relationship between the file file type and the application used to open it somewhere.
Any idea where that file would be for KDE and Gnome Window Managers?
I can only guess, but I doubt that it is a file. Probably something accessed through dcop for KDE. I think Gnome has some similar messaging scheme.
--- rod.
Your misunderstanding is what I tried to say in my earlier post. The concept of 'default applications' is not a Linux-wide concept, but is limited to some other application. When you say 'tried to double click on it', this means nothing at the Linux core level. 'Double-clicking' implies that there are any number of layers which may play a part in launching other applications. There are two major desktop managers, KDE & Gnome, and a long list of less popular ones as well as simpler window managers. Each of these may have, and probably do have, their own mechanism for selecting and launching default applications. In addition to this, individual applications will often have their own concept of default helper applications, and the mechanism for configuring and accessing each of these will differ according to the application.
It would probably be nice if there was some global mechanism that was common to all applications and desktop managers, but I don't think any such thing exists at present.
--- rod.
Hi Very nice explanation. Thanks
now i got the details, i was thinking like the Windows OS but the complete difference is there.
Now i did conclusion that there is not any possible solution to my problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.