Hi all
My first “meaningful” contribution to this community…
i have recently completed fixing some bits of code for a chrome extension that communicates with GPSD. The original bits of code was taken as inspiration from GitHub - micolous/gpsd-chrome-polyfill: gpsd polyfill for Chrom{e,ium}. I have forked the code into GitHub - sulph68/gpsd-chrome-extension: gpsd chrome extension.
I have tested this for a while and indications are that it works well as long as there is a good and active installation of GPSD on the uConsole.. with a GPS device of course. i am currently testing with a HOLUX USB based m-241.
i have yet to package this into a publicly available extension. I am still contemplating if i want to go that.
If anyone would like to take this extension for a spin, please check out the code and enable it in developer mode within chrome://extensions
Please make sure that you have tested the gpspipew.py command before installing.
If all is done correctly, one should
- see that the GPSD connector is installed
- Be able to get a precise location when using Google Maps, OSM or any other software.
i am using this in a combination of gpsshare, gpsd. This allows me to use all my software such as gnome-maps, xgps, cgps, pygpsclient all at the same time without locking up the serial port.
Let me know if anyone has any questions!
2 Likes
Sharing a little more details on how i setup my GPS such that a few apps can read the same device at the same time.
Just set this up a couple days ago. Works beautifully. There was a bit of pain from my only editing the extension id ifor the native messaging host file (sg.id.copper.gpspipe.json) in the /etc/opt/chrome folder instead of the etc/chromium folder but after banging my head off my desk for an hour, I, or more honestly, chatgpt, figured it out.
Then I promptly broke it because I didn’t properly comment out all the lines for the big popup bar that shows up on every page.
But thanks for your contribution !
hahah… thanks for trying. I have only tested so far on Chromium as thats the only browser that i have on my unit. I just checked how it shows up on my device. the big bar on the top that shows “… installed” when enabling the extension should disappear after a few seconds… does it not happen for you?
Any other tab that opens after that does not automatically turn the extension on as well.
If you would provide some details, i might be able to help.
That said, the right way for me to properly deal with this is to actually publish this properly as an extension. That would then solve the ID issue for everyone.
Yes the bar does disappear after a few seconds, but it was loads in on every website I visit and I visit a whole lot of websites so it annoyed me rather quickly lol. It loads on basically every web page I visit, with only the occasional except of moving through pages within certain sites, but it loads on any new site I open, even if I have already visited it recently, or have it open in another tab. So I just went into the shim.js and commented all of the toast functionality out. It is working again since I actually managed to comment out all of the relevant lines after a little nap.
I have only tested on chromium as well, what i was attemting to say in my 3am mispellings was that there are two sg.id.copper.gpspipe.json files that automatically install; one in a folder for a chrome install and the other in a folder for a chromium install and my google poisoned brain edited the chrome one without a thought. I was posting for any other google poisoned folx who might make the same mistake and not notice.
But yes publishing it certainly would solve the joys of messing with extension ids, thankfully for me the frustration of tinkering is half the “fun” sometimes lol. That said easier installation is never a bad thing.
Yeah. Thanks for the feedback. Let me explore. A little busy with work these days but will find some time to explore how to publish. And perhaps give some thought to how to make the installation alert better. 
1 Like
i have updated the extension to handle the following
- Made a smaller alert. It now shows just a small alert pill on the top left before disappearing.
- The alert pill only only show once per session per site when the extension is enabled.
I figured it is still important to show the user that the extension is enabled for a give site so that they don’t share their position unknowingly.