01-27-2021, 04:19 PM
(This post was last modified: 01-27-2021, 05:18 PM by derbaertigefrytz.)
Hello everybody.
Let me know, what you tink about this.
Alarms that are set in the Clocks App of (at least) Mobian are, as far as I can see, actually not reliable.
They do not go off, if the phone is in stand by mode for some time.
Sometimes they go off, when I wake up the phone, sometimes, when I unlock it, and sometimes they do not at all.
My first approach was to use a cronjob, that wakes the phone up, 1 minute before it is time for the alarm. Any (!) command executed by cron did the job. I used "ls".
This worked well and I used this solution for several days, until I decided, that the standard alarm tone is crap. And even worse, it will last precious seconds to find my glasses, unlock the phone, open the header and stop it.
No, I wake up with my favorit music, the phone is already unlocked and I am able to quit (if I wish) without using my glasses.
Here is, how it works.
You need to install cron and mplayer.
You create a cronjob that (1) unlocks your device and (2) starts mplayer in a kingscross session. mplayer will play every music you like.
cron will wake up your phone reliable, even after a long night. Your display remains dark.
To end this "alarm", you have to press the power button once, then either hit q, or p on the keyboard. This will quit, or pause mplayer.
As an alternative you can end kingscross. This is what I do, because I can do it without my glasses.
I hit the arrow icon to switch to task view, swipe to close and hit the fat red button on the right (indicating, mplayer is running in the terminal)
Yes, that are two to four key presses. More than in standard spy phones but less than necessary whith the standard alarm.
Here is, what has to be done before (you need basic knowlege of command line editors, cron, mplayer).
In Kingscross, or from a SSH session do:
sudo apt install cron
sudo apt install mplayer
crontab -e
## In the file, that opens, enter the following line
30 7 * * * loginctl unlock-session 1; DISPLAY=:0 /usr/bin/kgx -e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3"
That's all.
At 7:30 on every weekday (30 7 * * * ), cron will now unlock the device in your name (loginctl unlock-session 1) and start kingscross (/usr/bin/kgx). Kingscross will execute mplayer and let it playback the german WDR5 info radio (-e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3").
The mplayer manpages will tell you, how to set the initial volume and how to play your inividual playlist.
The cron manpages will tell you, how to configure "alarms" for working days, weekends etc.
Let me know, what you tink about this.
Alarms that are set in the Clocks App of (at least) Mobian are, as far as I can see, actually not reliable.
They do not go off, if the phone is in stand by mode for some time.
Sometimes they go off, when I wake up the phone, sometimes, when I unlock it, and sometimes they do not at all.
My first approach was to use a cronjob, that wakes the phone up, 1 minute before it is time for the alarm. Any (!) command executed by cron did the job. I used "ls".
This worked well and I used this solution for several days, until I decided, that the standard alarm tone is crap. And even worse, it will last precious seconds to find my glasses, unlock the phone, open the header and stop it.
No, I wake up with my favorit music, the phone is already unlocked and I am able to quit (if I wish) without using my glasses.
Here is, how it works.
You need to install cron and mplayer.
You create a cronjob that (1) unlocks your device and (2) starts mplayer in a kingscross session. mplayer will play every music you like.
cron will wake up your phone reliable, even after a long night. Your display remains dark.
To end this "alarm", you have to press the power button once, then either hit q, or p on the keyboard. This will quit, or pause mplayer.
As an alternative you can end kingscross. This is what I do, because I can do it without my glasses.
I hit the arrow icon to switch to task view, swipe to close and hit the fat red button on the right (indicating, mplayer is running in the terminal)
Yes, that are two to four key presses. More than in standard spy phones but less than necessary whith the standard alarm.
Here is, what has to be done before (you need basic knowlege of command line editors, cron, mplayer).
In Kingscross, or from a SSH session do:
sudo apt install cron
sudo apt install mplayer
crontab -e
## In the file, that opens, enter the following line
30 7 * * * loginctl unlock-session 1; DISPLAY=:0 /usr/bin/kgx -e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3"
That's all.
At 7:30 on every weekday (30 7 * * * ), cron will now unlock the device in your name (loginctl unlock-session 1) and start kingscross (/usr/bin/kgx). Kingscross will execute mplayer and let it playback the german WDR5 info radio (-e "mplayer http://wdr-wdr5-live.icecast.wdr.de/wdr/...stream.mp3").
The mplayer manpages will tell you, how to set the initial volume and how to play your inividual playlist.
The cron manpages will tell you, how to configure "alarms" for working days, weekends etc.