this post was submitted on 26 Apr 2024
44 points (94.0% liked)
Firefox
20372 readers
159 users here now
/c/firefox
A place to discuss the news and latest developments on the open-source browser Firefox.
Rules
1. Adhere to the instance rules
2. Be kind to one another
3. Communicate in a civil manner
Reporting
If you would like to bring an issue to the moderators attention, please use the "Create Report" feature on the offending comment or post and it will be reviewed as time allows.
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
I think it would be much cleaner to make an addon that does this within the browser and exposes the functionality as a web API (or failing that, connects to a relay server locally). Then you can just use curl to send it commands.
You can look at how KDE Connect / Plasma Browser Integration does it, it does very similar things to integrate with Plasma like go to a tab via KRunner.
Also I specifically want that from the console. The console is the universal tgat doesn't require using some particulat language, or even programming at all
How can a browser add on receive commands from command line or open a port ?
They can't open a port, but they can connect to webservers (and similar things) on localhost.
There's also "native messaging", this might be a better choice if you go the addon route.