Mostly work related stuff which I would've entered into my "Log book". Instead of hosting it on an intranet site, outsourcing the hosting to blogger!
Friday, May 09, 2025
qemu for arm64 on x86_64 Linux machine
Jenkins and Github
I was curious to know how Jenkins CI/CD works with Github, similar to what is seen on the OpenSpace repository. So one way is to use webhooks, as detailed in this guide,
Complete Step-by-Step Jenkins CICD with GitHub Integration | by Mudasir | Medium
Tuesday, May 06, 2025
bash: cannot execute: required file not found
Monday, May 05, 2025
Sunday, May 04, 2025
virtualizing Raspberry Pi on an iPad with UTM
We can virtualize a Raspberry Pi with UTM, but need old 32 bit version, since 64 bit is broken on UTM, tho' QEMU works -
script to run multiple commands on a remote server over ssh
Made Chatgpt write the following script. The EOF syntax is useful. In our case, we need to put in the appropriate -pPORT also.
write a bash shell script to ssh into two servers server1 and server2 with ssh keys key1.pem and key2.pem, run sudo apt upgrade on both, and show the result on the terminal.
#!/bin/bash
# Define servers and keys
SERVER1="user1@server1"
KEY1="key1.pem"
SERVER2="user2@server2"
KEY2="key2.pem"
# Function to upgrade a server
upgrade_server() {
local SERVER=$1
local KEY=$2
echo "Upgrading packages on $SERVER..."
ssh -i "$KEY" -o StrictHostKeyChecking=no "$SERVER" << 'EOF'
echo "Running apt update..."
sudo apt update
echo "Running apt upgrade..."
sudo DEBIAN_FRONTEND=noninteractive apt upgrade -y
EOF
}
# Upgrade both servers
upgrade_server "$SERVER1" "$KEY1"
echo "---------------------------------------------"
upgrade_server "$SERVER2" "$KEY2"
Saturday, May 03, 2025
x86 Emulation on iPad with UTM
- Swipe up from down and hold, to show all applications - swipe up applications which you want to close and start again with JIT, like UTM.
- Start StosVPN, click to start the connection
- Start StikJIT - one-time requirement of passing on the path to the pairing file, then
- Click Enable JIT - a few moments later, it prompts for which app to enable JIT for, from a list of apps - choose UTM, and then UTM opens up with JIT enabled. Can start up JMs at this point.
Thursday, May 01, 2025
monitoring websites for changes - followthatpage
There was a request from one of my colleagues for suggestions - he wanted a tool to automatically let him know when some particular websites had changes. Something similar to an RSS feed for a website which doesn't have an RSS feed, I guess.
I replied that I use
https://www.followthatpage.com/
to monitor up to 20 pages for free per account per day - so if you don't want daily checks, you can add more pages, too.
There are many other "freemium" and paid options, too.
Wednesday, April 30, 2025
development for Android / iOS - preliminaries
Tuesday, April 29, 2025
info about various ARM platforms
https://www.baeldung.com/linux/arm64-armel-armhf-overview
So, arm64 is sometimes referred to as aarch64. But the github arm64 appimage builds are not compatible with Ubuntu on raspberry pi 4 etc, maybe because of library differences, since the github runners are Ubuntu 24.04.
Monday, April 28, 2025
simple logger created by chatgpt
moving Virtualbox VMs to external drive
VirtualBox Manager
> Right-click on the VM
> Select "Move"
> Choose the new location and click "Move"
(Tho' the progress bar doesn't seem to work, it moved the VM and associated files to the external drive in approx the usual time it would take for a 12 GB file move.)
Sunday, April 27, 2025
OCVWarp AppImage won't run on Raspberry Pi
(a) /tmp not allowing executable permissions
(b) the ld-linux-aarch64.so not having executable permissions
)
Google's "free to try" AI Studio
Refining my prompt, changed it to "Generate a VR360 equirectangular video of sunset over a beach" which resulted in this:
Geekbench scores - Android phone, iPad, laptop, desktop, Raspberry Pi
Saturday, April 26, 2025
Ubuntu using userland on Android
Wednesday, April 23, 2025
airtel's horrendous "AI" customer service
I was trying to recharge another prepaid Airtel number with "international roaming plan 2997" for 365 day validity.
Tried with Airtel thanks app from my Airtel mobile - failed.
Tried from website - failed.
Tried calling customer care - they said try going to a shop.
Tried from shop - failed.
Tried sending them an email to 121@in.airtel.com - "We noticed that you're contacting us from an email ID that isn't linked to your Airtel account.
You shall write back to us from your registered ID or reach out to airtel thanksapp get instant support 24x7 right from the help and support section."
The help and support section is a chatbot. There didn't seem to be any option to contact a human being.
Finally, I thought maybe trying from the Airtel app on the actual prepaid account for which Intl. Roaming was needed - success. Edit - half an hour later, that transaction was reversed, too!
Airtel's own customer service people did not know this, the shop guys (tried two different shops) did not know this, it is not mentioned anywhere that these intl. roaming plans need to be bought from the phone which is actually going to roam!
UTM for OpenSpace on iOS / MacOS
Tuesday, April 22, 2025
cloudflare plugin for certbot
Found this option,
--dns-cloudflare Obtain certificates using a DNS TXT record (if you are using Cloudflare for DNS). (default: False)
from
https://eff-certbot.readthedocs.io/en/stable/man/certbot.html
And documentation for this plugin is at
https://certbot-dns-cloudflare.readthedocs.io/en/stable/index.html
(example invocation at end)
and how to install plugin is
sudo apt-get -y install python3-certbot-dns-cloudflare
https://installati.one/install-python3-certbot-dns-cloudflare-ubuntu-20-04/
Monday, April 21, 2025
automating backup with python - rclone and google drive
Sunday, April 20, 2025
migrating web servers and associated scripts using rclone copy
As mentioned in the previous post, our server migration involved consolidating a web server into a DB server - we chose this method, since cloning the DB server was quick, while export followed by import of MySQL databases takes quite a bit longer as noted in the earlier 2024 migration post.
Copied the ssh private key for the destination server to the source server, and created an rclone remote using SFTP to the destination server.
zip -r -q webserver1.zip /path/to/webserver/files
(repeated this for all the web server directories later)
rclone copy webserver1.zip rcloneremote:/home/azureuser
(repeated this for all the other zip files later)
From the destination server,
unzip webserver1.zip
cd path/to/webserver/
sudo mv files /path/to/webserver
cd /path/to/webserver
sudo chown -R azureuser:www-data .
sudo chmod -R 775 .
----------------------------------------------
Then, the apache config files -
sudo zip -r -q etcapache.zip /etc/apache2
(rclone copy etc, and change ownership to root)
and the letsencrypt certificates etc,
sudo zip -r -q etclets.zip /etc/letsencrypt
(rclone copy etc, and change ownership to www-data for the file/directory which it needs, and the others to root)
-----------------------------------------------
With these, the files to be copied for the web servers were done. And I could start them up -
sudo a2ensite webserver1
sudo systemctl reload apache2
etc.
Also needed were
- installing all the necessary apache and php modules - which I had done earlier using the steps at the 2024 migration post.
- installing restic for backups as per the backups section of that post.
- rclone copy, individually, for the .sh backup scripts and the notifier directory.
- Copy-pasting lines from .config/rclone/rclone.config as noted in the restic backup script - the rclone config was modified by copy pasting the extra remotes from source to destination.
- Copy-pasting cron jobs from both crontab -e and sudo crontab -e
- Setting up postfix with gmail smtp as mentioned at this post for which
sudo apt remove ssmtp
sudo apt install mailutils postfix
and then editing the conf files was required.
sudo nano /etc/cron.d/awstats
Solution was to install ghostscript,
sudo apt install ghostscript
--------------------------------------------------------
Then the php max_file_upload also had to be modified according to this earlier post, https://hnsws.blogspot.com/2021/03/some-post-install-changes-needed-for.html
sudo nano /etc/php/8.3/apache2/php.ini
( Ctrl+w to find and change post_max_size
Ctrl+w to find and change upload_max_filesize
Ctrl+w to find and change max_execution_time - set to 600 for now.)
sudo systemctl restart apache2
and also did the same for /etc/php/8.3/cli/php.ini
-----------------------------------------------------------
When upgrading a plugin, a warning was shown that php extension soap was not installed, and that update will continue only after it is installed. So,
sudo apt install php-soap
-------------------------------------------------------------
Edit - a few days later -
https://linuxize.com/post/how-to-change-hostname-on-ubuntu-22-04/
sudo hostnamectl
sudo hostnamectl set-hostname our-desired-hostname
-------------------------------------------------------------
Then, a warning while updating a plugin - max_input_vars must be at least 5000
sudo nano /etc/php/8.3/apache2/php.ini
sudo nano /etc/php/8.3/cli/php.ini
sudo systemctl restart apache2
-------------------------------------------------------------
migrating Azure VM from one tenant to another
https://medium.com/@morsi.masmoudi/complete-guide-to-cloning-and-moving-a-vm-from-one-azure-tenant-to-another-8fa65dd6955a
sudo -u www-data /usr/bin/php admin/cli/maintenance.php --enable
- verified that this does stop the cron also, which would otherwise hit the database every minute.
azcopy copy mydisksnapshot.vhd "https://blob-storage-url" will work, but takes double the time - azcopy works fine directly from snapshot url to blob storage url. Caveat is that we must make a container first, and then use azcopy copy.)
Saturday, April 19, 2025
clearing up after docker
Via https://stackoverflow.com/questions/76833923/safe-way-to-clean-var-lib-docker
/var/lib/docker was using up 16 GB.
sudo docker system prune --all --volumes
WARNING! This will remove:
- all stopped containers
- all networks not used by at least one container
- all anonymous volumes not used by at least one container
- all images without at least one container associated to them
- all build cache
installed an alarm applet
On Linux Mint running Xfce, via https://forums.linuxmint.com/viewtopic.php?f=47&t=191832
Installed via Software Manager.
KAlarm needed to download 400 MB! So, instead chose Alarm-clock-applet which was only 563 kB. Shows up in the Applications menu as Alarm Clock. Can set time or timer.
Thursday, April 17, 2025
postgres restore from backup - 2 minutes
decided not to migrate Moodle from MySQL to Postgres
| Change | Expected impact |
|---|---|
| MySQL → PostgreSQL | 0–10% |
| MySQL tuning | 5–20% |
| Redis/MUC tuning | 10–50% |
| Faster CPU | Often noticeable |
| More RAM (8 → 16 GB) | Often more useful than DB migration |
Tuesday, April 15, 2025
moving a MySQL database from one host to another
resize OS disk for Azure VM
Monday, April 14, 2025
ode to github actions
Just a quick note of appreciation for Github Actions. I've moved most of my software work to directly editing on github and building with github actions, due to a variety of reasons, like
- Relatively beefy build runners - much faster than the computers I have access to - completely free for public repositories, and generous allowances for free accounts' private repositories also.
- I can start builds from the office and check the results at home etc - the advantages of having everything online.
- Copilot's "Explain errors" makes it relatively easy to pinpoint and fix syntax errors and such.
- I don't have to use up the limited hard disk space on local machines for relatively large SDKs like Android SDK, Android Studio, etc.
- The issue tracker built into github makes it easy to keep track of bugs and fixes.
- All the advantages of git source management.
Sunday, April 13, 2025
asked chatgpt about running x86-64 binaries with qemu on apple silicon
https://medium.com/@hathibel/debian-minimal-on-apple-silicon-qemu-setup-for-x86-64-3d6d2bc15e7d -
- Crossover (not free)
- Wine + WineSkin or WineskinServer
- UTM (QEMU-based VM with Windows x86_64)
- Parallels ARM64 desktop (not free) with BoxedWine (a full x86 Wine stack on ARM)
Friday, April 11, 2025
change submodule for a git repository
When trying to build OpenSpace for ARM64, came across issues with webbrowser ext - CEF binary being downloaded was cef_binary_102.0.10+gf249b2e+chromium-102.0.5005.115_linux64.tar.bz2 while we need ...linuxarm64.tar.bz2 for ARM64
In this case, this file seems to be responsible - https://github.com/OpenSpace/OpenSpace/blob/master/modules/webbrowser/cmake/cef_support.cmake
which we can fork and modify. In general, for other submodules not present in the main repo, the procedure seems to be:
How do I replace a git submodule with another repo? - Stack Overflow
If the location (URL) of the submodule has changed, then you can simply:
- Modify the .gitmodules file in the repo root to use the new URL.
- Delete the submodule folder in the repo rm -rf .git/modules/<submodule>.
- Delete the submodule folder in the working directory rm -rf <submodule>.
- Run git submodule sync. git submodule sync --recursive
- Run git submodule update.
More complete info can be found elsewhere:
If repo history is different then you need to checkout new branch manually:
git submodule sync --recursive
cd <submodule_dir>
git fetch
git checkout origin/master
git branch master -f
git checkout master
And apparently with Git 2.25 (Q1 2020), you can modify it.
git submodule set-url -- <path> <newurl>
git clone error and more - trying OpenSpace compile on Raspberry Pi
Thursday, April 10, 2025
prerequisites for running OpenSpace on Raspberry Pi
https://forums.raspberrypi.com/viewtopic.php?t=380368. That worked, no further warnings.
permissions needed to rename themes and plugins wordpress folders
One of our wordpress websites was not entering recovery mode.
... email from Wordpress regarding a fatal error while doing a setting in the menu using Astra theme. We had encountered such an error earlier also but could recover the site through the recovery link. However today on clicking on the recovery link it says recovery not initialized. ...
So, we had to disable plugins in order to be able to access the site. To follow the SSH/SFTP method described in this page - https://kinsta.com/knowledgebase/disable-wordpress-plugins/
But ... files could be opened but cannot rename since it says permission denied
So, just adding the ssh user to the www-data group was not enough -
sudo adduser thewordpresswebsiteadminuser www-data
also had to chmod the parent directory to 775 - was 755 earlier.
cd theparentdirectory
chmod -R 775 *
Then renaming worked.

