Just an ordinary day with a mobile device running Linux. Not with a communication device, aka a phone. I believe that a phone should offer very reliably just these features:
- Calls
- SMS
- E2E encrypted foss IM
- Deep sleep and push notifications (or any alternative for notifications without draining the battery)
As far as I know, there is no such a device, is there?
So, this post is not about using a Linux phone as a daily driver. It is about how I use a Linux mobile device for tasks that do not involve communications.
Device and operating system
Devices based on the Qualcomm MSM8953 Snapdragon chipset have been ported to closed-to-mainline Linux kernel. Thank you postmarketOS community. Most of the features of my old smartphone are available in postmarketOS. I opted for the edge channel to get new features early. In case of any issue, I report it to the maintenance team. For graphical environment, I have chosen SXMO (Sway). Everything I need is accomplished by a hackable shell script.
Tasks
Web radio
First thing every day - OK, after coffee- is to switch on the radio. Just add some streaming addresses to a simple script.
News
Every now and then I try to keep up with what's happening in the world. SXMO offers a nice sfeed-based script to fetch RSS/Atom feeds. But I prefer to get the news in a single long page of headlines followed by a short description. Something like this:
Screenshot of sfeed_news on SXMO
It has been achieved by modifying the original sxmo_rss script.
Feed subscriptions should be added to ~/.config/sxmo/news_sfeedrc
. In the same file, the feed content location is also set:
sfeedpath="$HOME/.local/share/sfeed_news"
# list of feeds to fetch:
feeds() {
# feed <name> <feedurl> [basesiteurl] [encoding]
feed 'Example 1' 'https://www.example1.com/xml/rss/all.xml'
feed 'Example 2' 'https://example2.com/rss'
}
In general, for long reads I follow an ebook-reader-oriented workflow. However, to get the full, readable version of an article, rdrview has been installed and a w3m keymap entry has been added to ~/.w3m/keymap
keymap R COMMAND "READ_SHELL 'rdrview $W3M_URL -H 2> /dev/null 1> /tmp/readable.html' ; LOAD /tmp/readable.html"
Go to a More link, press Enter, then R and you get a readable version of it (or, I hope so).
Podcasts
I listen to podcasts. Sometimes. With a modified version of the sxmo_rss.sh script.
It offers:
- Subscriptions as menu entries
- For each subscription, a list of entries for each episode
- For each episode, three actions:
- Get more info about the episode
- Listen
- Download
Fetch to get the latest list of subscriptions and episodes:
sfeed_podcast initial menu
Find the content you like:
sfeed_podcast subscriptions menu
sfeed_podcast episodes menu
Play or download it:
sfeed_podcast actions menu
Subscriptions and feed content location should be set in ~/.config/sxmo/podcasts_sfeedrc
, e.g.:
sfeedpath="$HOME/.local/share/sfeed_podcasts"
# list of feeds to fetch:
feeds() {
# feed <name> <feedurl> [basesiteurl] [encoding]
feed "Cory Doctorow" "https://craphound.com/feed/"
feed "postmarketOS" "https://cast.postmarketos.org/feed.rss"
feed "FSFE" "https://fsfe.org/news/podcast.en.rss"
feed "How to fix the internet" "https://feeds.eff.org/howtofixtheinternet"
}
Podcasts are saved in ~/Podcasts
. Use the Files script to play downloaded files.
Musical practice
For musical practice I need a metronome and backing tracks.
Some time ago I wrote a simple metronome script based on sox and mpv. It works OK.
simple_metronome beat selection menu
Already downloaded tracks can be directly played using the Files script. To get new ones, this script has been modified, to present video search results in a single html page:
sxmo_invidious_w3m search results
To facilitate direct playing, mpv has been added as external browser in ~/.w3m/config
:
extbrowser xdg-openP
extbrowser2 /usr/bin/mpv
alongside with a couple of entries in ~/.w3m/keymap:
keymap m EXTERN_LINK
keymap M EXTERN
If the cursor is on a More link, video can be directly played by pressing "2, m".
Caveats
The volume of the device is very low. On the bright side, bluetooth works perfectly. Well, for bluetooth.
Headphones -the ones with a cable- are haunted by spooky noise when audio play ends. There is a workaround but a pair of bluetooth headphones is a wiser choice.
Conclusion
This setup works very reliably. It does what is expected to do and it does not crash. Great.