New debian package prepuse

I have built the debian package prepuse

prepuse - prepare a mobile device for specific use

The description is: configure a mobile device from a small GUI with special settings and start needed programs for a specific usage

Until now I only use it to prepare my librem5 to use pure-maps.
Because it helps me I hope you will also like it.

If you try it, please give me feedback. I would like to know if you plan to use it in future, of if you have any ideas what could be improved, or if you have found a bug. Or if you have any questions. Or if you have other use cases, where you prepare your librem5 manually before usage, that could be improved with prepuse. If prepuse is helpful for a a lot of people, I would consider uploading it as official debian package.


# make sure you have PureMaps and OSMScoutServer installed on your librem5
sudo flatpak list | grep -e PureMaps -e OSMScoutServer
# example output:
OSM Scout Server    io.github.rinigus.OSMScoutServer    3.0.0   stable  flathub system
Pure Maps   io.github.rinigus.PureMaps  3.2.0   stable  flathub system

# Prepare for building the prepuse debian package 
sudo apt-get update
sudo apt-get install python3-docutils devscripts

# Install the sources, build the debian package and install it
git clone
cd prepuse
sudo apt install ./prepuse*.deb

see the manpage prepuse(1), on the librem console. Or press the help button
from the running application.

I have also provided a few screenshots:

1 Like

What does it mean, to prepare the mobile device?

1 Like

It looks interesting, but I’m still not sure what it actually does. Apply desired settings to flatpaks?
Some notes:

  • some people might be more willing to try a pre-built package. It seems installation takes more effort than what the app solves (yet).
  • check the spelling of prepare/preparation in the pdf
  • You can shorten the last lines of the installation instructions to
sudo apt install ./prepuse*.deb

Thanks for the question. I will try to explain, what it means for me to prepare the mobile device for pure-maps (Sorry I forgot to explain it, but it is at least in the manpage).

When me and my wife start on Sunday to make a wandering tour I need the GPS working on my librem5 very fast after we have suddenly decided where to go. My wife wants me to just load the GPS-track and then to get routed to the starting point with the car and then to find the track while wandering. I usually already have the librem5 charged from the night. But now I have to do a lot of things.:

  • blank-screen=off makes sure, that the screen is on as long as I need it.
  • gnss-check-reset=on checks that the gnss service is really running and sends data, if not the gnss service and the kernel modules will be restarted without rebooting
  • gnss-test=on this script is from purism itself. I like it, because it shows the raw GPS data. To be sure everything works I want to start it and see it and get a reassured feeling. After it has proofed to work, it can be stopped (this can also be easily done with prepuse, if you change gnss-test=on to gnss-test=off and just restart).
  • idle-dim=off Also while driving in my car, I do not want the display to dim after some time
  • location=on There is a security option in the settings, where you have to allow the access to GPS. I want to make sure, that I do not forget this.
  • osmscout-server=on Because I want to have offline data from openstreetmap I have to start the server on my librem5 that provides that data
  • pure-maps.prep=on For sure I need to start pure-maps itself, as my main GPS display
  • screen-lock=off I do not want that the screen gets locked while driving in the car.

Before I had prepuse I had to do all this steps manually. And instead of using the gnss-check-reset way (that I did not know before) I rebootet.

With this script it is easier. And After we have done our wandering tour, everything can be turned the other way around in the same way with just one click. Before that I sometimes forgot to change values back. And this could lead to a high battery usage.

I hope somebody will find another idea what prepuse could be used for (besides GPS), so I did call it prepuse and not prepGPS


Thanks, that this hint is useful.

Yes. It needs a top level readme. Here’s a link to the basic manpage which gives some idea: src/prepuse-1.rst · master · Bernd Schumacher / Prepuse · GitLab

The repo is here: Files · master · Bernd Schumacher / Prepuse · GitLab

As you can see, it installs a bunch of sh scripts (one of which uses yad = “yet another dialogue” to provide a GUI to kick them off) to apply various gsettings, do insmod/rmmod, install flatpaks, etc.

Personally, I wouldn’t install these to run them … but if you can read sh scripts, it does provide reasonable “documentation” of the steps one might undertake to, for example, get gnss ready to be used with mapping software, etc.

I write myself similar (but not for “general use” so they are less complicated) scripts … and usually include a “–noexec” option which lists the commands that it would execute to remind myself of what’s going on.


After reading your description, it makes sense.
I think I would name it ProfileSwitcher or UseProfileSwitcher (UPS!) or something like that.
Some general purpose profiles that might be useful:

  • Normal
  • Navigation
  • Reader (screen stays on, brightness?)
  • Video (probably similar to Reader)
  • Do-Not-Disturb
  • Energy Saving (e.g. all radios off)
  • Docked / Convergence Mode (e.g. switch to Audio via BT, mount network drives …)

But what each mode means could be different for different people.
I didn’t yet play with GPS on my L5, but many who did were having trouble getting a satellite fix, and downloading it from the Internet is not yet automated. So this might be a helpful addition. Although at some point this might be integrated into PureOS.

1 Like