06-13-2022, 09:57 AM
gitlab.freedesktop.org is back, apparently without data loss and thanks to Benjamin Tissoires and Daniel Stone.
I should also have mentioned the possibility of automating turning on the gps and perhaps doing the agps data bit for applications using gpsd rather than geoclue. From the gpsd man page:
When a device is activated (i.e. a client requests data from it), gpsd attempts to execute a hook from /etc/gpsd/device-hook with first
command line argument set to the pathname of the device and the second to ACTIVATE. On deactivation it does the same passing DEACTIVATE
for the second argument.
PmOS has used this to turn the gps on and off in the past. With mmcli (and sudo unless there's a polkit permission change) the options location-enable-gps-unmanaged and location-disable-gps-unmanaged can do this without modemmanager grabbing the serial port for the nmea data before gpsd can - from the mmcli man page:
--location-enable-gps-unmanaged
Enable location discovery using GPS but without taking control of the NMEA tty port. This allows other programs, e.g. gpsd, to use
the NMEA tty once the GPS engine has been enabled.
The script should of course check whether one of the other gps sources is already enabled and the port already grabbed. There will no doubt be debate about which should get priority, how/whether this should be packaged, interaction with location preference in the settings gui etc. that will need sorting out. I don't know if gpsd has a mechanism to allow/deny access per application, but getting it working at all as a user installed option would be a start.
I should also have mentioned the possibility of automating turning on the gps and perhaps doing the agps data bit for applications using gpsd rather than geoclue. From the gpsd man page:
When a device is activated (i.e. a client requests data from it), gpsd attempts to execute a hook from /etc/gpsd/device-hook with first
command line argument set to the pathname of the device and the second to ACTIVATE. On deactivation it does the same passing DEACTIVATE
for the second argument.
PmOS has used this to turn the gps on and off in the past. With mmcli (and sudo unless there's a polkit permission change) the options location-enable-gps-unmanaged and location-disable-gps-unmanaged can do this without modemmanager grabbing the serial port for the nmea data before gpsd can - from the mmcli man page:
--location-enable-gps-unmanaged
Enable location discovery using GPS but without taking control of the NMEA tty port. This allows other programs, e.g. gpsd, to use
the NMEA tty once the GPS engine has been enabled.
The script should of course check whether one of the other gps sources is already enabled and the port already grabbed. There will no doubt be debate about which should get priority, how/whether this should be packaged, interaction with location preference in the settings gui etc. that will need sorting out. I don't know if gpsd has a mechanism to allow/deny access per application, but getting it working at all as a user installed option would be a start.