Fresh installation of search plugin on start

Add-ons for Pale Moon and other applications
General discussion, compatibility, contributed extensions, themes, plugins, and more.

Moderators: FranklinDM, Lootyhoof

infinite_recursion

Fresh installation of search plugin on start

Unread post by infinite_recursion » 2020-12-06, 12:51

To prevent centralization of search engines, I'm creating a searx plugin which will randomly select an online searx instance for the user for a uxp based browser session. While the logic is fully done, I have absolutely no idea where to start with respect to installation on start of browser session.

https://notabug.org/sagaracharya/random ... uxp_plugin

In the above repo, I want to run the start.js script on browser startup, set the temp variable as the search url in the xml file and install the xml file to the browser 'without prompt'.

I need help wrt, which scripts run at system startup in a plugin? How can I install an xml file at the start of a session without any notification to the user?

Alternatively, if I can change OpenSearchDescription backend such that instead of static xml file, it automatically updates the search engine, that would be great.

Please help.
Thanks in advance.

New Tobin Paradigm

Re: Fresh installation of search plugin on start

Unread post by New Tobin Paradigm » 2020-12-07, 17:28

Well you can't. You cannot bypass a prompt for installation of a search plugin else it could be abused.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4980
Joined: 2015-12-09, 15:45
Contact:

Re: Fresh installation of search plugin on start

Unread post by moonbat » 2020-12-07, 23:25

Also, browser plugins are a completely different thing from search plugins so this post needs to be moved elsewhere.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

infinite_recursion

Re: Fresh installation of search plugin on start

Unread post by infinite_recursion » 2020-12-09, 18:35

New Tobin Paradigm wrote:
2020-12-07, 17:28
Well you can't. You cannot bypass a prompt for installation of a search plugin else it could be abused.
That's why it's free software. To make sure that it is not abused and the user can cross-check the logic. And at max and xml file will steal query words which are still 1000x less abusive than today's javascripts on most sites.

What about the 2nd question? How to update xml file on start of browser session? So the browser starts, fetch, change xml, and plugin loads. Boom. Done.

Tell me more about browser start scripts

New Tobin Paradigm

Re: Fresh installation of search plugin on start

Unread post by New Tobin Paradigm » 2020-12-10, 12:06

Nah. You can cross-check the logic for your self.

infinite_recursion

Re: Fresh installation of search plugin on start

Unread post by infinite_recursion » 2020-12-12, 08:18

Come on, New Tobin Paradigm. I'm not the adversary here. Would you not have a more decentralized system instead of winner takes all?

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4980
Joined: 2015-12-09, 15:45
Contact:

Re: Fresh installation of search plugin on start

Unread post by moonbat » 2020-12-12, 08:46

infinite_recursion wrote:
2020-12-12, 08:18
Come on, New Tobin Paradigm. I'm not the adversary here. Would you not have a more decentralized system instead of winner takes all?
I don't know how many years you have spent developing end user software, but the bottom line is that you always respect the user's choices and leave them in control. That includes not installing random shit on startup without their permission as you want to do. While your intentions are benign, allowing this exactly lets smarmy advertisers to flood a user's list of search engines with their own ones and this behavior taken from the original Firefox was made keeping in mind what a dumpster fire Internet Explorer was in comparison.

You can only detect browser startup/shutdown events when developing an extension, so you'll have to make a separate extension that can dynamically select a searx instance to query, it won't be able to integrate with the existing search plugin mechanism.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

infinite_recursion

Re: Fresh installation of search plugin on start

Unread post by infinite_recursion » 2020-12-14, 19:23

moonbat wrote:
2020-12-12, 08:46
I don't know how many years you have spent developing end user software, but the bottom line is that you always respect the user's choices and leave them in control.
But who told you that the user will not be able to remove the plugin. Obviously if he chooses to remove the plugin, there will be an option(super easy one) and the scripts will be gone. User is in control. For user, installing and uninstalling will be easy. It's just the structure of search code internally which is different.
moonbat wrote:
2020-12-12, 08:46
You can only detect browser startup/shutdown events when developing an extension, so you'll have to make a separate extension that can dynamically select a searx instance to query, it won't be able to integrate with the existing search plugin mechanism.
This will not work through default address bar. People are already into typing everything in address bar. My usage audience will be considerably reduced if I make a separate box or take some keyword for triggering search, etc. Changing habits are one of the most difficult things and we shouldn't strive for it.

I've thought about it. It's the only way.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35591
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Fresh installation of search plugin on start

Unread post by Moonchild » 2020-12-14, 21:05

The only way is using an extension to manipulate search engines, I think. The browser itself does not permit scripted install of searchplugins without a prompt.
On top, you have to think really carefully if you aren't violating the redistribution license, depending on how you want to use this setup -- since you aren't actually providing details how you want to use this; if distributing to any audience with this kind of setup baked in, you aren't allowed to use the official binaries. See http://www.palemoon.org/redist.shtml points 3c, 3e, 3f.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4980
Joined: 2015-12-09, 15:45
Contact:

Re: Fresh installation of search plugin on start

Unread post by moonbat » 2020-12-15, 00:26

infinite_recursion wrote:
2020-12-14, 19:23
But who told you that the user will not be able to remove the plugin
That is not the issue here. The issue here is the attitude of 'Better to ask for forgiveness than permission' by silently installing it in the first place. This is what Mozilla does now - randomly resetting preferences and removing features and 'oh you can always change it back from about:config' till the ability to do so is pushed down to ESR and finally out altogether (mandatory extension signing for example).

You do not mess around with the user's installation or settings without permission, period.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked