Page 1 of 1

How do I fix browser/email open when clicking links? general issue, affecting any browser and almost any Puppy

Posted: Tue Aug 15, 2023 3:36 pm
by ddigg

Hi, I have Vanilla Dpup 10.xx 32-bit on old laptop Acer with Atom processor.

When I click link inside Gnumeric, Firefox opens up, but doesn't follow the link.
When I click emailto-link on a website pre-installed, but un-configured Claws opens up. However, I have installed Geary and set it as default email.

I guess it is something to do with mime-types, possible settings in some configure file,but I cannot find where to change the behaviour. Thank you for reading this question and giving me directions, much appreciated!

/Daniel


Re: How do I fix browser/email open when clicking links?

Posted: Tue Aug 15, 2023 8:24 pm
by d-pupp

When I click emailto-link on a website pre-installed, but un-configured Claws opens up. However, I have installed Geary and set it as default email.

@ddigg you should be able to change the default email app
Menu > Setup > Set Default apps


Re: How do I fix browser/email open when clicking links?

Posted: Tue Aug 15, 2023 9:31 pm
by ddigg

@d-pupp yes, I have changed to geary as default email app through setup>default apps, but my problem is that Claws, not Geary starts up when I click on an email link.

Image

... and similar problem with firefox. It is the defaultbrowser, but even if it starts up when I click a link it opens up the start page not the link I clicked on in Gnumeric.


Re: How do I fix browser/email open when clicking links?

Posted: Wed Aug 16, 2023 1:56 pm
by MochiMoppel
ddigg wrote: Tue Aug 15, 2023 3:36 pm

Hi, I have Vanilla Dpup 10.xx 32-bit on old laptop Acer with Atom processor.
When I click link inside Gnumeric, Firefox opens up, but doesn't follow the link.

@ddigg I don't have Vanilla but I have @radky 's BW64 and @rockedge's F96-CE and I can confirm this bug.
The easiest way to check is to click on Menu Help -> Gnumeric on the Web.
What should happen is that a URL is passed to the wrapper script /usr/local/bin/defaultbrowser , which eventually passes the URL to Firefox
What does happen is that nothing is passed to /usr/local/bin/defaultbrowser so that eventually Firefox can't open the URL

When I opened the Firefox setting I found that Firefox claims that it is not set as the default browser, so I changed the setting. The command xdg-settings get default-web-browser which initially returned "defaultbrowser.desktop" now returned "userapp-Firefox-FWBU91.desktop".
This newly created .desktop file /root/.local/share/applications/userapp-Firefox-FWBU91.desktop contains

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Version=1.0
Type=Application
NoDisplay=true
Exec=/opt/FirefoxESR-portable64/firefox64/firefox-bin %u
Name=Firefox
Comment=Custom definition for Firefox

The location of this .desktop file is not standard in Puppy. Also not standard is the newly created /root/.config/mimeapps.list, listing userapp-Firefox-FWBU91.desktop as default (the Puppy standard /usr/share/applications/mimeapps.list lists defaultbrowser.desktop).
The good news: Links in Gnumeric now work. Gnumeric does not call /usr/local/bin/defaultbrowser anymore.

So why didn't it work in the first place? Well, let's take a look into /usr/share/applications/defaultbrowser.desktop:

Code: Select all

[Desktop Entry]
Encoding=UTF-8
Type=Application
NoDisplay=true
Name=Default browser
Exec=defaultbrowser
Icon=/usr/share/pixmaps/puppy/internet.svg

Compared to the .desktop file created by Firefox this .desktop file is missing the %u parameter. After changing the line to Exec=defaultbrowser %u Gnumeric would work, even without activating the default browser setting in Firefox


Re: How do I fix browser/email open when clicking links?

Posted: Thu Aug 17, 2023 7:15 am
by ddigg
MochiMoppel wrote: Wed Aug 16, 2023 1:56 pm

Exec=defaultbrowser %u

... Gnumeric would work, even without activating the default browser setting in Firefox

Yes! I added %u as you wrote. Firefox follows the link now. Thank you so much @MochiMoppel


Re: How do I fix browser/email open when clicking links?

Posted: Fri Aug 18, 2023 9:37 am
by MochiMoppel
ddigg wrote: Thu Aug 17, 2023 7:15 am

Yes! I added %u as you wrote. Firefox follows the link now. Thank you so much @MochiMoppel

You're welcome. BTW: This fixes also the not working links in Abiword's Help menu.

However it doesn't fix your email problem, does it? The Application Chooser might change Claws Mail to whatever you prefer (changes are made in /usr/local/bin/defaultemail) , but this indeed has not effect and you will always get Claws Mail.
Not only in Firefox or any other browser.
Try this: Open Leafpad, there go to menu Help -> About -> Credits and click any of the names: "Welcome to Claws Mail" :lol:

I guess it is something to do with mime-types, possible settings in some configure file,but I cannot find where to change the behaviour

Good guess. I has something to do with mime-types. Did you figure it out? I ask because you marked your thread as "solved."


Re: How do I fix browser/email open when clicking links? (solved)

Posted: Mon Sep 04, 2023 9:35 am
by MochiMoppel
bigpup wrote:

Last edited by bigpup on Fri,23-08-18 01:59, edited 1 time in total.
Reason: added solved to show fix was found.

@bigpup I now see that you were the one who marked this thread as solved. The email problem is not solved.

@radky I don't use Puppy's email client so I'm not familiar with all details, but the problem exists in BW64 - and probably in all Puppies. Maybe few people care to change the email client?

There may be dirty workarounds to fix @ddigg 's problem, but IMHO the real fix would be to correct the current defaultemail.desktop file.

1) It would require the %u parameter:
Exec=defaultemail %u

2) as the bare minimum it would also require to set the x-scheme-handler:
MimeType=x-scheme-handler/mailto;

AFAIK this x-scheme-handler is read by /usr/bin/update-desktop-database, which scans all .desktop files and creates an updated /usr/share/applications/mimeinfo.cache file. This /usr/share/applications/mimeinfo.cache is consulted by the browser - or, as in my previous example, by leafpad - to determine the handler for an email address. So when installing an Email client different from ClawsMail and changing the defaultemail in Application Chooser the browser/leafpad would still open ClawsMail. It would simply ignore /usr/local/bin/defaultemail , the file changed by the Application Chooser.

Maybe more is needed, e.g. stripping MimeType=x-scheme-handler/mailto; from claws-mail.desktop so that browsers don't get confused. It appears that when more than one handler is defined they choose the first they see. There is also other stuff defined in claws-mail.desktop that may have to be adapted and transferred to defaultemail.desktop
[Desktop Action GetMail]
Exec=claws-mail --receive-all
[Desktop Action ComposeMail]
Exec=claws-mail --compose
[Desktop Action SendFile]
Exec=claws-mail --compose --attach %f


Re: How do I fix browser/email open when clicking links?

Posted: Mon Sep 04, 2023 9:49 am
by bigpup

OK.
I removed solved.


Re: How do I fix browser/email open when clicking links?

Posted: Tue Sep 05, 2023 2:07 am
by MochiMoppel
bigpup wrote: Mon Sep 04, 2023 9:49 am

OK.
I removed solved.

...and you changed the thread title to "32-bit Vanilla Dpup Firefox opens when clicking links, but doesn't go to the link".
This is a misleading. The issue has nothing to do with "32-bit Vanilla Dpup" or with Firefox. It is a general issue, affecting any browser and almost any Puppy. The email issue is a separate problem which may have been better placed in a separate thread, but now that it is included it should be reflected in the title. The original thread title wasn't perfect but much more to the point.


Re: 32-bit Vanilla Dpup Firefox opens when clicking links, but doesn't go to the link

Posted: Tue Sep 05, 2023 3:00 am
by bigpup

All I did was removed solved.

Looks like some other moderator made the subject edit and changed the wording.

I will try to make it what you think it should be.


Re: How do I fix browser/email open when clicking links? general issue, affecting any browser and almost any Puppy

Posted: Tue Sep 05, 2023 12:44 pm
by mikewalsh

@MochiMoppel / @bigpup :-

...and you changed the thread title to "32-bit Vanilla Dpup Firefox opens when clicking links, but doesn't go to the link".
This is a misleading. The issue has nothing to do with "32-bit Vanilla Dpup" or with Firefox. It is a general issue, affecting any browser and almost any Puppy. The email issue is a separate problem which may have been better placed in a separate thread, but now that it is included it should be reflected in the title. The original thread title wasn't perfect but much more to the point.

.........

All I did was removed solved.

Looks like some other moderator made the subject edit and changed the wording.

^^^ Lololol! :D

Looks like Flash has been on his editing kick (again). Never ever puts a reason in the moderator logs, does he..? :roll:

Mike. :o


Re: How do I fix browser/email open when clicking links? general issue, affecting any browser and almost any Puppy

Posted: Tue Sep 05, 2023 1:17 pm
by Chelsea80

@ bigpup

by MochiMoppel » 05 Sep 2023, 03:07

bigpup wrote: ↑04 Sep 2023, 10:49

OK.
I removed solved.

...and you changed the thread title to "32-bit Vanilla Dpup Firefox opens when clicking links, but doesn't go to the link".
This is a misleading. The issue has nothing to do with "32-bit Vanilla Dpup" or with Firefox. It is a general issue, affecting any browser and almost any Puppy. The email issue is a separate problem which may have been better placed in a separate thread, but now that it is included it should be reflected in the title. The original thread title wasn't perfect but much more to the point.

by bigpup » 05 Sep 2023, 04:00

All I did was removed solved.

Looks like some other moderator made the subject edit and changed the wording.

I will try to make it what you think it should be.

This is a prime example of why when a post is edited the 'changer' should identify and gives a reason for editing a post -

Had you (bigpup), to your credit, not identified and given a reason for your edit, MochiMoppel would not have been able to 'challenge' the edit -

So you took the flack for something you did do -

Last edited by bigpup on Fri,23-08-18 01:59, edited 1 time in total.
Reason: added solved to show fix was found

More importantly you took the flack for something you didn't do and had to respond to MochiMoppel -

Perhaps that 'changer' will now say 'that was me guv' -

I think it should be mandatory to identify and give a reason when a post has been edited for any reason -

The facility is there to be used -

Best regards

Chelsea80


Re: How do I fix browser/email open when clicking links? general issue, affecting any browser and almost any Puppy

Posted: Wed Sep 06, 2023 1:31 am
by bigpup

We moderators try to make edits that will add to the understanding of the topic.
Make it easier to understand and find if you did a forum search.
WE try to not edit at all or as little as possible.

But that is dependent on Us understanding the topic :!: :roll: :thumbup: :lol:

Anyway.

Back to the topic subject!


Re: How do I fix browser/email open when clicking links? general issue, affecting any browser and almost any Puppy

Posted: Wed Sep 06, 2023 10:29 am
by Chelsea80

@ bigpup

We moderators try to make edits that will add to the understanding of the topic.

That didn't work on this occasion -

Make it easier to understand and find if you did a forum search.

Fair enough, I agree -

WE try to not edit at all or as little as possible.

Fair enough, I agree -

But that is dependent on Us understanding the topic

Which I don't think you did on this occasion -

Anyway.

Back to the topic subject!

OK -

BTW, this comes to mind -

Cambridge Dictionary
Meaning of can't see the wood for the trees in English
can't see the wood for the trees
idiom UK (US can't see the forest for the trees)
to be unable to understand a situation clearly because you are too involved in it

Best regards

Chelsea80