Author Topic: (SOLVED - at least for me) LXDE - how to set default apps?  (Read 2754 times)

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
(SOLVED - at least for me) LXDE - how to set default apps?
« on: November 17, 2010, 07:35:29 AM »
I was sure this had to have been covered in the forum. I'm having a particularly dim day today and perhaps that's why I can see no sign of it. How you set your default apps in LXDE? I get irritated when I click a link in an email and Firefox leaps out at me. I want Opera. I've found quite a few people who say they already know how to set the default apps and the responder has misunderstood their question - but nowhere can I find that basic question answered. So - please, how do you set your default apps in LXDE? And apologies if it has been answered somewhere.
« Last Edit: November 21, 2010, 06:01:05 AM by besonian »
We are here and it is now. Further than that all human knowledge is moonshine.

Offline scoundrel

  • Administrator
  • Hero Member
  • *****
  • Posts: 4586
  • Philosophy= Bigger Hammer
Re: LXDE - how to set default apps?
« Reply #1 on: November 17, 2010, 07:36:47 AM »
it has been asked, but not answered ..
Please Donate Today..Or I Will Make You Wish You Had

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #2 on: November 17, 2010, 07:49:40 AM »
Oooer! Thanks scoundrel. But presumably there is an answer? I mean - all those others saying they know how to set their default apps but that wasn't the question they wanted answering. Firefox is determined to jump out at me any time I click on a link - yet I haven't set it as my default browser. In fact, I've told it it isn't my default. So I'm presuming it's getting the authority for that from somewhere within the OS. Question is - where?
We are here and it is now. Further than that all human knowledge is moonshine.

Offline scoundrel

  • Administrator
  • Hero Member
  • *****
  • Posts: 4586
  • Philosophy= Bigger Hammer
Please Donate Today..Or I Will Make You Wish You Had

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE - how to set default apps?
« Reply #4 on: November 17, 2010, 08:48:23 AM »
besonian,
Try adding export BROWSER="opera" to your .bashrc file. See if that will make the change for you.

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #5 on: November 17, 2010, 09:28:49 AM »
Scoundrel - not at all sure I understand quite what you're supposed to do on the command line in your link, but whatever I tried I was told there were no alternatives to 'browser', to 'opera', or in fact to any way round I changed the wording. It could well be I'm just not doing what you're supposed to do, but any help with it would be appreciated.

And Neal - where do I find .bashrc? I've searched in what seem to me to be the places it's likely to be with no luck. And if there's a 'Search' or 'Find' facility in LXDE I haven't come across it. Sorry, I seem like a real noob here.
 
We are here and it is now. Further than that all human knowledge is moonshine.

Offline smurfslover

  • Hero Member
  • *****
  • Posts: 811
Registered Linux User 440970

Every windows machine has an un-patchable critical vulnerability... Its called "Power ON" switch.

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #7 on: November 17, 2010, 10:28:51 AM »
Thank you smurfslover - did all that as per your link. But still the same - Firefox appears. I thought perhaps as I was using Thunderbird - a Mozilla app - as my mailer that that was why it always opened another Mozilla app. So I opened my Gmail account in Claws Mail - but still that opens links in Firefox. I'm giving it up for a while. An Indian meal calls. I'll return to this tomorrow. But thank you all the same.
We are here and it is now. Further than that all human knowledge is moonshine.

Offline smurfslover

  • Hero Member
  • *****
  • Posts: 811
Re: LXDE - how to set default apps?
« Reply #8 on: November 17, 2010, 10:47:30 AM »
Can you check for browser commands in the files mimeapps.list and defaults.list in ~/.local/share/applications/ ?
Registered Linux User 440970

Every windows machine has an un-patchable critical vulnerability... Its called "Power ON" switch.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE - how to set default apps?
« Reply #9 on: November 17, 2010, 01:11:25 PM »
besonian,
To see hidden files in PCManFM, click View > Show hidden files. Scroll down to below the folders, and you will see the files. All hidden files begin with a "." and can be edited, if needed. There are also hidden folders.

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #10 on: November 17, 2010, 01:48:31 PM »
Neal - thank you. Yes, I know how to find dot files etc. But I said in my first that this was a bad day for the brain - I looked in my /home/me directory and went through the hidden files - except I didn't go beyond the folders. I went to 'b' in them and not finding anything beginning with 'bash', assumed I was looking in the wrong place. Of course, the files are below the folders - sorry - and I've found '.bashrc'. I really am beyond it today. However, I've just done what you've suggested, but still Firefox jumps out at me - even in Claws.

Smurfslover - I'll try yours tomorrow. Just got back from a very nice Indian meal and I'm too tired now.

Thank you both guys.
We are here and it is now. Further than that all human knowledge is moonshine.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE - how to set default apps?
« Reply #11 on: November 17, 2010, 02:07:36 PM »
besonian,
In ~/.local/share/applications/defaults.list on line 8, you will find the browser entry.


Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #12 on: November 17, 2010, 02:46:57 PM »
Neal - ah, now that's interesting. I don't have a line 8 in .local/share/applications/defaults.list. I have three lines only. Line 1 is blank. Lines 2 and 3 are as follows -

[Default Applications]
application/vnd.oasis.opendocument.text=abiword.desktop

I guess it's just question of inserting the appropriate words. But as I can't quite figure out from the above just how to do that, once again your suggestion(s) would be
welcome.



We are here and it is now. Further than that all human knowledge is moonshine.

Offline Neal ManBear

  • Administrator
  • Super Villain
  • *****
  • Posts: 15829
  • LXDE! Coffee, Bacon and Cheesecake!
Re: LXDE - how to set default apps?
« Reply #13 on: November 17, 2010, 02:53:37 PM »
This is my ~/.local/share/applications/defaults.list -->
Code: [Select]
[Default Applications]
image/jpeg=gimp.desktop
image/png=gimp.desktop
video/x-ms-wmv=smplayer.desktop
image/svg+xml=inkscape.desktop
text/plain=gedit.desktop
application/x-rpm=synaptic.desktop
application/html=firefox.desktop
application/xml=firefox.desktop
application/x-cd-image=kde4-k3b.desktop
application/x-cpio=file-roller.desktop

Offline besonian

  • Hero Member
  • *****
  • Posts: 829
Re: LXDE - how to set default apps?
« Reply #14 on: November 18, 2010, 06:49:18 AM »
I seems I may have triumphed here! I just added the line -

browser=opera

- to my Defaults list in me/.local/share/applications/defaults.list which contained nothing about browsers or anything much else for that matter. And it worked! At least it's done so the last three or four times I've tried it. I won't called this Solved yet, but if it's still behaving itself later today I will. I'll report back.
 
Later that same day - and it's still working. Links open in Opera from within Thunderbird, OO Writer and in Claws. So I guess that's it. For those that are interested, the total content now of my Defaults list is -

[Default Applications]
application/vnd.oasis.opendocument.text=abiword.desktop
browser=opera

I'll now mark this SOLVED and thank you all who helped direct my thoughts along the way.
« Last Edit: November 18, 2010, 10:03:27 AM by besonian »
We are here and it is now. Further than that all human knowledge is moonshine.