[HOWTO] for a laptop, getting a localization for Firefox

Your laptop moves. It does not stay at home.

Geoclue is installed and activated by default with tumbleweed.

Default settings in /etc/geoclue/geoclue.conf is good. No need to alter the default settings.

You need to install gpsd and gpsd utilities.

You need to plug a GNSS receiver, for example this one

or this one

create a script with these statements

#!/bin/bash

busybox nc -ll -p 2948 -e gpspipe -Br &
avahi-publish -s 'GNSS data in style of NMEA-0183' _nmea-0183._tcp 2948 accuracy=exact &

In kde add this script as connecting scrip according to execute it when you connect to your profile.

You can check in a text console it works with

cgps -s

or with a graphical tool “xgps”

That’s all. Enjoy.

my experiment :

Surely it is because my home is made of concrete and my receiver is a bad quality one.

If someone know a great quality GNSS receiver, thanks.

Is there a Linux compliant GNSS receiver list ?

You can mix this solution to this one

https://forums.opensuse.org/t/howto-for-a-desktop-not-a-laptop-getting-a-localization-with-firefox/

I fogot you need to install avahi utilities

Instead of searching for a “good receiver” search for a good location for the antenna.

Inside an appartement likely the best place is attached to a window, then it can see ~half of the sky. You could use that USB dongle and use an USB cable (max. 5 meter) to get a better location, if possible on the roof.

I do not immediately see why I would need location at home, I know it can also be used for time or make some detection if GPS is jammed.

My smartphone get my position at home without any difficulty.

I just check the solution works by experimenting at home.

Many websites use your home position.

This topic is about how to get your position with Firefox with your laptop which we assume you move with it.

Also, I forgot to mention that solution works for all apps using Geoclue as Marble using Qt positioning.

Your smartphone is likely not (primary) using GPS to get it’s location.