Your rating: None Average: 5 (3 votes)

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.



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]

Application versions: 
File gpstoggle-0.0.1-1.armv7hl.rpm26.55 KB28/11/2018 - 23:38
File gpstoggle-0.0.2-1.armv7hl.rpm35.68 KB12/09/2021 - 21:29
File gpstoggle-0.0.3-1.armv7hl.rpm35.7 KB13/09/2021 - 20:33
File gpstoggle-0.1.0-1.armv7hl.rpm16.18 KB14/09/2021 - 01:30
File gpstoggle-0.1.0-2.armv7hl.rpm17.06 KB28/06/2023 - 01:16
File gpstoggle-0.1.0-2.aarch64.rpm17.74 KB28/06/2023 - 01:16

* Tue Jun 27 2023 Halftux 0.1.0-2
- compiled with

* 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

* Mon Sep 13 2021 Halftux 0.0.3-1
- fixed new power message occurrence
- can be called as user with root rights!
- compiled with

* Sun Sep 12 2021 Halftux 0.0.2-1
- Updated to april 2020 location
- added QCore application qthread
- compiled with

* Sat Nov 28 2018 Halftux 0.0.1-1
- Initial release compiled with


robang74's picture

Hi, can you compile a version for arm8 64bit or can you pass me the source code repository to compile the 64bit version?

halftux's picture

Hi, yes no problem compiled it for 64bit. I only tested it with an armv7hl device. It is a really tiny app and haven't made a repository for it. Will think about to upload the source to some git.

Malakay's picture

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's picture

Version 0.0.3 runs now under normal user it is compiled with setuid 0.

halftux's picture

Maybe you can make it work by calling it with a script.

starghost's picture

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's picture

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's picture

What is the Idea behind this and how is it different to the official toggle?

halftux's picture

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's picture

Thank you!