25 November 2025

Ever Heard of Urinary Diarrhea?

How many young people experience excess urination, pain at the kidney areas, urine pushed out involuntarily just five minutes after fully emptying the bladder, urinating in small quantities more than twenty times a day, extreme exhaustion immediately after urinating, double voiding, waking multiple times at night to urinate, loss of appetite, muscles around one or both kidneys cramping, a feeling of soreness at the muscles around the kidneys and the lower back, a brief rubbing or pulsing feeling at the kidney, excess thirst and the pain at the kidney area stopping only on consuming water? The problems disappear two weeks after stopping consumption of the trigger food (or rather, the suspected contaminant in the food).

 

(edited) photo attribution: John Medlicott on Unsplash

Surprisingly, urologists have not heard of such a phenomenon. I've had long discussions with some of them, and they say such issues happen only to old people. Renal function tests, blood tests, urine tests, prostate exam, urinary tract infection tests, ultrasounds were all normal since 2018, when such issues became prominent in my case (though I believe these may have started much earlier and I didn't notice it since it was not prominent). Some doctors and acquaintances tried to blame it on the kidneys being unable to handle excess protein, lack of exercise, urea, acidic food, spicy food, water contamination, excess salt, mental stress or it just being psychological. Nope. I know it's none of these. I don't have diabetes or thyroid issues either. I've maintained a symptom diary and found that there were some purchases of certain foods that caused these issues and some purchases of the same type of foods that did not cause any issues. This led me to the assumption that certain food producers may be following good practices and some of them may not be.

I'm of the opinion that such symptoms of excess urination and slight bits of urine being pushed out involuntarily, may be important warning signals of the body "screaming" about food contaminants. I wonder if people who ended up with severe health issues remember such early warning signs which they ignored. Such symptoms might be accompanied by skin problems and gastric problems too.

After consuming the problematic foods, it's like as though the body enters state of eliminating toxins, and the manner in which it happens is similar to diarrhea. Therefore, I'm naming it "urinary diarrhea". I know I'll be mocked for this, but instead of focusing on the phrase, it'd help to focus on the fact that people are suffering through this, and even doctors don't know what it is, or how to solve it. I've even come across newspaper articles about a "mystery kidney disease" which presents none of the usual symptoms of kidney failure, but biopsies show damage to the tubules in the kidneys. Online forums on kidney disease, MCAS (mast cell activation syndrome), hEDS and various other such strange diseases are very active with discussions about the struggles of misdiagnosis, no diagnosis and gaslighting, while the diseases cripple people's lives and their potential to earn a living. 

What worked for me

This is by no means a solution to the problem. I'm only mentioning how I temporarily managed the symptoms, in case it'd help anyone suffering from the same issues. These were attempted only after doctors ruled out other possibilities, so the first step is to consult doctors and do the necessary medical tests.

  • Drank water whenever necessary: The pain at the kidney areas reduced only when I drank water. Only as much water as my body demanded via thirst. Even during the worst phases, I did not need perhaps not more than 3.5 litres of water per day. Trying to hold the urine in is never a good idea. When the body needs to eliminate wastes, it should be eliminated, not matter how frequently it happens.
  • Started an elimination diet: Finding out which foods contained the suspected contaminant was necessary, and maintaining a symptom diary was crucial because it's easy to get confused when relying purely on memory, since the symptoms can persist for two weeks, and the recovery of the body could take even upto a month and a half. One by one I had to figure out which foods were safe and which were not, by eliminating those from my diet and finding alternate sources of nutrition. Sometimes I even verified it by placing the problematic food in the freezer and after recovering when I took it out and ate it, the symptoms would re-appear, confirming that I narrowed down on the correct source.
  • Reduced food consumption: It helped a little to reduce each meal portion by half or less than half because I assume it reduced the load on the body's filtration system. There were also mornings when I had no appetite (after a severe night of excess urination and exhaustion). I did not force myself to eat anything, because I assumed my body needed some rest, and it was ok not to eat (but drinking water was perfectly fine even then). Whenever feasible, a bit of fasting also helped (but never stopping consumption of water).
  • Switched to foods that were easy on the kidneys: During these symptoms, I noticed that temporarily switching to properly cooked semolina and vegetables were a bit less strenuous on the kidney. It seemed to help reducing starchy foods and foods high in potassium.
  • Avoided purchased food: As much as possible I consumed only food that I cooked/baked myself. 


The problems resolved on their own within a week or two without requiring any medication. I tried "organic" produce too, but so far I've had bad experiences with few purchases. Finding trustworthy sources truly is a struggle, because it's hard to find people with integrity. 

A cocktail of possible contaminants

When a person died this year from a brain tumor that killed her within a fortnight, I found it very surprising that doctors said they had no idea what could have caused the glioblastoma. When I did a simple Google search, I came across multiple research papers that tied glioblastoma to pesticides and fungicides. Urologists were not even aware of the recent discovery that Parkinson's disease may originate at the kidney. Why were these doctors not even referring scientific research papers in their field of expertise? A simple search showed me more research papers where so much was already well known

Then I came across articles about waste water contaminated with heavy metals being used to irrigate some farms, oxytocin injected into fruits and vegetables, farmers being mocked for traditional farming, various kinds of medication being used on livestock, and more. I considered doing tests on the foods that gave me health issues, but realized that I'd have to test every single purchase I made, and it was economically impractical while not having a source of income. Besides, even if I found specific contaminants, the next logical step was to find safe food, and that's what I tried.  

When people tell me that certain foods are causing the health issues, I correct them by saying that it's not the food. It's the contaminant(s) in the food. Perhaps medical textbooks need dedicated chapters added about how multiple contaminants individually weaken specific functions in the body, leading to a potential cascade of disruptions over a period of time. It is leaving doctors puzzled at what the cause and cure might be. Where is Dr.House when we need him? :-)

I created a spreadsheet of various organic foods from organic brands and was surprised at how much the prices varied, how less some of the owners were willing to reveal about what stage of conversion the farms were at (farms need to undergo a few years of “conversion” before being certified full organic), how some organic farms got blacklisted during surprise checks, how some owners didn’t care much about going into details, and sometimes refusing to reveal which farms the produce came from. One brand expected customers to compulsorily purchase a certain amount of vegetables and fruits each week and were unwilling to reveal the prices of individual produce. Meat and dairy were unreliable too, which probably meant that despite their promises, they were either missing out on some detail that was affecting my health, or there may be some other source of contamination that I missed noting. I often envy the quality of meat that people like Vilhjalmur Stefansson had access to.

Is there hope?

The issues are grave enough that it actually is sending people to their graves. I wrote to various people, asking for ways of economically testing foods on a daily basis, or having a portable method of using spectroscopy to check foods for contaminants before purchasing them. I even wrote to the researcher of the “mystery kidney disease”. No replies from anyone. Meanwhile, I keep hearing of people I know succumbing to cancer, kidney disease, Parkinson's disease, cardiac arrests, stroke, sporadic skin issues, autoimmune diseases and various other serious health issues that appear to have become far too common in recent times. Ask around. Many hide the fact that they are suffering.

As an advanced civilization, we really should have established a well regulated chain of food supply across the world, with algorithms that estimate demand and supply, transparency of where the food comes from, what checks it has undergone at each stage, effective cold storage, effective utilization of organic and indoor farming knowledge, having honest and knowledgeable people managing operations. I hoped to build something like that, coupled with a trust network, but realized that it requires far more resources and cooperation from people than what I anticipated. Still, we need to start somewhere, so if there are like-minded people, please let me know via this form. I’m happy that there are groups of people growing food on their terraces. I’m happy there are educated organic farmers and groups who are doing what is right. However, these are scattered voices that are merely the tip of the food supply chain iceberg. If “bad guys” can be so well coordinated, shouldn’t there be some way to unite the “good guys” to find solutions?

Wishing you good health

My heart goes out to those struggling with such health issues or those caring for family members suffering through it. I’ve seen how it reduces peoples lives to a skeleton of what it once was. I salute the numerous angels who visit online forums everyday, helping people struggling with issues that doctors could not help with. A decision I’m happy about is that I refused to bring my children into a world where I would be unable to give them something so basic as healthy food to eat, clean water to drink and clean air to breathe.

Meanwhile, pay attention to your kidney screaming at you by means of a urinary version of loose motion. Avoid food contaminants!

21 October 2025

Where to find an old version of Firefox for using on Android 7 and below

Firefox no longer supports Android 7, so Google Playstore no longer displays Firefox. No worries. It's possible to obtain an older APK of Firefox from the Firefox archives itself instead of downloading it from any other dubious source. 

I found version 143.0.4 here: https://archive.mozilla.org/pub/fenix/releases/143.0.4/android/

  • Version fenix-143.0.4-android-arm64-v8a: 112MB. This is for 64-bit ARM CPUs (ARMv8 architecture).
  • fenix-143.0.4-android-armeabi-v7a: 109MB. This is the application compiled for 32-bit ARM CPUs. This is the Android Application Binary Interface (ABI) that corresponds to the ARMv7 architecture.
  • fenix-143.0.4-android-x86: 121MB. This APK is for 32-bit x86 architecture, which is used by processors from companies like Intel and AMD. This is not compatible with an ARM processor.  
  • fenix-143.0.4-android-x86_64: 116MB. This is for 64-bit x86 processors. An ARM device cannot run this APK.     
  • fenix-143.0.4-android: 342MB. This directory likely contains a "universal" APK or an Android App Bundle (.aab) which contains all the APK files. If you were installing through the Google Play Store, it would deliver the correct file for your device, but for a manual installation, the specific armeabi-v7a file is the safest and most direct option.

Google's AI said that although there are technically no issues with using an old APK, there are some security considerations. It will be missing the most recent security patches and bug fixes. This can expose you to security vulnerabilities that have since been discovered and fixed in newer versions of Firefox.

It's sad that Android was built like this. There should have been an option available for upgrading to a newer version of Android even on older devices. I was hoping that Pine phone would come to the fore, but it looks unlikely. 

As per what I've heard recently, Android 10 onward supports the updation of core system components. Google is also possibly making it a reality to run the mainline Linux kernel which would make it easier to upgrade the kernel.


08 September 2025

Organic terrace gardening (OTG): Oota from your Thota (food from your garden)

The Times of India had an article about an Oota from your Thota (OFYT) meetup at St.Johns road on 7th September. I heard of such events happening in Electronic city in 2013, but since this was close enough I decided to attend. Oota is the Kannada word for food and Thota is the word for garden. What surprised me is that as per this article there were more than fifty thousand mini farms on people's terraces in Bangalore in 2020. An initiative that was begun by Dr. B. N. Vishwanath who created an NGO named Garden City Farmers way back in 1995. Unfortunately they seem to have stopped publishing on their website and switched over to Facebook, Whatsapp and Instagram, none of which I use. Particularly after reading this security warning. Anyway, OFYT organizes frequent meets where they even share seeds, so the seeds eventually become a Thota from somebody else's Oota :-) which then grows into an Oota from your Thota. Somebody even created a nice cheatsheet for home gardeners.

At the event what surprised me was the drive everyone had. They were very courteous, eager to help and made sure they proactively asked questions to figure out what problems people were facing with their terrace garden and readily offered suggestions and options on how to tackle the problems. There were various types of stalls put up around B.M. English school along the footpath. I heard there was even a workshop held inside the school regarding composting, but I missed it because one of the scouts told me there was no stall inside the school, and because there was no announcement about it other than a tiny sign that pointed to the school saying "workshop".



An encouraging glimpse into the world of various terrace farmers in Bengaluru.

 


These grow bags seemed quite sturdy. The small ones cost Rs.65.


Natural chemical free products from Little Silk (I believe this is different from another brand named The Little Silk)

 


Natural soaps. I felt they could have improved the appeal a bit more by using mounds with smoother edges and they could have also put up a poster explaining exactly how these natural soaps are better than the commercial soaps we use. Also about how the commercial soaps may be affecting health if it does. 

 


Natural lipsticks using beetroot, rose and perhaps natural oils.

 


Chocolate wax to remove tan, natural facials, etc.

 


Various food powders.

 


Organic honey, ghee, nuts, etc.

 


A green kitchen whose people are willing to teach you how to reuse or recycle things in such a way that you reduce waste significantly.


Ananth plate bank provides free steel plates, spoons, tumblers and bowls for any event you organize. You have to collect it from them, use it for your event, wash it and return it at your expense. There's also a security deposit. But otherwise it's free to use and return. Their objective is to reduce waste by allowing you to use the utensils for free.

A mixture of powdered pre-cooked organic millets etc which can be dissolved in water or milk and consumed

Various gardening tools

Decomposting agents 

Compost and manure

Rooting aid



A stall showcasing items which I understand was supported by the ministry of tribal affairs. 

These are lanterns made from actual vegetables. An electric bulb can be placed inside, creating beautiful light patterns. 


Sound tubes used by tribals to communicate during hunting. The bamboo tubes have zig zag channels inside and seeds flow down them when you turn the tubes upside down, creating a unique flowing noise.

 

The rhino on the right is said to be made from Assam tea plant wood




Bows used by fishermen in Andaman. The actual arrows used by fishermen would have metal heads. The arrows are shot through a hole in the middle of the bow so the arrows have no fletching. The arrows are said to be able to fly as far as 100m. The bow costs around Rs.450, and two arrows (with wooden arrow heads) are given with it.

 


Various homemade snacks made with organic oil and organic raw materials, prepared by a brand called "Tasty Crunchy Products" at Kammanahalli. They even make Kerala pappadam and appalam. 

Various organic pickles


Eco urban farms provide elevated garden growing containers on rent. They also help with growing the veggies by coming to your house and doing the work every month. Total cost of the rental and maintenance is Rs.5000 per month. Else, you can purchase these containers. The container slightly larger than what's in the picture cost Rs.6500. It's made of fiberglass (though it looks like aluminum) and they have other types of containers of other materials too. The weight matters, because a roof can only safely support around 200kg per square meter. Although this initially seemed ok to me, I later found large rectangular geo fabric grow bags which were far cheaper and seemed to offer more breathability (with the disadvantage that some of the bags didn't seem to be designed to hold their structure well).


Various saplings, grow bags and garden tools available for reasonably cheap prices. The saplings on the right were just at Rs.5 each.

 


Various kinds of rice and millets from JivaBhumi. There is actually something different about these food items. Although I was skeptical at first, I found it to be somewhat reliable (though I need to consume a bit more to confirm). There are specific instructions on how long to cook these rice varieties and how much extra water to use. Some can even be soaked for long to germinate them, which increases nutritional value. I had a conversation with the co-founder who seemed to be a genuine person.


Organic sugar, jaggery, dal, ancient variety of wheat.

Cold pressed oils

Various other snacks and pickles created from organic produce...


 

Products from Quantum Leap (they have a vertical named Quantum Leaf) for terrace gardening.




Various seeds available at reasonable rates. They'll send it to you via speedpost when you order.







Various products from Akshayakalpa. It's worth watching their Good Food Movement videos https://www.youtube.com/@goodfoodmovement

 

Products from Biological Research Innovation Centre and Solutions  (BRICS)

 

MycoDim is a broad spectrum, contact foliar fungicide that prevents a variety of diseases on ornamentals, trees, potted plants, fruits, vegetables and turfs. SasyaRakshak is a water-soluble plant protectant, carefully designed to contain all good constituents derived from select botanicals of known pesticidal properties. The combination of active ingredients from these plant sources provides excellent protection to the crop plants against sucking (Aphids, thrips, mites, mealybugs, hoppers, and bugs) as well as biting ( leafminers, caterpillars, beetles, weevils) insects.

 


Natural shampoos, hand wash and face wash

 

The stalls were put up on an actual footpath

Oota from my thota

In around 2014, I purchased a few grow bags and tried growing some veggies on my terrace. 


Tomato, curry leaf, coriander, pudina, mustard, green chillies and even an apple sapling grew.

The first tomato harvest had a worm/caterpillar enter one of the tomatoes. I soon found that a butterfly or moth was laying tiny yellow eggs on the leaf and those were becoming the caterpillars that ate the tomato. Removing the eggs early helped avoid that issue. I didn't purchase any seeds. I used the seeds from whatever veggies I purchased  from stores. I did face issues of the soil getting very soggy during rains, the water at the base of the grow bag accumulating at the bottom without draining off sufficiently from the drainage holes, earthworms slithering away during rains, fungus at the roots and those white flies infesting the green chilly plants. I was pleasantly surprised to see small honeybees visiting the plants, preying mantis, lady bugs and even dragonflies. There were also times I saw some plants squashed, which I assumed was because a feral cat either walked over it or used the place as a bed. I have some reason to believe it even used the soil as its private restroom. 

I mentioned some of these issues I faced, to the people at OFYT and they gave me some nice solutions like collecting the leachate using a container below the grow bag and reusing it for watering the plants after diluting it. 

There are things that can be improved with such initiatives in terms of being able to make people aware of what is available, visualizing where organic farms are nearby on a map, using tools like what3words or digipin, a trained LLM that can explain things for people instead of them having to connect with a person and worrying if one would be disturbing them, using a website or a dedicated organic farming app instead of third party tools like WhatsApp, Facebook and Instagram. Since organic food is expensive, there is much to be done to ensure that people have better access to organic food from reliable sources. 

How can we trust the organic produce? 

As for the organic produce, one of my main concerns has always been whether the farmers were honest. I was told that Aditi organic certification and India Organic certification ensures that farmers are compliant, but there is also the fact that those whose turnover does not exceed Rs.12 lakh do not have to go through the verification of compliance. Even for those who comply, there are residual limits of insecticides, other contaminants, heavy metals and toxins measured by the certification agency. This makes me worried about whether at least some farmers may use diluted insecticides etc thinking that nobody would find out. Whether the certification agencies are honest/thorough. Whether adulteration happens. Whether PFAS contamination from rain could be an issue even in remote areas. These contaminants can apparently cause kidney cancer, testicular cancer and thyroid issues and remain in the bloodstream for long. 

If you thought teflon coated pans are safe, the video below shows why it is not. If cooking with stainless steel makes food stick to the pan, the video also explains how to overcome the issue by proper pre-heating and using a drop of gliding water to check.

Then one wonders how many farmers in India know of the effects of the herbicides they use. Shockingly, even after a ban on glyphosate in 2022, there is a 2023 article that says farmers are allowed to use it, and is probably still being used in tea plantations (I wonder if that's what gave me immediate stomach discomfort on consuming green tea). Glyphosate is said to be one of the reasons for non hodgkins lymphoma as per the video below.


Then there's the issue of price. Most of the organic produce is priced at double the market rate or more. An organic farmer named Naveen in Mysore says that organic food could be priced 10% or 15% higher than other food. This seemed reasonable to me. However, I need to find out the realities of organic farming to understand the actual costs involved. Whether they get subsidies, what their actual costs are with respect to getting the soil ready for safe farming, what the FPO's (farmer producer organization) or investors take as their share, and any other realities.

Healthy food is not meant only for the rich. It's a basic necessity of life.  

I also noticed that there is a National Centre for Organic and Natural Farming (NCOF) and a Participatory Guarantee System for India (PGSI). It looks like the nudge for organic farming is slowly gaining pace. Long ago Mr. Lal Bahadur Shastri had created a slogan "Jai Jawan, Jai Kisaan" to boost the morale of soldiers and to motivate farmers to address the food shortage in the country. At least now that we aren't in such dire situations, I would like to say "Jai Kisaan" to those farmers who care about the health of the end consumer and also to the people in the supply chain who ensure that the food is not contaminated by the time it reaches the consumer. 

Technology needs to be utilized well to match demand and supply. One thing I liked about Farmizen is how for some products they show the time left for expiry of the product and also show how many units have been sold and how many remain (but I felt that like some other stores, the pricing was too high). There is much more that can be done to improve the analytics and predictability of consumption of organic food using algorithms.

When is anyone going to say "Jai Software Engineer"? :-) 

 

09 August 2025

A poem narrated by a poem: Poem Speak

In October 2006 during a boring train ride I realized it had been long since I wrote poetry (previously written for my school and college magazines and a few poems written during a poetry duel with my uncle). So I considered writing a poem, but it took a while to get that spark of inspiration.

Poem Speak 

I wandered alone, not knowing why.
Walking the thick jungle, looking out for the sky.
He knows I'm here, I assured my heart.
All he needs is a little head-start.
For months together have I been.
A thought, a wish, in this jungle unseen.
He set my heart beating. Now it shall not cease.
For my departure shall put this jungle at ease.
I ask him, I plead him, to set me free.
For I am a poem, yearning to be read by thee.

Written on: 27/10/2006 

 

What the poem means: 

The jungle is my mind, in which the thought of writing a poem has been going on for a long time. It remained a thought for a long time. Couldn't get started with it because I didn't find myself in a mood for writing poetry. Although once the poem found it's way out of my mind, onto paper, my mind is once again at ease and the poem is happy that I set it free. 

How it's relevant to poets

Poem Speak is essentially a poem writing itself. During the literature survey for my MTech in Artificial Intelligence, I came across the fact that neurons go through the jungle of the brain and are guided to other neurons via guidance proteins. Neurons even tend to seek out connections. Poem Speak poetically personifies (if I could use the term liberally) the thought process of every writer or poet who is stuck with writers block and eventually figures out what to write. The process of thinking of what to write perhaps being physically manifested by the neurons in their brain seeking out connections and building a pathway of prose which takes shape and finds its way to becoming alive in the minds of everyone who reads it.

I submitted the poem to a weekly magazine for speculative fiction. Although it wasn't accepted, the reviewer wrote back appreciating it, saying that since the poem had a fun twist at the end, it worked well and caused him to re-read the poem.

 

07 August 2025

How to use Github SSH when working with more than one Github account?

I had earlier written about how to use an SSH key to clone, push and pull from Github.When working with more than one Github account, Git automatically considers only the first key even if you add a second key file in the ~/.ssh folder. To make Git recognize the right file, you need to add a new config file in that folder.


First add a new ed25519 file (like how it's normally done) for the second account and give it a new name like id2_ed25519.
Then create a new file named config.

Now add this exact text into the config file:

# First GitHub account
Host github.com
    HostName
github.com
    User git
    IdentityFile ~/.ssh/
id_ed25519

# Second GitHub account
Host
github-second
    HostName github.com
    User git
    IdentityFile ~/.ssh/
id2_ed25519

If there are any errors related to file permissions, change the permission using chmod 600 ~/.ssh/id2_ed25519 but it's unlikely there would be such issues.

That's it. Now to clone from the first account you can use the equivalent of:

git clone git@github.com:username1/gitRepository1.git

To clone from the second account you can use the equivalent of:

git clone git@github-second:username2/gitRepository2.git


09 July 2025

Installing PyEnv on Raspberry Pi

Earlier I detailed the steps for installing PyEnv on Linux, but there are some small changes for doing the same on Raspberry Pi, so for my reference and the reference of anyone else, I thought I'd mention it the way Sam Westby did, but thought I'd automate the process by creating a script which even adds the necessary lines to bashrc.

#!/usr/bin/env bash

echo "Proceeding with installing PyEnv"

curl https://pyenv.run | bash

#Add environment variables to bashrc

echo "export PYENV_ROOT='$HOME/.pyenv'" >> ~/.bashrc

echo "[[ -d $PYENV_ROOT/bin ]] && export PATH='$PYENV_ROOT/bin:$PATH'" >> ~/.bashrc

echo "eval '$(pyenv init - bash)'" >> ~/.bashrc

#Restart the terminal to make bashrc changes effective

exec $SHELL

#Install other required packages

sudo apt-get install -y libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev llvm libncurses5-dev libncursesw5-dev xz-utils tk-dev libgdbm-dev lzma lzma-dev tcl-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev wget curl make build-essential openssl

pyenv update

pyenv install --list

pyenv install 3.12.10

pyenv global 3.12.10



05 July 2025

Imager: Evolving image enhancement settings instead of manually tweaking them

This was an idea I got during the first year of my MTech in AI. There was an image with poor contrast which I wanted to enhance, but given the various ways of enhancing images and it being difficult to narrow down on the right settings, I created a Python program which used Differential Evolution to explore various values of various combinations of settings, and narrow down on the kind of image quality I wanted. My professor was happy to see the program working, but because the "fittest" individuals of the population had to be manually selected by the User (subjective technique), my professor suggested trying to find an objective technique of doing it. Since what a person is looking to enhance in an image would be subjective, perhaps one objective way of doing it would be to prompt an AI and the AI could come up with an objective score. Anyway, since my Python program was not very accessible, I decided to create the program in JavaScript and make it available on GitHub.io as Imager: https://nav9.github.io/Imager/image-filters.html.


All you have to do is upload an image, and Imager will use Particle Swarm Optimization to randomly apply a chain of image processing steps to copies of the image. You can click images you like, and the "swarm" of settings would slowly converge to variations that are closer to the kind of settings that give you the kind of enhanced image you want. If you don't like any image, simply avoid clicking any of them and continue clicking Evolve, which will generate more random settings and values.

Since Imager runs on the browser as a fully client-side app, it's advisable to not use very large images. If your objective is to apply selected settings to a large image, you can always use the "Manual" button which allows applying settings to more than one image you choose to upload. 

Imager is merely a demo app. It can be made far more powerful as a desktop app or with server-side functionality. Do have a look at the other image resizing and cropping options in the navigation bar of Imager. 

28 June 2025

Access internet on Raspberry Pi when connected to two network interfaces

I had a Raspberry Pi 3B connected via LAN cable to a Wifi router which wasn't connected to the internet. Through the router I could connect to the RPi via my desktop PC's Wifi. So VNC and SSH worked nicely in terms of being able to view the RPi desktop and being able to exchange files via scp. However, when I activated my phone's hotspot and the RPi's Wifi connected to the hotspot, I could not access internet.

I soon found out that this happened because the RPi gave a higher priority to the LAN connection than to the Wifi hotspot. So it was just a matter of changing the priority in a few simple steps.

Type `ip route show` to see the existing connections. You may see something like this:

default via 192.168.1.1 dev eth0 proto dhcp src 192.168.1.2 metric 100

default via 192.168.42.1 dev wlan0 proto dhcp src 192.168.42.125 metric 600

What this means is that the gateway for the LAN connection (eth0) is 192.168.1.1 and the IP is 192.168.1.2. The gateway for the wireless connection (wlan0) is 192.168.42.1 and the IP is 192.168.42.125. Since the LAN is listed first, it has the higher priority. So you simply need to add the route to the wireless IP address:

sudo ip route add default via 192.168.42.125 dev wlan0 

You can confirm it got added to the top of the list by typing `ip route show`.

Then simply restart the network service. If `sudo systemctl restart networking` or `service networking restart` gives this error: `Failed to restart networking.service: Unit networking.service not found`, then you can simply type (it didn't disrupt my VNC connection):

sudo ifconfig eth0 down && sudo ifconfig eth0 up &

This will restart eth0 and you'll be able to connect to the internet. You can check by typing:

ping 8.8.8.8 

04 June 2025

Accessing an Android phone via ADB using a Linux desktop PC

It turns out, one way to reduce the size of a Flutter app, is by splitting it into builds for each specific device architecture you want. So if you type:

flutter clean; flutter build apk --split-per-abi 

It'll give an output like:

✓ Built build/app/outputs/flutter-apk/app-armeabi-v7a-release.apk (6.9MB)
✓ Built build/app/outputs/flutter-apk/app-arm64-v8a-release.apk (7.4MB)
✓ Built build/app/outputs/flutter-apk/app-x86_64-release.apk (7.6MB) 

Now I needed to know which one I could use on my phone, and realized that in all these years, I didn't bother finding out what architecture my phone was running. 

So I activated Developer Options and USB Debugging on my phone and did the following:

sudo apt update; sudo apt install adb

Now ADB (Android Debug Bridge) should be installed. To see which devices you can connect to via ADB, type:

adb devices

You'll be asked on your phone for permission to do USB debugging. Grant it.

Now either type: 

adb shell uname -m

Or, just:

adb shell

And then type:

uname -m

And now I know the phone is armv7l, which is an ARM 32 bit architecture.

So now I know I could have also tried:

flutter build apk --target-platform android-arm --analyze-size


There are many other ADB commands:

To copy files: 

adb pull /path/to/phone/file /path/to/desktop/folder

Mount the phone onto the Linux filesystem:

sudo apt install adbfs
mkdir ~/android
adbfs ~/android

Now you can access the files via your desktop computer at ~/android

To get elevated permissions with ADB:

adb kill-server
sudo adb start-server
adb devices

For more commands, simply type:

man adb

15 May 2025

Adding lockscreen functionality to Raspbian OS

When you install an older version of Raspbian, there is no lock screen option. To add it, instead of going to `/etc/xdg/lxpanel/LXDE-pi/panels/panel` and adding any extra lockscreen lines, simply do this instead:

Technique 1: Screen locks but does not go blank

  • Click the RPi start menu and select Preferences > Main Menu Editor
  • In the editor click New Item and enter the following in the respective fields:
  • Name: Lock
  • Command: /usr/bin/dm-tool lock (don't use dm-tool lock because it is unsafe. The password can be bypassed with Ctrl Alt F7)
  • Command: swaylock
  • Comment: Lock screen
  • Click "Ok" and reboot.

You can also press Ctrl Alt L to lock the screen. 

Technique 2: Screen goes blank, then locks and stays blank

The script below is meant to put the monitor into power saving mode just before swaylock is used to lock the screen (without swayidle, the monitor remains switched on even after the screen is locked). Make sure screen blanking is switched on before using this script by going to Raspberry Pi Preferences > Raspberry Pi Configuration > Display > Screen Blanking.
This script assumes that the screen gets locked only when the User manually selects lock.To make this script runnable on lock, go to Preferences > Main Menu Editor and create a new item with the path and name of this script's file as the "command". For example: /home/<your username>/lock_screen.sh
The default swayidle command would be preconfigured in /home/<your username>/.config/labwc/autostart as swayidle -w timeout 600 'wlopm --off \*' resume 'wlopm --on \*' . The script below would override the default swayidle by killing the swayidle process.


Create the following script in your Raspberry Pi home directory with the name lock_screen.sh (or whatever name you prefer).

#!/bin/bash

# Kill existing swayidle processes
pkill -f swayidle

# Run swayidle with timeout 1. Screen blanking will happen after 1 second
# wlopm is Wayland output power management. See its man page
swayidle -w timeout 1 'wlopm --off \* ; swaylock &' resume 'wlopm --on \* ; pkill -f swayidle' 

# Set screen blanking to 5 minutes (300 seconds)
swayidle -w timeout 300 'wlopm --off \*' resume 'wlopm --on \*' &


To detect if the screen is blanked

You can run `wlopm -j`, and the power mode being on or off will tell you if the screen is blanked or not.

To detect if the screen is locked

#!/bin/bash

#PROCESS_PATH="/usr/sbin/pi-greeter"
PROCESS_PATH="swaylock"

while sleep 2
    do
        if pgrep -f "$PROCESS_PATH" > /dev/null
        then
            echo "$PROCESS_PATH is running. Screen is locked"
        else
            echo "$PROCESS_PATH is not running. Screen is not locked"
        fi
done
 

Some bonus info: If you don't like the bright white wallpaper of the login screen, you can change it in /etc/lightdm/pi-greeter.conf
 
There really needs to be a better, standardized way to detect screen locks across operating systems.