GPS toggle for Sailfish. It is a cli tool that can switch on and off the location permission and the power from gps chip.
Version 0.0.3 and later has uid 0 so it runs with root rights! No root needed. Keep in mind that this a security issue!
Since version 0.1.0 you can change the location method.
You need to have root rights to run gpstoggle. Without parameters it prints the current status.
Options:
--help
location=0 or location=1 [switch location permission off or on]
power=0 or power=1 [switch gps chip power off or on]
lm=2 [sets the location method to DeviceOnlyMode]
Attachment | Size | Date |
---|---|---|
![]() | 26.55 KB | 28/11/2018 - 23:38 |
![]() | 35.68 KB | 12/09/2021 - 21:29 |
![]() | 35.7 KB | 13/09/2021 - 20:33 |
![]() | 16.18 KB | 14/09/2021 - 01:30 |
* Tue Sep 14 2021 Halftux 0.1.0-1
- linked now to systemsettings library
- messages to stdout
- more info
- added change location methods
- compiled with 3.4.0.24
* Mon Sep 13 2021 Halftux 0.0.3-1
- fixed new power message occurrence
- can be called as user with root rights!
- compiled with 3.4.0.24
* Sun Sep 12 2021 Halftux 0.0.2-1
- Updated to april 2020 location
- added QCore application qthread
- compiled with 3.4.0.24
* Sat Nov 28 2018 Halftux 0.0.1-1
- Initial release compiled with 3.0.0.8
Comments
Malakay
Sat, 2021/09/04 - 23:46
Permalink
Hi, i was just wondering, is possible to use this somehow as nemo, not as root? i made a thing called Carmode, its a simple script that runs predefined apps simultaneously, but gps has to be run manually before starting it. I want to obtain command for enabling gps first, so I wont have to run gps manually.
halftux
Mon, 2021/09/13 - 20:34
Permalink
Version 0.0.3 runs now under normal user it is compiled with setuid 0.
halftux
Sun, 2021/09/12 - 21:36
Permalink
Maybe you can make it work by calling it with a script.
starghost
Fri, 2018/11/30 - 00:27
Permalink
Thank you Halftux, this "gpstoggle" command is very useful. In combination with your "gpscon" command it is possible to locate a sf-phone over ssh-connection even if the gps is not activated. :)
halftux
Fri, 2018/11/30 - 04:16
Permalink
Yup thats the main reason why I written this tool and nice that some others will use it too.
Because of user rights, possible other use cases and testing purpose it is not yet included in gpscon but I am still thinking of including it. Will see. Probably set the permission settings will be next.
trial
Thu, 2018/11/29 - 19:36
Permalink
What is the Idea behind this and how is it different to the official toggle?
halftux
Thu, 2018/11/29 - 20:05
Permalink
I don't know exactly what you mean with official toggle? Is there a tool or only a settings gui?
In principle it is used for console/cron/scripts stuff and to check if the gps chip is really switched off and to have the possibility to switch it easily off. Atm my app can only toggle the use of location and not changing the settings of the location permissions.
Historyscholar
Thu, 2018/11/29 - 02:56
Permalink
Thank you!